Skip to content

Commit

Permalink
Show files larger than 4GB in the [ Run Installed Operating System ] …
Browse files Browse the repository at this point in the history
…menu (#280)
  • Loading branch information
schellingb committed Jul 6, 2022
1 parent 97cab1b commit cab2031
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion dosbox_pure_libretro.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3283,7 +3283,7 @@ static void set_variables(bool force_midi_scan = false)
int32_t entry_size = 0;
std::string subpath = path.assign(subdir).append(subdir.length() ? "/" : "").append(entry_name);
FILE* f = fopen_wrap(path.assign(system_dir).append("/").append(subpath).c_str(), "rb");
size_t fsize = 0; if (f) { fseek(f, 0, SEEK_END); fsize = ftell(f); fclose(f); }
Bit64u fsize = 0; if (f) { fseek_wrap(f, 0, SEEK_END); fsize = (Bit64u)ftell_wrap(f); fclose(f); }
if (fsize < 1024*1024*7 || (fsize % 512)) continue; // min 7MB hard disk image made up of 512 byte sectors
dbp_osimages.push_back(subpath);
}
Expand Down

0 comments on commit cab2031

Please sign in to comment.