mirror of https://github.com/encounter/SDL.git
switch: fix exit crash when using SDL_GL_Load/UnloadLibrary (#53)
This commit is contained in:
parent
69747d1378
commit
911c2b2833
|
@ -160,8 +160,11 @@ SWITCH_VideoInit(_THIS)
|
||||||
void
|
void
|
||||||
SWITCH_VideoQuit(_THIS)
|
SWITCH_VideoQuit(_THIS)
|
||||||
{
|
{
|
||||||
if (_this->gl_config.driver_loaded) {
|
// this should not be needed if user code is right (SDL_GL_LoadLibrary/SDL_GL_UnloadLibrary calls match)
|
||||||
SDL_GL_UnloadLibrary();
|
// this (user) error doesn't have the same effect on switch thought, as the driver needs to be unloaded (crash)
|
||||||
|
if(_this->gl_config.driver_loaded > 0) {
|
||||||
|
SWITCH_GLES_UnloadLibrary(_this);
|
||||||
|
_this->gl_config.driver_loaded = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
// exit touch
|
// exit touch
|
||||||
|
|
Loading…
Reference in New Issue