Mercurial > repos > blastem
comparison blastem.c @ 2262:bc68560b4a04
Fix bug when loading cue sheet without leading path
author | Michael Pavone <pavone@retrodev.com> |
---|---|
date | Fri, 23 Dec 2022 06:23:41 -0800 |
parents | 1e626d0ecf9c |
children | 5d3411f52d00 |
comparison
equal
deleted
inserted
replaced
2261:86dfcf3f418a | 2262:bc68560b4a04 |
---|---|
21 #include "render.h" | 21 #include "render.h" |
22 #include "genesis.h" | 22 #include "genesis.h" |
23 #include "gdb_remote.h" | 23 #include "gdb_remote.h" |
24 #include "gst.h" | 24 #include "gst.h" |
25 #include "util.h" | 25 #include "util.h" |
26 #include "paths.h" | |
26 #include "romdb.h" | 27 #include "romdb.h" |
27 #include "terminal.h" | 28 #include "terminal.h" |
28 #include "arena.h" | 29 #include "arena.h" |
29 #include "config.h" | 30 #include "config.h" |
30 #include "bindings.h" | 31 #include "bindings.h" |
165 } | 166 } |
166 out_size = offset; | 167 out_size = offset; |
167 } | 168 } |
168 dst->extension = ext; | 169 dst->extension = ext; |
169 dst->dir = path_dirname(filename); | 170 dst->dir = path_dirname(filename); |
171 if (!dst->dir) { | |
172 dst->dir = path_current_dir(); | |
173 } | |
170 dst->name = basename_no_extension(filename); | 174 dst->name = basename_no_extension(filename); |
171 dst->size = out_size; | 175 dst->size = out_size; |
172 zip_close(z); | 176 zip_close(z); |
173 return out_size; | 177 return out_size; |
174 } | 178 } |
251 } while (read > 0); | 255 } while (read > 0); |
252 dst->buffer = buf; | 256 dst->buffer = buf; |
253 ret = (uint32_t)readsize; | 257 ret = (uint32_t)readsize; |
254 } | 258 } |
255 dst->dir = path_dirname(filename); | 259 dst->dir = path_dirname(filename); |
260 if (!dst->dir) { | |
261 dst->dir = path_current_dir(); | |
262 } | |
256 dst->name = basename_no_extension(filename); | 263 dst->name = basename_no_extension(filename); |
257 dst->extension = ext; | 264 dst->extension = ext; |
258 dst->size = ret; | 265 dst->size = ret; |
259 romclose(f); | 266 romclose(f); |
260 if (!strcasecmp(dst->extension, "cue")) { | 267 if (!strcasecmp(dst->extension, "cue")) { |