mirror of
https://github.com/libretro/blastem.git
synced 2026-11-07 10:15:58 -10:00
Close an SMD ROM's file once, and report the version this core is built from (#71)
* Close an SMD ROM's file once, not twice Upstream d22b34e78040, "Fix regression in SMD ROM loading", and it is a real one here too: load_smd_rom() closes the handle itself at its end, and load_media() then closed the same handle again in the tail both paths share. Every .smd ROM went through that, and .smd is in the core's valid_extensions. The close moves into the branch that still has the file open, which is what upstream did, so each path closes exactly once. * Report the version this core is actually built from The core told the frontend 0.6.3-pre. Upstream cut 1.0.0 - Mega CD, 32X, Pico, Game Gear, SC-3000, Colecovision, the Nuklear UI rework, all of it - and its tip is 1.0.1-pre, so this tree carries that work under a version string from two releases ago. A user reading "BlastEm 0.6.3-pre" in the core information screen has no way to tell which of those systems the core is even supposed to run. DM noticed it. Nothing else to take from that report: the 32X BIOS paths he mentioned are already here, with the laseractive and TMSS ones beside them, and upstream has only now caught up with that.
This commit is contained in:
1 parent
f1bc932187
commit
542164dc99
2 files changed
+5
-2
No files matched your search
@@ -293,6 +293,10 @@ uint32_t load_media(char * filename, system_media *dst, system_type *stype)
|
||||
} while (read > 0);
|
||||
dst->buffer = buf;
|
||||
ret = (uint32_t)readsize;
|
||||
// Only this path still has the file open: load_smd_rom() above closes
|
||||
// it itself, and closing it again below was a second close of the same
|
||||
// handle for every .smd ROM. Upstream d22b34e78040.
|
||||
romclose(f);
|
||||
}
|
||||
dst->dir = path_dirname(filename);
|
||||
if (!dst->dir) {
|
||||
@@ -301,7 +305,6 @@ uint32_t load_media(char * filename, system_media *dst, system_type *stype)
|
||||
dst->name = basename_no_extension(filename);
|
||||
dst->extension = ext;
|
||||
dst->size = ret;
|
||||
romclose(f);
|
||||
if (!strcasecmp(dst->extension, "cue")) {
|
||||
if (parse_cue(dst)) {
|
||||
ret = dst->size;
|
||||
|
||||
+1
-1
@@ -1 +1 @@
|
||||
#define BLASTEM_VERSION "0.6.3-pre"
|
||||
#define BLASTEM_VERSION "1.0.1-pre"
|
||||
Reference in new issue
Block a user