mirror of
https://github.com/libretro/RetroArch
synced 2025-04-09 21:45:45 +00:00
Add main_is_init conditional
This commit is contained in:
parent
634132033b
commit
02514d509e
@ -594,6 +594,7 @@ struct global
|
|||||||
// If this is non-NULL. RARCH_LOG and friends will write to this file.
|
// If this is non-NULL. RARCH_LOG and friends will write to this file.
|
||||||
FILE *log_file;
|
FILE *log_file;
|
||||||
|
|
||||||
|
bool main_is_init;
|
||||||
bool error_in_init;
|
bool error_in_init;
|
||||||
char error_string[1024];
|
char error_string[1024];
|
||||||
jmp_buf error_sjlj_context;
|
jmp_buf error_sjlj_context;
|
||||||
|
@ -2738,6 +2738,7 @@ int rarch_main_init(int argc, char *argv[])
|
|||||||
init_cheats();
|
init_cheats();
|
||||||
|
|
||||||
g_extern.error_in_init = false;
|
g_extern.error_in_init = false;
|
||||||
|
g_extern.main_is_init = true;
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
error:
|
error:
|
||||||
@ -2746,6 +2747,8 @@ error:
|
|||||||
uninit_drivers();
|
uninit_drivers();
|
||||||
uninit_libretro_sym();
|
uninit_libretro_sym();
|
||||||
|
|
||||||
|
g_extern.main_is_init = false;
|
||||||
|
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2880,6 +2883,8 @@ void rarch_main_deinit(void)
|
|||||||
pretro_deinit();
|
pretro_deinit();
|
||||||
uninit_drivers();
|
uninit_drivers();
|
||||||
uninit_libretro_sym();
|
uninit_libretro_sym();
|
||||||
|
|
||||||
|
g_extern.main_is_init = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifndef HAVE_RARCH_MAIN_WRAP
|
#ifndef HAVE_RARCH_MAIN_WRAP
|
||||||
|
Loading…
x
Reference in New Issue
Block a user