mirror of
https://github.com/libretro/RetroArch
synced 2025-01-30 12:32:52 +00:00
Kill some rarch_ctl actions
This commit is contained in:
parent
9605c01c49
commit
0eec872442
27
retroarch.c
27
retroarch.c
@ -1044,7 +1044,8 @@ bool retroarch_main_init(int argc, char *argv[])
|
||||
return false;
|
||||
}
|
||||
|
||||
rarch_ctl(RARCH_CTL_SET_ERROR_ON_INIT, NULL);
|
||||
rarch_error_on_init = true;
|
||||
|
||||
retro_main_log_file_init(NULL);
|
||||
retroarch_parse_input(argc, argv);
|
||||
|
||||
@ -1116,14 +1117,14 @@ bool retroarch_main_init(int argc, char *argv[])
|
||||
|
||||
command_event(CMD_EVENT_SET_PER_GAME_RESOLUTION, NULL);
|
||||
|
||||
rarch_ctl(RARCH_CTL_UNSET_ERROR_ON_INIT, NULL);
|
||||
rarch_ctl(RARCH_CTL_SET_INITED, NULL);
|
||||
rarch_error_on_init = false;
|
||||
rarch_is_inited = true;
|
||||
|
||||
return true;
|
||||
|
||||
error:
|
||||
command_event(CMD_EVENT_CORE_DEINIT, NULL);
|
||||
rarch_ctl(RARCH_CTL_UNSET_INITED, NULL);
|
||||
rarch_is_inited = false;
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -1190,12 +1191,6 @@ bool rarch_ctl(enum rarch_ctl_state state, void *data)
|
||||
return has_set_username;
|
||||
case RARCH_CTL_IS_INITED:
|
||||
return rarch_is_inited;
|
||||
case RARCH_CTL_UNSET_INITED:
|
||||
rarch_is_inited = false;
|
||||
break;
|
||||
case RARCH_CTL_SET_INITED:
|
||||
rarch_is_inited = true;
|
||||
break;
|
||||
case RARCH_CTL_DESTROY:
|
||||
has_set_username = false;
|
||||
rarch_is_inited = false;
|
||||
@ -1250,7 +1245,7 @@ bool rarch_ctl(enum rarch_ctl_state state, void *data)
|
||||
path_deinit_subsystem();
|
||||
path_deinit_savefile();
|
||||
|
||||
rarch_ctl(RARCH_CTL_UNSET_INITED, NULL);
|
||||
rarch_is_inited = false;
|
||||
|
||||
#ifdef HAVE_THREAD_STORAGE
|
||||
sthread_tls_delete(&rarch_tls);
|
||||
@ -1313,14 +1308,6 @@ bool rarch_ctl(enum rarch_ctl_state state, void *data)
|
||||
case RARCH_CTL_UNSET_SRAM_ENABLE:
|
||||
rarch_use_sram = false;
|
||||
break;
|
||||
case RARCH_CTL_SET_ERROR_ON_INIT:
|
||||
rarch_error_on_init = true;
|
||||
break;
|
||||
case RARCH_CTL_UNSET_ERROR_ON_INIT:
|
||||
rarch_error_on_init = false;
|
||||
break;
|
||||
case RARCH_CTL_IS_ERROR_ON_INIT:
|
||||
return rarch_error_on_init;
|
||||
case RARCH_CTL_SET_FORCE_FULLSCREEN:
|
||||
rarch_force_fullscreen = true;
|
||||
break;
|
||||
@ -1671,7 +1658,7 @@ void retroarch_fail(int error_code, const char *error)
|
||||
/* We cannot longjmp unless we're in retroarch_main_init().
|
||||
* If not, something went very wrong, and we should
|
||||
* just exit right away. */
|
||||
retro_assert(rarch_ctl(RARCH_CTL_IS_ERROR_ON_INIT, NULL));
|
||||
retro_assert(rarch_error_on_init);
|
||||
|
||||
strlcpy(error_string, error, sizeof(error_string));
|
||||
longjmp(error_sjlj_context, error_code);
|
||||
|
@ -39,10 +39,6 @@ enum rarch_ctl_state
|
||||
/* Deinitializes RetroArch. */
|
||||
RARCH_CTL_MAIN_DEINIT,
|
||||
|
||||
RARCH_CTL_UNSET_INITED,
|
||||
|
||||
RARCH_CTL_SET_INITED,
|
||||
|
||||
RARCH_CTL_IS_INITED,
|
||||
|
||||
RARCH_CTL_IS_PLAIN_CORE,
|
||||
@ -98,11 +94,6 @@ enum rarch_ctl_state
|
||||
RARCH_CTL_UNSET_BLOCK_CONFIG_READ,
|
||||
RARCH_CTL_IS_BLOCK_CONFIG_READ,
|
||||
|
||||
/* Error */
|
||||
RARCH_CTL_SET_ERROR_ON_INIT,
|
||||
RARCH_CTL_UNSET_ERROR_ON_INIT,
|
||||
RARCH_CTL_IS_ERROR_ON_INIT,
|
||||
|
||||
/* Username */
|
||||
RARCH_CTL_HAS_SET_USERNAME,
|
||||
RARCH_CTL_USERNAME_SET,
|
||||
|
Loading…
x
Reference in New Issue
Block a user