Skip to content

Commit 93a37bd

Browse files
zoltanvbLibretroAdmin
authored andcommitted
Small fixes for DOS
Adjusting a few definitions to help the DOS version. It is still not really operational, but these changes cause no harm elsewhere.
1 parent d79d2de commit 93a37bd

File tree

3 files changed

+11
-2
lines changed

3 files changed

+11
-2
lines changed

core_info.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2118,7 +2118,7 @@ static core_info_list_t *core_info_list_new(const char *path,
21182118
info->core_file_id.str = strdup(core_file_id);
21192119
info->core_file_id.hash = core_info_hash_string(core_file_id);
21202120

2121-
strlcpy(core_file_id + _len, ".info", sizeof(core_file_id) - _len);
2121+
strlcpy(core_file_id + _len, FILE_PATH_CORE_INFO_EXTENSION, sizeof(core_file_id) - _len);
21222122

21232123
/* Parse core info file */
21242124
if ((conf = core_info_get_config_file(core_file_id, info_dir)))

file_path_special.h

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,11 @@ RETRO_BEGIN_DECLS
3939
#define FILE_PATH_AUTO_EXTENSION ".auto"
4040
#define FILE_PATH_BSV_EXTENSION ".replay"
4141
#define FILE_PATH_OPT_EXTENSION ".opt"
42+
#ifdef DJGPP
43+
#define FILE_PATH_CORE_INFO_EXTENSION ".inf"
44+
#else
4245
#define FILE_PATH_CORE_INFO_EXTENSION ".info"
46+
#endif
4347
#define FILE_PATH_CONFIG_EXTENSION ".cfg"
4448
#define FILE_PATH_REMAP_EXTENSION ".rmp"
4549
#define FILE_PATH_RTC_EXTENSION ".rtc"
@@ -91,8 +95,13 @@ RETRO_BEGIN_DECLS
9195
#define FILE_PATH_CONTENT_MUSIC_HISTORY "content_music_history.lpl"
9296
#define FILE_PATH_CONTENT_VIDEO_HISTORY "content_video_history.lpl"
9397
#define FILE_PATH_CORE_OPTIONS_CONFIG "retroarch-core-options.cfg"
98+
#ifdef DJGPP
99+
#define FILE_PATH_MAIN_CONFIG "retrodos.cfg"
100+
#define FILE_PATH_SALAMANDER_CONFIG "retrosal.cfg"
101+
#else
94102
#define FILE_PATH_MAIN_CONFIG "retroarch.cfg"
95103
#define FILE_PATH_SALAMANDER_CONFIG "retroarch-salamander.cfg"
104+
#endif
96105
#define FILE_PATH_BACKGROUND_IMAGE "bg.png"
97106
#define FILE_PATH_TTF_FONT "font.ttf"
98107
#define FILE_PATH_RUNTIME_EXTENSION ".lrtl"

frontend/drivers/platform_dos.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ static void frontend_dos_get_env_settings(int *argc, char *argv[],
5858
if ((slash = strrchr(base_path, '/')))
5959
*slash = '\0';
6060
slash = strrchr(base_path, '/');
61-
if (slash && strcasecmp(slash, "/cores"))
61+
if (slash && strcasecmp(slash, "/cores") == 0)
6262
*slash = '\0';
6363

6464
fill_pathname_join(g_defaults.dirs[DEFAULT_DIR_CORE], base_path,

0 commit comments

Comments
 (0)