mirror of
https://github.com/CTCaer/RetroArch.git
synced 2025-01-26 21:36:26 +00:00
Use new core options accessors
This commit is contained in:
parent
b51aca2fa5
commit
e338b78792
@ -43,6 +43,7 @@
|
||||
#include "../../managers/cheat_manager.h"
|
||||
#include "../../tasks/tasks_internal.h"
|
||||
#include "../../input/input_remapping.h"
|
||||
#include "../../paths.h"
|
||||
#include "../../retroarch.h"
|
||||
#include "../../runloop.h"
|
||||
#include "../../verbosity.h"
|
||||
@ -2497,14 +2498,10 @@ static int action_ok_option_create(const char *path,
|
||||
|
||||
if(config_file_write(conf, game_path))
|
||||
{
|
||||
global_t *global = global_get_ptr();
|
||||
|
||||
runloop_msg_queue_push(
|
||||
msg_hash_to_str(MSG_CORE_OPTIONS_FILE_CREATED_SUCCESSFULLY),
|
||||
1, 100, true);
|
||||
|
||||
strlcpy(global->path.core_options_path,
|
||||
game_path, sizeof(global->path.core_options_path));
|
||||
path_set_core_options(game_path);
|
||||
}
|
||||
config_file_free(conf);
|
||||
|
||||
|
@ -1124,17 +1124,16 @@ bool runloop_ctl(enum runloop_ctl_state state, void *data)
|
||||
break;
|
||||
case RUNLOOP_CTL_CORE_OPTIONS_DEINIT:
|
||||
{
|
||||
global_t *global = global_get_ptr();
|
||||
if (!runloop_core_options)
|
||||
return false;
|
||||
|
||||
/* check if game options file was just created and flush
|
||||
to that file instead */
|
||||
if(global && !string_is_empty(global->path.core_options_path))
|
||||
if(!path_is_core_options_empty())
|
||||
{
|
||||
core_option_manager_flush_game_specific(runloop_core_options,
|
||||
global->path.core_options_path);
|
||||
global->path.core_options_path[0] = '\0';
|
||||
path_get_core_options());
|
||||
path_clear_core_options();
|
||||
}
|
||||
else
|
||||
core_option_manager_flush(runloop_core_options);
|
||||
|
Loading…
x
Reference in New Issue
Block a user