Cocoa Port: Fix a bug where repeatedly using save states in quick succession can cause intermittent failures with HUD rendering when using OpenGL display views. (Regression from commit 3c04e8f4.)

This commit is contained in:
rogerman 2022-05-09 23:54:28 -07:00
parent 6f8c085890
commit 0f6cbffe77
1 changed files with 6 additions and 0 deletions

View File

@ -1839,7 +1839,13 @@ bool OSXOpenGLRendererBegin()
void OSXOpenGLRendererEnd()
{
#ifndef PORT_VERSION_OS_X_APP
// The OpenEmu plug-in needs the context reset after 3D rendering since OpenEmu's context
// is assumed to be the default context. However, resetting the context for our standalone
// app can cause problems since the core emulator's context is assumed to be the default
// context. So reset the context for OpenEmu and skip resetting for us.
CGLSetCurrentContext(OSXOpenGLRendererContextPrev);
#endif
}
bool OSXOpenGLRendererFramebufferDidResize(const bool isFBOSupported, size_t w, size_t h)