Add main_is_init conditional

This commit is contained in:
twinaphex 2013-01-05 23:44:49 +01:00
parent 634132033b
commit 02514d509e
2 changed files with 6 additions and 0 deletions

View File

@ -594,6 +594,7 @@ struct global
// If this is non-NULL. RARCH_LOG and friends will write to this file.
FILE *log_file;
bool main_is_init;
bool error_in_init;
char error_string[1024];
jmp_buf error_sjlj_context;

View File

@ -2738,6 +2738,7 @@ int rarch_main_init(int argc, char *argv[])
init_cheats();
g_extern.error_in_init = false;
g_extern.main_is_init = true;
return 0;
error:
@ -2746,6 +2747,8 @@ error:
uninit_drivers();
uninit_libretro_sym();
g_extern.main_is_init = false;
return 1;
}
@ -2880,6 +2883,8 @@ void rarch_main_deinit(void)
pretro_deinit();
uninit_drivers();
uninit_libretro_sym();
g_extern.main_is_init = false;
}
#ifndef HAVE_RARCH_MAIN_WRAP