mirror of
https://github.com/kanjitalk755/macemu.git
synced 2025-03-04 12:29:49 +00:00
Use atexit(SDL_Quit) idiom. XCloseDisplay() only when using X11 graphics.
This commit is contained in:
parent
14587bed4d
commit
8948ce2a49
@ -401,6 +401,7 @@ int main(int argc, char **argv)
|
||||
ErrorAlert(str);
|
||||
QuitEmulator();
|
||||
}
|
||||
atexit(SDL_Quit);
|
||||
#endif
|
||||
|
||||
// Init system routines
|
||||
@ -784,11 +785,8 @@ void QuitEmulator(void)
|
||||
// Exit preferences
|
||||
PrefsExit();
|
||||
|
||||
#ifdef USE_SDL
|
||||
// Exit SDL system
|
||||
SDL_Quit();
|
||||
#else
|
||||
// Close X11 server connection
|
||||
#ifndef USE_SDL_VIDEO
|
||||
if (x_display)
|
||||
XCloseDisplay(x_display);
|
||||
#endif
|
||||
|
Loading…
x
Reference in New Issue
Block a user