mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-23 06:09:50 -06:00
ogl: fix single core crash
osx is missing, sorry but I'm too stupid for objective-c
This commit is contained in:
@ -87,6 +87,13 @@ bool cInterfaceAGL::MakeCurrent()
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool cInterfaceAGL::ClearCurrent()
|
||||||
|
{
|
||||||
|
// not tested at all
|
||||||
|
//clearCurrentContext();
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
// Close backend
|
// Close backend
|
||||||
void cInterfaceAGL::Shutdown()
|
void cInterfaceAGL::Shutdown()
|
||||||
{
|
{
|
||||||
|
@ -30,6 +30,7 @@ public:
|
|||||||
void Swap();
|
void Swap();
|
||||||
bool Create(void *&window_handle);
|
bool Create(void *&window_handle);
|
||||||
bool MakeCurrent();
|
bool MakeCurrent();
|
||||||
|
bool ClearCurrent();
|
||||||
void Shutdown();
|
void Shutdown();
|
||||||
void Update();
|
void Update();
|
||||||
|
|
||||||
|
@ -141,12 +141,17 @@ bool cInterfaceGLX::MakeCurrent()
|
|||||||
#endif
|
#endif
|
||||||
return glXMakeCurrent(GLWin.dpy, GLWin.win, GLWin.ctx);
|
return glXMakeCurrent(GLWin.dpy, GLWin.win, GLWin.ctx);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool cInterfaceGLX::ClearCurrent()
|
||||||
|
{
|
||||||
|
return glXMakeCurrent(GLWin.dpy, None, NULL);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// Close backend
|
// Close backend
|
||||||
void cInterfaceGLX::Shutdown()
|
void cInterfaceGLX::Shutdown()
|
||||||
{
|
{
|
||||||
XWindow.DestroyXWindow();
|
XWindow.DestroyXWindow();
|
||||||
if (GLWin.ctx && !glXMakeCurrent(GLWin.dpy, None, NULL))
|
|
||||||
NOTICE_LOG(VIDEO, "Could not release drawing context.");
|
|
||||||
if (GLWin.ctx)
|
if (GLWin.ctx)
|
||||||
{
|
{
|
||||||
glXDestroyContext(GLWin.dpy, GLWin.ctx);
|
glXDestroyContext(GLWin.dpy, GLWin.ctx);
|
||||||
|
@ -36,6 +36,7 @@ public:
|
|||||||
void UpdateFPSDisplay(const char *Text);
|
void UpdateFPSDisplay(const char *Text);
|
||||||
bool Create(void *&window_handle);
|
bool Create(void *&window_handle);
|
||||||
bool MakeCurrent();
|
bool MakeCurrent();
|
||||||
|
bool ClearCurrent();
|
||||||
void Shutdown();
|
void Shutdown();
|
||||||
};
|
};
|
||||||
#endif
|
#endif
|
||||||
|
@ -27,6 +27,7 @@ public:
|
|||||||
virtual void UpdateFPSDisplay(const char *Text) {}
|
virtual void UpdateFPSDisplay(const char *Text) {}
|
||||||
virtual bool Create(void *&window_handle) { return true; }
|
virtual bool Create(void *&window_handle) { return true; }
|
||||||
virtual bool MakeCurrent() { return true; }
|
virtual bool MakeCurrent() { return true; }
|
||||||
|
virtual bool ClearCurrent() { return true; }
|
||||||
virtual void Shutdown() {}
|
virtual void Shutdown() {}
|
||||||
|
|
||||||
virtual void SwapInterval(int Interval) { }
|
virtual void SwapInterval(int Interval) { }
|
||||||
|
@ -131,6 +131,11 @@ bool cInterfaceWGL::MakeCurrent()
|
|||||||
return wglMakeCurrent(hDC, hRC) ? true : false;
|
return wglMakeCurrent(hDC, hRC) ? true : false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool cInterfaceWGL::ClearCurrent()
|
||||||
|
{
|
||||||
|
return wglMakeCurrent(hDC, NULL) ? true : false;
|
||||||
|
}
|
||||||
|
|
||||||
// Update window width, size and etc. Called from Render.cpp
|
// Update window width, size and etc. Called from Render.cpp
|
||||||
void cInterfaceWGL::Update()
|
void cInterfaceWGL::Update()
|
||||||
{
|
{
|
||||||
|
@ -33,6 +33,7 @@ public:
|
|||||||
void UpdateFPSDisplay(const char *Text);
|
void UpdateFPSDisplay(const char *Text);
|
||||||
bool Create(void *&window_handle);
|
bool Create(void *&window_handle);
|
||||||
bool MakeCurrent();
|
bool MakeCurrent();
|
||||||
|
bool ClearCurrent();
|
||||||
void Shutdown();
|
void Shutdown();
|
||||||
|
|
||||||
void Update();
|
void Update();
|
||||||
|
@ -253,6 +253,7 @@ void VideoBackend::Video_Cleanup() {
|
|||||||
OpcodeDecoder_Shutdown();
|
OpcodeDecoder_Shutdown();
|
||||||
delete g_renderer;
|
delete g_renderer;
|
||||||
g_renderer = NULL;
|
g_renderer = NULL;
|
||||||
|
GLInterface->ClearCurrent();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user