mirror of
https://github.com/blawar/GLideN64.git
synced 2024-06-25 22:09:35 +00:00
Fix issue with plugin freeze when emulation ended while plugin is in full screen mode.
Fixed PJ64: End emulation in Full-screen mode is broken #1680
This commit is contained in:
parent
4cb2e7d7e8
commit
a89486f6bd
|
@ -65,6 +65,17 @@ bool DisplayWindow::changeWindow()
|
|||
return true;
|
||||
}
|
||||
|
||||
void DisplayWindow::closeWindow()
|
||||
{
|
||||
if (!m_bToggleFullscreen || !m_bFullscreen)
|
||||
return;
|
||||
if (m_drawer.getDrawingState() != DrawingState::Non)
|
||||
m_drawer._destroyData();
|
||||
_changeWindow();
|
||||
m_bToggleFullscreen = false;
|
||||
}
|
||||
|
||||
|
||||
void DisplayWindow::setWindowSize(u32 _width, u32 _height)
|
||||
{
|
||||
if (m_width != _width || m_height != _height) {
|
||||
|
|
|
@ -14,6 +14,7 @@ public:
|
|||
void saveScreenshot();
|
||||
bool changeWindow();
|
||||
bool resizeWindow();
|
||||
void closeWindow();
|
||||
void setWindowSize(u32 _width, u32 _height);
|
||||
void setCaptureScreen(const char * const _strDirectory);
|
||||
void setToggleFullscreen() { m_bToggleFullscreen = true; }
|
||||
|
|
|
@ -118,7 +118,7 @@ bool Utils::isFramebufferError()
|
|||
LOG(LOG_ERROR, "[GlideN64]: FBO Unsupported\n");
|
||||
break;
|
||||
case GL_FRAMEBUFFER_COMPLETE:
|
||||
LOG(LOG_VERBOSE, "[GlideN64]: FBO OK\n");
|
||||
//LOG(LOG_VERBOSE, "[GlideN64]: FBO OK\n");
|
||||
break;
|
||||
// case GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONS_EXT:
|
||||
// printf("framebuffer FRAMEBUFFER_DIMENSIONS\n");
|
||||
|
|
|
@ -45,6 +45,7 @@ public:
|
|||
void FindPluginPath(wchar_t * _strPath);
|
||||
void GetUserDataPath(wchar_t * _strPath);
|
||||
void GetUserCachePath(wchar_t * _strPath);
|
||||
bool isRomOpen() const { return m_bRomOpen; }
|
||||
|
||||
#ifndef MUPENPLUSAPI
|
||||
// Zilmar
|
||||
|
@ -90,14 +91,17 @@ public:
|
|||
|
||||
private:
|
||||
PluginAPI()
|
||||
: m_bRomOpen(false)
|
||||
#ifdef RSPTHREAD
|
||||
: m_pRspThread(NULL), m_pCommand(nullptr)
|
||||
, m_pRspThread(NULL)
|
||||
, m_pCommand(nullptr)
|
||||
#endif
|
||||
{}
|
||||
PluginAPI(const PluginAPI &) = delete;
|
||||
|
||||
void _initiateGFX(const GFX_INFO & _gfxInfo) const;
|
||||
|
||||
bool m_bRomOpen;
|
||||
#ifdef RSPTHREAD
|
||||
void _callAPICommand(APICommand & _command);
|
||||
std::mutex m_rspThreadMtx;
|
||||
|
|
|
@ -173,6 +173,7 @@ void PluginAPI::ProcessRDPList()
|
|||
void PluginAPI::RomClosed()
|
||||
{
|
||||
LOG(LOG_APIFUNC, "RomClosed\n");
|
||||
m_bRomOpen = false;
|
||||
#ifdef RSPTHREAD
|
||||
_callAPICommand(RomClosedCommand(
|
||||
&m_rspThreadMtx,
|
||||
|
@ -204,6 +205,7 @@ void PluginAPI::RomOpen()
|
|||
Config_LoadConfig();
|
||||
dwnd().start();
|
||||
#endif
|
||||
m_bRomOpen = true;
|
||||
}
|
||||
|
||||
void PluginAPI::ShowCFB()
|
||||
|
@ -259,7 +261,10 @@ void PluginAPI::_initiateGFX(const GFX_INFO & _gfxInfo) const {
|
|||
|
||||
void PluginAPI::ChangeWindow()
|
||||
{
|
||||
LOG(LOG_APIFUNC, "ChangeWindow\n");
|
||||
dwnd().setToggleFullscreen();
|
||||
if (!m_bRomOpen)
|
||||
dwnd().closeWindow();
|
||||
}
|
||||
|
||||
void PluginAPI::FBWrite(unsigned int _addr, unsigned int _size)
|
||||
|
|
Loading…
Reference in New Issue
Block a user