mirror of
https://github.com/libretro/RetroArch
synced 2025-02-21 09:39:56 +00:00
(SALAMANDER) fix rarch_manage_libretro_set_first_file so it doesn't select the salamander executable
This commit is contained in:
parent
7491de4c95
commit
552180f276
@ -97,11 +97,11 @@ typedef struct
|
||||
char savestate_dir[MAXIMUM_PATH];
|
||||
#if defined(HAVE_CG) || defined(HAVE_HLSL) || defined(HAVE_GLSL)
|
||||
char menu_shader_file[MAXIMUM_PATH];
|
||||
#ifdef IS_SALAMANDER
|
||||
char salamander_file[MAXIMUM_PATH];
|
||||
#endif
|
||||
char shader_file[MAXIMUM_PATH];
|
||||
char shader_dir[MAXIMUM_PATH];
|
||||
#endif
|
||||
#ifdef IS_SALAMANDER
|
||||
char salamander_file[MAXIMUM_PATH];
|
||||
#endif
|
||||
char sram_dir[MAXIMUM_PATH];
|
||||
char system_dir[MAXIMUM_PATH];
|
||||
|
@ -17,6 +17,7 @@
|
||||
#include <stdio.h>
|
||||
#include "../boolean.h"
|
||||
#include "../file.h"
|
||||
#include "rarch_console.h"
|
||||
|
||||
#include "rarch_console_libretro_mgmt.h"
|
||||
|
||||
@ -151,17 +152,11 @@ void rarch_manage_libretro_set_first_file(char *first_file, size_t size_of_first
|
||||
|
||||
if(first_exe)
|
||||
{
|
||||
#if defined(_XBOX) || defined(GEKKO)
|
||||
#ifdef IS_SALAMANDER
|
||||
char fname_tmp[PATH_MAX];
|
||||
fill_pathname_base(fname_tmp, first_exe, sizeof(fname_tmp));
|
||||
|
||||
#ifdef _XBOX
|
||||
if(strcmp(fname_tmp, "RetroArch-Salamander.xex") == 0)
|
||||
#elif defined(GEKKO)
|
||||
if(strcmp(fname_tmp, "boot.dol") == 0)
|
||||
#else
|
||||
#error This case not handled
|
||||
#endif
|
||||
if(strncmp(fname_tmp, default_paths.salamander_file, sizeof(fname_tmp)) == 0)
|
||||
{
|
||||
RARCH_WARN("First entry is RetroArch Salamander itself, increment entry by one and check if it exists.\n");
|
||||
first_exe = dir_list->elems[1].data;
|
||||
|
@ -43,6 +43,8 @@ char libretro_path[512];
|
||||
char PORT_DIR[512];
|
||||
char app_dir[512];
|
||||
|
||||
default_paths_t default_paths;
|
||||
|
||||
static void find_and_set_first_file(void)
|
||||
{
|
||||
//Last fallback - we'll need to start the first executable file
|
||||
@ -107,6 +109,7 @@ static void get_environment_settings(void)
|
||||
getcwd(PORT_DIR, MAXPATHLEN);
|
||||
snprintf(SYS_CONFIG_FILE, sizeof(SYS_CONFIG_FILE), "%sretroarch.cfg", PORT_DIR);
|
||||
snprintf(LIBRETRO_DIR_PATH, sizeof(LIBRETRO_DIR_PATH), PORT_DIR);
|
||||
snprintf(default_paths.salamander_file, sizeof(default_paths.salamander_file), "boot.dol");
|
||||
}
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
|
@ -50,6 +50,8 @@ char LIBRETRO_DIR_PATH[PATH_MAX];
|
||||
char SYS_CONFIG_FILE[PATH_MAX];
|
||||
char libretro_path[PATH_MAX];
|
||||
|
||||
default_paths_t default_paths;
|
||||
|
||||
static void find_and_set_first_file(void)
|
||||
{
|
||||
//Last fallback - we'll need to start the first executable file
|
||||
@ -160,6 +162,7 @@ static void get_environment_settings (void)
|
||||
snprintf(SYS_CONFIG_FILE, sizeof(SYS_CONFIG_FILE), "%s/retroarch.cfg", usrDirPath);
|
||||
snprintf(LIBRETRO_DIR_PATH, sizeof(LIBRETRO_DIR_PATH), "%s/cores", usrDirPath);
|
||||
}
|
||||
snprintf(default_paths.salamander_file, sizeof(default_paths.salamander_file), "");
|
||||
}
|
||||
|
||||
//dummy - just to avoid the emitted warnings
|
||||
|
@ -41,6 +41,8 @@ char LIBRETRO_DIR_PATH[PATH_MAX];
|
||||
char SYS_CONFIG_FILE[PATH_MAX];
|
||||
char libretro_path[PATH_MAX];
|
||||
|
||||
default_paths_t default_paths;
|
||||
|
||||
static void find_and_set_first_file(void)
|
||||
{
|
||||
//Last fallback - we'll need to start the first executable file
|
||||
@ -156,8 +158,11 @@ static void get_environment_settings (void)
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
strlcpy(default_paths.salamander_file, "RetroArch-Salamander.xex", sizeof(default_paths.salamander_file));
|
||||
#elif defined(_XBOX1)
|
||||
strlcpy(SYS_CONFIG_FILE, "D:\\retroarch.cfg", sizeof(SYS_CONFIG_FILE));
|
||||
strlcpy(default_paths.salamander_file, "RetroArch-Salamander.xbe", sizeof(default_paths.salamander_file));
|
||||
#endif
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user