Merge fixes

This commit is contained in:
twinaphex 2016-10-01 08:24:02 +02:00
parent 8f163e6972
commit d376ea0c9d
7 changed files with 18 additions and 51 deletions

View File

@ -1142,9 +1142,9 @@ static void config_set_defaults(void)
/* Make sure settings from other configs carry over into defaults
* for another config. */
if (!retroarch_override_setting_is_set(RARCH_OVERRIDE_SETTING_SAVE_PATH))
if (!retroarch_override_setting_is_set(RARCH_OVERRIDE_SETTING_SAVE_PATH, NULL))
dir_clear_savefile();
if (!retroarch_override_setting_is_set(RARCH_OVERRIDE_SETTING_STATE_PATH))
if (!retroarch_override_setting_is_set(RARCH_OVERRIDE_SETTING_STATE_PATH, NULL))
dir_clear_savestate();
*settings->path.libretro_info = '\0';
@ -1177,8 +1177,11 @@ static void config_set_defaults(void)
if (!retroarch_override_setting_is_set(RARCH_OVERRIDE_SETTING_IPS_PREF, NULL))
rarch_ctl(RARCH_CTL_UNSET_IPS_PREF, NULL);
*global->record.output_dir = '\0';
*global->record.config_dir = '\0';
{
global_t *global = global_get_ptr();
*global->record.output_dir = '\0';
*global->record.config_dir = '\0';
}
*settings->path.core_options = '\0';
*settings->path.content_history = '\0';
@ -1766,7 +1769,7 @@ static bool config_load_file(const char *path, bool set_defaults,
override_username = strdup(settings->username);
#ifdef HAVE_NETWORKING
if (retroarch_override_setting_is_set(RARCH_OVERRIDE_SETTING_NETPLAY_IP_ADDRESS))
if (retroarch_override_setting_is_set(RARCH_OVERRIDE_SETTING_NETPLAY_IP_ADDRESS, NULL))
override_netplay_ip_address = strdup(global->netplay.server);
#endif

View File

@ -20,6 +20,7 @@
#include "input_remapping.h"
#include "../configuration.h"
#include "../retroarch.h"
#include "../runloop.h"
/**
@ -35,6 +36,7 @@ bool input_remapping_load_file(void *data, const char *path)
unsigned i, j;
config_file_t *conf = (config_file_t*)data;
settings_t *settings = config_get_ptr();
global_t *global = global_get_ptr();
if (!conf || string_is_empty(path))
return false;

View File

@ -1658,7 +1658,7 @@ void general_write_handler(void *data)
#ifdef HAVE_NETWORKING
if (!global->netplay.is_client)
*global->netplay.server = '\0';
retroarch_override_setting_set(RARCH_OVERRIDE_SETTING_NETPLAY_MODE);
retroarch_override_setting_set(RARCH_OVERRIDE_SETTING_NETPLAY_MODE, NULL);
#endif
break;
case MENU_ENUM_LABEL_NETPLAY_SPECTATOR_MODE_ENABLE:

34
paths.c
View File

@ -281,7 +281,7 @@ void path_set_special(char **argv, unsigned num_content)
* It is more complicated for special content types. */
if (global)
{
if (!retroarch_override_setting_is_set(RARCH_OVERRIDE_SETTING_STATE_PATH))
if (!retroarch_override_setting_is_set(RARCH_OVERRIDE_SETTING_STATE_PATH, NULL))
fill_pathname_noext(global->name.savestate, path_main_basename,
file_path_str(FILE_PATH_STATE_EXTENSION),
sizeof(global->name.savestate));
@ -362,15 +362,10 @@ static bool path_init_subsystem(void)
}
}
<<<<<<< HEAD
/* Let other relevant paths be inferred from the main SRAM location. */
if (!retroarch_override_setting_is_set(RARCH_OVERRIDE_SETTING_SAVE_PATH, NULL))
=======
if (global)
>>>>>>> parent of 6ee7b73... Move global->name to paths.c
{
/* Let other relevant paths be inferred from the main SRAM location. */
if (!retroarch_override_setting_is_set(RARCH_OVERRIDE_SETTING_SAVE_PATH))
if (!retroarch_override_setting_is_set(RARCH_OVERRIDE_SETTING_SAVE_PATH, NULL))
fill_pathname_noext(global->name.savefile,
path_main_basename,
file_path_str(FILE_PATH_SRM_EXTENSION),
@ -505,38 +500,17 @@ size_t path_get_core_size(void)
static void path_set_names(const char *path)
{
<<<<<<< HEAD
path_set_basename(path);
if (!retroarch_override_setting_is_set(RARCH_OVERRIDE_SETTING_SAVE_PATH, NULL))
{
char tmp[PATH_MAX_LENGTH] = {0};
fill_pathname_noext(tmp, path_main_basename,
file_path_str(FILE_PATH_SRM_EXTENSION), sizeof(tmp));
path_set(RARCH_PATH_SAVEFILE, tmp);
}
if (!retroarch_override_setting_is_set(RARCH_OVERRIDE_SETTING_STATE_PATH, NULL))
{
char tmp[PATH_MAX_LENGTH] = {0};
fill_pathname_noext(tmp, path_main_basename,
file_path_str(FILE_PATH_STATE_EXTENSION), sizeof(tmp));
=======
global_t *global = global_get_ptr();
>>>>>>> parent of 6ee7b73... Move global->name to paths.c
path_set_basename(path);
if (global)
{
if (!retroarch_override_setting_is_set(RARCH_OVERRIDE_SETTING_SAVE_PATH))
if (!retroarch_override_setting_is_set(RARCH_OVERRIDE_SETTING_SAVE_PATH, NULL))
fill_pathname_noext(global->name.savefile, path_main_basename,
file_path_str(FILE_PATH_SRM_EXTENSION), sizeof(global->name.savefile));
if (!retroarch_override_setting_is_set(RARCH_OVERRIDE_SETTING_STATE_PATH))
if (!retroarch_override_setting_is_set(RARCH_OVERRIDE_SETTING_STATE_PATH, NULL))
fill_pathname_noext(global->name.savestate, path_main_basename,
file_path_str(FILE_PATH_STATE_EXTENSION), sizeof(global->name.savestate));

View File

@ -304,9 +304,10 @@ bool recording_init(void)
{
char recording_file[PATH_MAX_LENGTH] = {0};
struct ffemu_params params = {0};
settings_t *settings = config_get_ptr();
struct retro_system_av_info *av_info = video_viewport_get_system_av_info();
bool *recording_enabled = recording_is_enabled();
settings_t *settings = config_get_ptr();
global_t *global = global_get_ptr();
if (!*recording_enabled)
return false;

View File

@ -873,23 +873,13 @@ static void retroarch_parse_input(int argc, char *argv[])
content_set_does_not_need_content();
/* Copy SRM/state dirs used, so they can be reused on reentrancy. */
<<<<<<< HEAD
if (retroarch_override_setting_is_set(RARCH_OVERRIDE_SETTING_SAVE_PATH, NULL) &&
path_is_directory(path_get(RARCH_PATH_SAVEFILE)))
dir_set_savefile(path_get(RARCH_PATH_SAVEFILE));
if (retroarch_override_setting_is_set(RARCH_OVERRIDE_SETTING_STATE_PATH, NULL) &&
path_is_directory(path_get(RARCH_PATH_SAVESTATE)))
dir_set_savestate(path_get(RARCH_PATH_SAVESTATE));
=======
if (retroarch_override_setting_is_set(RARCH_OVERRIDE_SETTING_SAVE_PATH) &&
path_is_directory(global->name.savefile))
dir_set_savefile(global->name.savefile);
if (retroarch_override_setting_is_set(RARCH_OVERRIDE_SETTING_STATE_PATH) &&
if (retroarch_override_setting_is_set(RARCH_OVERRIDE_SETTING_STATE_PATH, NULL) &&
path_is_directory(global->name.savestate))
dir_set_savestate(global->name.savestate);
>>>>>>> parent of 6ee7b73... Move global->name to paths.c
}
static bool retroarch_init_state(void)

View File

@ -137,8 +137,6 @@ typedef struct rarch_resolution
typedef struct global
{
<<<<<<< HEAD
=======
struct
{
bool libretro_device[MAX_USERS];
@ -155,7 +153,6 @@ typedef struct global
char remapfile[PATH_MAX_LENGTH];
} name;
>>>>>>> parent of 6ee7b73... Move global->name to paths.c
#ifdef HAVE_NETWORKING
/* Netplay. */
struct