This is a fork of Zandronum Beta for Mac Os (Silicon and Intel)
修订版 | a079616e5796d1300945766df2776605a1dbd771 (tree) |
---|---|
时间 | 2022-09-05 05:11:19 |
作者 | Benjamin Berkels <torr.samaho@quan...> |
Commiter | Benjamin Berkels |
Fixed: SDL_Init must be called before gtk_init_check (patch from icculus, fixes 4023).
@@ -263,9 +263,10 @@ | ||
263 | 263 | // Note that the LANG environment variable is overridden by LC_* |
264 | 264 | setenv ("LC_NUMERIC", "C", 1); |
265 | 265 | |
266 | -#ifndef NO_GTK | |
267 | - GtkAvailable = gtk_init_check (&argc, &argv); | |
268 | -#endif | |
266 | +// [BB] Patch from icculus for SDL 1.2 compatibility. | |
267 | +// #ifndef NO_GTK | |
268 | +// GtkAvailable = gtk_init_check (&argc, &argv); | |
269 | +// #endif | |
269 | 270 | |
270 | 271 | setlocale (LC_ALL, "C"); |
271 | 272 |
@@ -302,6 +303,14 @@ | ||
302 | 303 | |
303 | 304 | atterm (SDL_Quit); |
304 | 305 | |
306 | + // [BB] Patch from icculus for SDL 1.2 compatibility. | |
307 | + // Make sure gtk_init_check happens _after_ SDL_Init, so SDL will call | |
308 | + // XInitThreads() on X11, then GTK+ will talk to Xlib without leaving | |
309 | + // mutexes uncreated that the system is going to expect to be initialized. | |
310 | +#ifndef NO_GTK | |
311 | + GtkAvailable = gtk_init_check (&argc, &argv); | |
312 | +#endif | |
313 | + | |
305 | 314 | { |
306 | 315 | char viddriver[80]; |
307 | 316 |