projects
/
drnoksnes
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b08ec75
)
fixed basename when using .gz roms
author
Javier S. Pedro
<maemo@javispedro.com>
Mon, 7 Sep 2009 00:15:28 +0000
(
02:15
+0200)
committer
Javier S. Pedro
<maemo@javispedro.com>
Mon, 7 Sep 2009 00:15:28 +0000
(
02:15
+0200)
platform/config.cpp
patch
|
blob
|
history
diff --git
a/platform/config.cpp
b/platform/config.cpp
index
f25a259
..
151feee
100644
(file)
--- a/
platform/config.cpp
+++ b/
platform/config.cpp
@@
-226,7
+226,16
@@
void S9xSetRomFile(const char * path)
// Truncate base path at the last '.' char
char * c = strrchr(basePath, '.');
if (c) {
- *c = '\0';
+ if (strcasecmp(c, ".gz") == 0) {
+ // Ignore the .gz part when truncating
+ *c = '\0';
+ c = strrchr(basePath, '.');
+ if (c) {
+ *c = '\0';
+ }
+ } else {
+ *c = '\0';
+ }
}
}