posix: fix deprecated warning about g_thread_init

problems with the old if, is that the code still compiled(but optimised out)
as g_thread_supported is a macro, #if work well enouth and doesn't generate
warning
This commit is contained in:
matthias gatto 2018-10-11 23:57:30 +02:00
parent 50755c6a45
commit bf3e1b1cf3
3 changed files with 7 additions and 5 deletions

View File

@ -574,9 +574,9 @@ int main(int argc, char ** argv) {
slot2_Init(); slot2_Init();
slot2_Change((NDS_SLOT2_TYPE)slot2_device_type); slot2_Change((NDS_SLOT2_TYPE)slot2_device_type);
if ( !g_thread_supported()) { #if !g_thread_supported()
g_thread_init( NULL); g_thread_init( NULL);
} #endif
driver = new BaseDriver(); driver = new BaseDriver();

View File

@ -539,8 +539,9 @@ int main(int argc, char *argv[]) {
fprintf(stderr, "Warning: X11 not thread-safe\n"); fprintf(stderr, "Warning: X11 not thread-safe\n");
} }
if (!g_thread_supported()) #if !g_thread_supported()
g_thread_init( NULL); g_thread_init( NULL);
#endif
gtk_init(&argc, &argv); gtk_init(&argc, &argv);

View File

@ -3511,8 +3511,9 @@ int main (int argc, char *argv[])
fprintf(stderr, "Warning: X11 not thread-safe\n"); fprintf(stderr, "Warning: X11 not thread-safe\n");
} }
if (!g_thread_supported()) #if !g_thread_supported()
g_thread_init( NULL); g_thread_init( NULL);
#endif
gtk_init(&argc, &argv); gtk_init(&argc, &argv);