Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Close SDL2 window when quitting Video subsystem
SDL2 doesn't close windows anymore when the video subsystem is closed.
Therefore, the window created by the SDL2 compat layer has to be closed
manually to avoid orphan windows in frontends like m64py in non-VidExt mode.
  • Loading branch information
ecsv committed Jan 25, 2014
1 parent 38233c4 commit 7a5acb1
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/api/vidext.c
Expand Up @@ -123,6 +123,9 @@ EXPORT m64p_error CALL VidExt_Quit(void)
return M64ERR_NOT_INIT;

SDL_ShowCursor(SDL_ENABLE);
#if SDL_VERSION_ATLEAST(2,0,0)
SDL2_DestroyWindow();
#endif
SDL_QuitSubSystem(SDL_INIT_VIDEO);
l_pScreen = NULL;
l_VideoOutputActive = 0;
Expand Down

0 comments on commit 7a5acb1

Please sign in to comment.