mirror of
https://github.com/termux/termux-packages.git
synced 2024-11-11 13:09:18 +00:00
86 lines
2.7 KiB
Diff
86 lines
2.7 KiB
Diff
--- a/frontend/main.c 2023-01-14 16:15:08.053589352 -0300
|
|
+++ b/frontend/main.c 2023-01-17 15:57:47.596011448 -0300
|
|
@@ -57,9 +57,9 @@
|
|
static void make_path(char *buf, size_t size, const char *dir, const char *fname)
|
|
{
|
|
if (fname)
|
|
- snprintf(buf, size, ".%s%s", dir, fname);
|
|
+ snprintf(buf, size, "%s%s", dir, fname);
|
|
else
|
|
- snprintf(buf, size, ".%s", dir);
|
|
+ snprintf(buf, size, "%s", dir);
|
|
}
|
|
#define MAKE_PATH(buf, dir, fname) \
|
|
make_path(buf, sizeof(buf), dir, fname)
|
|
@@ -103,13 +104,13 @@
|
|
static void set_default_paths(void)
|
|
{
|
|
#ifndef NO_FRONTEND
|
|
- snprintf(Config.PatchesDir, sizeof(Config.PatchesDir), "." PATCHES_DIR);
|
|
+ snprintf(Config.PatchesDir, sizeof(Config.PatchesDir), PATCHES_DIR);
|
|
MAKE_PATH(Config.Mcd1, MEMCARD_DIR, "card1.mcd");
|
|
MAKE_PATH(Config.Mcd2, MEMCARD_DIR, "card2.mcd");
|
|
- strcpy(Config.BiosDir, "bios");
|
|
+ strcpy(Config.BiosDir, PCSX_DOT_DIR "bios");
|
|
#endif
|
|
|
|
- strcpy(Config.PluginsDir, "plugins");
|
|
+ strcpy(Config.PluginsDir, PCSX_DOT_DIR "plugins");
|
|
strcpy(Config.Gpu, "builtin_gpu");
|
|
strcpy(Config.Spu, "builtin_spu");
|
|
strcpy(Config.Cdr, "builtin_cdr");
|
|
@@ -246,7 +247,7 @@
|
|
|
|
scrbuf = pl_prepare_screenshot(&w, &h, &bpp);
|
|
get_gameid_filename(buf, sizeof(buf),
|
|
- "screenshots/%.32s-%.9s.%d.png", ti);
|
|
+ SCREENSHOTS_DIR "%.32s-%.9s.%d.png", ti);
|
|
ret = -1;
|
|
if (scrbuf != 0 && bpp == 16)
|
|
ret = writepng(buf, scrbuf, w, h);
|
|
@@ -483,7 +484,7 @@
|
|
create_profile_dir(CHEATS_DIR);
|
|
create_profile_dir(PATCHES_DIR);
|
|
create_profile_dir(PCSX_DOT_DIR "cfg");
|
|
- create_profile_dir("/screenshots/");
|
|
+ create_profile_dir(SCREENSHOTS_DIR);
|
|
}
|
|
|
|
static void check_memcards(void)
|
|
@@ -493,7 +494,7 @@
|
|
int i;
|
|
|
|
for (i = 1; i <= 9; i++) {
|
|
- snprintf(buf, sizeof(buf), ".%scard%d.mcd", MEMCARD_DIR, i);
|
|
+ snprintf(buf, sizeof(buf), "%scard%d.mcd", MEMCARD_DIR, i);
|
|
|
|
f = fopen(buf, "rb");
|
|
if (f == NULL) {
|
|
@@ -596,7 +597,7 @@
|
|
// FIXME: this recovery doesn't work, just delete bad config and bail out
|
|
// SysMessage("could not load plugins, retrying with defaults\n");
|
|
set_default_paths();
|
|
- snprintf(path, sizeof(path), "." PCSX_DOT_DIR "%s", cfgfile_basename);
|
|
+ snprintf(path, sizeof(path), PCSX_DOT_DIR "%s", cfgfile_basename);
|
|
remove(path);
|
|
SysMessage("Failed loading plugins!");
|
|
return 1;
|
|
@@ -753,7 +754,7 @@
|
|
|
|
int get_state_filename(char *buf, int size, int i) {
|
|
return get_gameid_filename(buf, size,
|
|
- "." STATES_DIR "%.32s-%.9s.%3.3d", i);
|
|
+ STATES_DIR "%.32s-%.9s.%3.3d", i);
|
|
}
|
|
|
|
int emu_check_state(int slot)
|
|
@@ -876,7 +877,7 @@
|
|
char path[MAXPATHLEN];
|
|
char dotdir[MAXPATHLEN];
|
|
|
|
- MAKE_PATH(dotdir, "/.pcsx/plugins/", NULL);
|
|
+ MAKE_PATH(dotdir, PCSX_DOT_DIR "plugins/", NULL);
|
|
|
|
strcpy(info.EmuName, "PCSX");
|
|
strncpy(info.CdromID, CdromId, 9);
|