Move some default values for settings over to config.def.h

This commit is contained in:
twinaphex 2013-10-30 12:45:46 +01:00
parent e51cecbff4
commit ae896fbd79
2 changed files with 45 additions and 21 deletions

View File

@ -269,6 +269,42 @@ static bool config_save_on_exit = true;
static bool config_save_on_exit = false;
#endif
#ifdef HAVE_OVERLAY
// Default overlay directory
#if defined(__QNX__)
static const char *default_overlay = "app/native/overlays/";
#elif defined(IOS)
static const char *default_overlay_dir = "/Applications/RetroArch.app/overlays/";
#elif defined(ANDROID)
static const char *default_overlay_dir = "/data/data/org.retroarch/overlays/";
#else
static const char *default_overlay_dir = NULL;
#endif
#endif
#if defined(HAVE_CG) || defined(HAVE_GLSL) || defined(HAVE_HLSL)
#if defined(__QNX__)
static const char *default_shader_dir = "/app/native/shaders_glsl/";
#elif defined(IOS)
static const char *default_shader_dir = "/Applications/RetroArch.app/shaders_glsl/";
#elif defined(ANDROID)
static const char *default_shader_dir = "/data/data/org.retroarch/shaders_glsl/";
#else
static const char *default_shader_dir = NULL;
#endif
#endif
#if defined(ANDROID)
static const char *default_libretro_info_path = "/data/data/org.retroarch/info/";
#elif defined(__QNX__)
static const char *default_libretro_info_path = "/app/native/info/";
#elif defined(IOS)
static const char *default_libretro_info_path = "/Applications/RetroArch.app/info/";
#else
static const char *default_libretro_info_path = NULL;
#endif
// Crop overscanned frames.
static const bool crop_overscan = true;

View File

@ -332,34 +332,22 @@ void config_set_defaults(void)
#endif
#ifdef HAVE_OVERLAY
if (default_overlay_dir != NULL)
{
strlcpy(g_extern.overlay_dir, default_overlay_dir, sizeof(g_extern.overlay_dir));
#if defined(__QNX__)
strlcpy(g_extern.overlay_dir, "app/native/overlays/", sizeof(g_extern.overlay_dir));
RARCH_LOG("Setting default overlay %s ...\n", "app/native/overlays/snes-landscape.cfg");
strlcpy(g_settings.input.overlay, "app/native/overlays/snes-landscape.cfg", sizeof(g_settings.input.overlay));
#elif defined(IOS)
strlcpy(g_extern.overlay_dir, "/Applications/RetroArch.app/overlays/", sizeof(g_extern.overlay_dir));
#elif defined(ANDROID)
strlcpy(g_extern.overlay_dir, "/data/data/org.retroarch/overlays/", sizeof(g_extern.overlay_dir));
snprintf(g_settings.input.overlay, sizeof(g_settings.input.overlay), "%ssnes-landscape.cfg", default_overlay_dir);
#endif
}
#endif
#if defined(HAVE_CG) || defined(HAVE_GLSL) || defined(HAVE_HLSL)
#if defined(__QNX__)
strlcpy(g_settings.video.shader_dir, "/app/native/shaders_glsl/", sizeof(g_settings.video.shader_dir));
#elif defined(IOS)
strlcpy(g_settings.video.shader_dir, "/Applications/RetroArch.app/shaders_glsl/", sizeof(g_settings.video.shader_dir));
#elif defined(ANDROID)
strlcpy(g_settings.video.shader_dir, "/data/data/org.retroarch/shaders_glsl/", sizeof(g_settings.video.shader_dir));
#endif
if (default_shader_dir != NULL)
strlcpy(g_settings.video.shader_dir, default_shader_dir, sizeof(g_settings.video.shader_dir));
#endif
#if defined(ANDROID)
strlcpy(g_settings.libretro_info_path, "/data/data/org.retroarch/info/", sizeof(g_settings.libretro_info_path));
#elif defined(__QNX__)
strlcpy(g_settings.libretro_info_path, "app/native/info/", sizeof(g_settings.libretro_info_path));
#elif defined(IOS)
strlcpy(g_settings.libretro_info_path, "/Applications/RetroArch.app/info/", sizeof(g_settings.libretro_info_path));
#endif
if (default_libretro_info_path != NULL)
strlcpy(g_settings.libretro_info_path, default_libretro_info_path, sizeof(g_settings.libretro_info_path));
g_extern.config_save_on_exit = config_save_on_exit;