File: 03_rom-search-path.patch

package info (click to toggle)
fuse-emulator 1.0.0.1a%2Bdfsg1-4
  • links: PTS
  • area: main
  • in suites: wheezy
  • size: 9,568 kB
  • sloc: ansic: 67,895; sh: 10,265; perl: 3,386; makefile: 787; yacc: 227; lex: 139
file content (38 lines) | stat: -rw-r--r-- 1,273 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
From: Alberto Garcia <agarcia@igalia.com>
Description: New search paths for ROM files
 Add ~/.spectrum-roms and /usr/local/share/spectrum-roms to the ROM
 search path so users can install those not available in Debian.
 .
 See the README.Debian file for more details.
Forwarded: http://sourceforge.net/mailarchive/message.php?msg_id=27293756
Index: fuse-emulator/utils.c
===================================================================
--- fuse-emulator.orig/utils.c
+++ fuse-emulator/utils.c
@@ -346,8 +346,16 @@ get_next_path( path_context *ctx )
               path_segment );
     return 1;
 
-    /* Then where we may have installed the data files */
   case 2:
+    snprintf( ctx->path, PATH_MAX, "%s/.spectrum-roms", compat_get_home_path() );
+    return 1;
+
+  case 3:
+    strncpy( ctx->path, "/usr/local/share/spectrum-roms", PATH_MAX );
+    return 1;
+
+    /* Then where we may have installed the data files */
+  case 4:
 
 #ifdef GEKKO 
     path2 = "sd:/apps/fuse";
@@ -361,7 +369,7 @@ get_next_path( path_context *ctx )
     strncpy( ctx->path, path2, PATH_MAX ); buffer[ PATH_MAX - 1 ] = '\0';
     return 1;
 
-  case 3: return 0;
+  case 5: return 0;
   }
   ui_error( UI_ERROR_ERROR, "unknown path_context state %d", ctx->state );
   fuse_abort();