do OGL surface resizing from the mainthread
This commit is contained in:
parent
d82f08e98d
commit
92951b6f04
|
@ -379,6 +379,14 @@ void EmuThread::updateScreenSettings(bool filter, const WindowInfo& windowInfo,
|
|||
{
|
||||
screenSettingsLock.lock();
|
||||
|
||||
if (lastScreenWidth != windowInfo.surface_width || lastScreenHeight != windowInfo.surface_height)
|
||||
{
|
||||
if (oglContext)
|
||||
oglContext->ResizeSurface(windowInfo.surface_width, windowInfo.surface_height);
|
||||
lastScreenWidth = windowInfo.surface_width;
|
||||
lastScreenHeight = windowInfo.surface_height;
|
||||
}
|
||||
|
||||
this->filter = filter;
|
||||
this->windowInfo = windowInfo;
|
||||
this->numScreens = numScreens;
|
||||
|
@ -553,16 +561,6 @@ void EmuThread::run()
|
|||
}
|
||||
}
|
||||
|
||||
screenSettingsLock.lock();
|
||||
if (lastScreenWidth != windowInfo.surface_width || lastScreenHeight != windowInfo.surface_height)
|
||||
{
|
||||
if (oglContext)
|
||||
oglContext->ResizeSurface(windowInfo.surface_width, windowInfo.surface_height);
|
||||
lastScreenWidth = windowInfo.surface_width;
|
||||
lastScreenHeight = windowInfo.surface_height;
|
||||
}
|
||||
screenSettingsLock.unlock();
|
||||
|
||||
if (EmuRunning == 1 || EmuRunning == 3)
|
||||
{
|
||||
EmuStatus = 1;
|
||||
|
|
|
@ -112,8 +112,7 @@ private:
|
|||
int numScreens;
|
||||
bool filter;
|
||||
|
||||
int lastScreenWidth = -1;
|
||||
int lastScreenHeight = -1;
|
||||
int lastScreenWidth = -1, lastScreenHeight = -1;
|
||||
};
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue