mirror of
https://github.com/libretro/RetroArch
synced 2025-04-17 02:43:03 +00:00
Fix load state issue
This commit is contained in:
parent
0e7d5ed32b
commit
3ec2ec2e11
@ -195,17 +195,15 @@ static void create_path_names(void)
|
|||||||
{
|
{
|
||||||
char cwd[FILENAME_MAX];
|
char cwd[FILENAME_MAX];
|
||||||
getcwd(cwd, sizeof(cwd));
|
getcwd(cwd, sizeof(cwd));
|
||||||
|
if (strncmp(cwd, "mc0:", 4) || strncmp(cwd, "mc1:", 4)) {
|
||||||
|
/* For now the save and load states just working in MCs */
|
||||||
|
strlcpy(cwd, "mc0:/", sizeof(cwd));
|
||||||
|
}
|
||||||
|
strcat(cwd, "RETROARCH");
|
||||||
|
|
||||||
strcat(cwd, "app");
|
|
||||||
strlcpy(eboot_path, cwd, sizeof(eboot_path));
|
strlcpy(eboot_path, cwd, sizeof(eboot_path));
|
||||||
strlcpy(g_defaults.dirs[DEFAULT_DIR_PORT], eboot_path, sizeof(g_defaults.dirs[DEFAULT_DIR_PORT]));
|
strlcpy(g_defaults.dirs[DEFAULT_DIR_PORT], eboot_path, sizeof(g_defaults.dirs[DEFAULT_DIR_PORT]));
|
||||||
|
strlcpy(user_path, eboot_path, sizeof(user_path));
|
||||||
strcat(cwd, "/data/retroarch");
|
|
||||||
strlcpy(user_path, cwd, sizeof(user_path));
|
|
||||||
|
|
||||||
// strlcpy(eboot_path, "mc0:/RETROARCH", sizeof(eboot_path));
|
|
||||||
// strlcpy(g_defaults.dirs[DEFAULT_DIR_PORT], eboot_path, sizeof(g_defaults.dirs[DEFAULT_DIR_PORT]));
|
|
||||||
// strlcpy(user_path, "mc0:/RETROARCH/data/retroarch", sizeof(user_path));
|
|
||||||
fill_pathname_join(g_defaults.dirs[DEFAULT_DIR_CORE], g_defaults.dirs[DEFAULT_DIR_PORT],
|
fill_pathname_join(g_defaults.dirs[DEFAULT_DIR_CORE], g_defaults.dirs[DEFAULT_DIR_PORT],
|
||||||
"CORES", sizeof(g_defaults.dirs[DEFAULT_DIR_CORE]));
|
"CORES", sizeof(g_defaults.dirs[DEFAULT_DIR_CORE]));
|
||||||
fill_pathname_join(g_defaults.dirs[DEFAULT_DIR_CORE_INFO], g_defaults.dirs[DEFAULT_DIR_PORT],
|
fill_pathname_join(g_defaults.dirs[DEFAULT_DIR_CORE_INFO], g_defaults.dirs[DEFAULT_DIR_PORT],
|
||||||
|
@ -222,7 +222,12 @@ int64_t retro_vfs_file_seek_internal(libretro_vfs_implementation_file *stream, i
|
|||||||
#elif defined(__CELLOS_LV2__) || defined(_MSC_VER) && _MSC_VER <= 1310
|
#elif defined(__CELLOS_LV2__) || defined(_MSC_VER) && _MSC_VER <= 1310
|
||||||
return fseek(stream->fp, (long)offset, whence);
|
return fseek(stream->fp, (long)offset, whence);
|
||||||
#elif defined(PS2)
|
#elif defined(PS2)
|
||||||
return fioLseek(fileno(stream->fp), (off_t)offset, whence);
|
int64_t ret = fioLseek(fileno(stream->fp), (off_t)offset, whence);
|
||||||
|
/* fioLseek could return positive numbers */
|
||||||
|
if (ret > 0) {
|
||||||
|
ret = 0;
|
||||||
|
}
|
||||||
|
return ret;
|
||||||
#elif defined(ORBIS)
|
#elif defined(ORBIS)
|
||||||
int ret = orbisLseek(stream->fd, offset, whence);
|
int ret = orbisLseek(stream->fd, offset, whence);
|
||||||
if (ret < 0)
|
if (ret < 0)
|
||||||
@ -924,9 +929,9 @@ int retro_vfs_mkdir_impl(const char *dir)
|
|||||||
#elif defined(VITA) || defined(PSP)
|
#elif defined(VITA) || defined(PSP)
|
||||||
int ret = sceIoMkdir(dir, 0777);
|
int ret = sceIoMkdir(dir, 0777);
|
||||||
#elif defined(PS2)
|
#elif defined(PS2)
|
||||||
int ret =fileXioMkdir(dir, 0777);
|
int ret = fileXioMkdir(dir, 0777);
|
||||||
#elif defined(ORBIS)
|
#elif defined(ORBIS)
|
||||||
int ret =orbisMkdir(dir, 0755);
|
int ret = orbisMkdir(dir, 0755);
|
||||||
#elif defined(__QNX__)
|
#elif defined(__QNX__)
|
||||||
int ret = mkdir(dir, 0777);
|
int ret = mkdir(dir, 0777);
|
||||||
#else
|
#else
|
||||||
|
Loading…
x
Reference in New Issue
Block a user