]> git.pld-linux.org Git - packages/Atari800.git/blame - Atari800-romdir.patch
- added romdir patch (don't scan PWD and /usr/bin, just /usr/share/atari800 and ...
[packages/Atari800.git] / Atari800-romdir.patch
CommitLineData
b5c8cf13
JB
1--- atari800-4.2.0/src/atari.c.orig 2019-12-28 18:00:29.000000000 +0100
2+++ atari800-4.2.0/src/atari.c 2021-01-13 19:52:18.770209441 +0100
3@@ -423,24 +423,19 @@
4 /* try to find ROM images if the configuration file is not found
5 or it does not specify some ROM paths (blank paths count as specified) */
6 #ifndef ANDROID
7- SYSROM_FindInDir(".", TRUE); /* current directory */
8 #if defined(unix) || defined(__unix__) || defined(__linux__)
9 SYSROM_FindInDir("/usr/share/atari800", TRUE);
10+#else
11+ SYSROM_FindInDir(".", TRUE); /* current directory */
12 #endif
13- if (*argc > 0 && argv[0] != NULL) {
14- char atari800_exe_dir[FILENAME_MAX];
15- char atari800_exe_rom_dir[FILENAME_MAX];
16- /* the directory of the Atari800 program */
17- Util_splitpath(argv[0], atari800_exe_dir, NULL);
18- SYSROM_FindInDir(atari800_exe_dir, TRUE);
19- /* "rom" and "ROM" subdirectories of this directory */
20- Util_catpath(atari800_exe_rom_dir, atari800_exe_dir, "rom");
21- SYSROM_FindInDir(atari800_exe_rom_dir, TRUE);
22-/* skip "ROM" on systems that are known to be case-insensitive */
23-#if !defined(DJGPP) && !defined(HAVE_WINDOWS_H)
24- Util_catpath(atari800_exe_rom_dir, atari800_exe_dir, "ROM");
25- SYSROM_FindInDir(atari800_exe_rom_dir, TRUE);
26-#endif
27+ {
28+ char rom_dir[FILENAME_MAX];
29+ char *home = getenv("HOME");
30+ if (home != NULL)
31+ Util_catpath(rom_dir, home, ".atari800");
32+ else
33+ strcpy(rom_dir, ".atari800");
34+ SYSROM_FindInDir(rom_dir, TRUE);
35 }
36 #endif /* ANDROID */
37
This page took 0.064474 seconds and 4 git commands to generate.