Skip to content

Commit

Permalink
Merge pull request joncampbell123#5200 from Allofich/gog
Browse files Browse the repository at this point in the history
Allow the ".inst" extension for CUE sheets.
  • Loading branch information
joncampbell123 authored Sep 10, 2024
2 parents 258f2bd + 6ca2474 commit 85ba4e1
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 6 deletions.
1 change: 1 addition & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
NEXT
- Allow the ".inst" extension for CUE sheets. (Allofich)
- Add SET /FIRST, a DOSBox-X extension, that takes the specified
variable if it exists and moves it to the front of the environment
block. (joncampbell123).
Expand Down
2 changes: 1 addition & 1 deletion src/dos/cdrom_image.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1302,7 +1302,7 @@ bool CDROM_Interface_Image::LoadCueSheet(char *cuefile)
{
char *s = strrchr(cuefile,'.');
if (!s) return false;
if (!strcasecmp(s,".ccd") || !strcasecmp(s, ".chd") || !strcasecmp(s, ".iso") || !strcasecmp(s, ".img")
if (!strcasecmp(s,".ccd") || !strcasecmp(s, ".chd") || !strcasecmp(s, ".iso") || !strcasecmp(s, ".img") || !strcasecmp(s, ".gog")
|| !strcasecmp(s, ".mds") || !strcasecmp(s, ".mdf") || !strcasecmp(s, ".bin")) return false;
}

Expand Down
10 changes: 5 additions & 5 deletions src/dos/dos_programs.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -549,8 +549,8 @@ void MenuBrowseCDImage(char drive, int num) {
getcwd(Temp_CurrentDir, 512);
char const * lTheOpenFileName;
std::string files="", fname="";
const char *lFilterPatterns[] = {"*.iso","*.cue","*.bin","*.chd","*.mdf","*.gog","*.ins","*.ISO","*.CUE","*.BIN","*.CHD","*.MDF","*.GOG","*.INS"};
const char *lFilterDescription = "CD image files (*.iso, *.cue, *.bin, *.chd, *.mdf, *.gog, *.ins)";
const char *lFilterPatterns[] = {"*.iso","*.cue","*.bin","*.chd","*.mdf","*.gog","*.ins","*.inst","*.ISO","*.CUE","*.BIN","*.CHD","*.MDF","*.GOG","*.INS","*.INST" };
const char *lFilterDescription = "CD image files (*.iso, *.cue, *.bin, *.chd, *.mdf, *.gog, *.ins, *.inst)";
lTheOpenFileName = tinyfd_openFileDialog("Select a CD image file","", sizeof(lFilterPatterns) / sizeof(lFilterPatterns[0]),lFilterPatterns,lFilterDescription,0);

if (lTheOpenFileName) {
Expand Down Expand Up @@ -657,7 +657,7 @@ void MenuBrowseImageFile(char drive, bool arc, bool boot, bool multiple) {
lTheOpenFileName = tinyfd_openFileDialog(("Select an archive file for Drive "+str+":").c_str(),"", sizeof(lFilterPatterns) / sizeof(lFilterPatterns[0]),lFilterPatterns,lFilterDescription,0);
if (lTheOpenFileName) fname = GetNewStr(lTheOpenFileName);
} else {
const char *lFilterPatterns[] = {"*.ima","*.img","*.vhd","*.fdi","*.hdi","*.nfd","*.nhd","*.d88","*.hdm","*.xdf","*.iso","*.cue","*.bin","*.chd","*.mdf","*.gog","*.ins","*.ccd","*.IMA","*.IMG","*.VHD","*.FDI","*.HDI","*.NFD","*.NHD","*.D88","*.HDM","*.XDF","*.ISO","*.CUE","*.BIN","*.CHD","*.MDF","*.GOG","*.INS", "*.CCD"};
const char *lFilterPatterns[] = {"*.ima","*.img","*.vhd","*.fdi","*.hdi","*.nfd","*.nhd","*.d88","*.hdm","*.xdf","*.iso","*.cue","*.bin","*.chd","*.mdf","*.gog","*.ins","*.ccd","*.inst","*.IMA","*.IMG","*.VHD","*.FDI","*.HDI","*.NFD","*.NHD","*.D88","*.HDM","*.XDF","*.ISO","*.CUE","*.BIN","*.CHD","*.MDF","*.GOG","*.INS","*.CCD","*.INST"};
const char *lFilterDescription = "Disk/CD image files";
lTheOpenFileName = tinyfd_openFileDialog(((multiple?"Select image file(s) for Drive ":"Select an image file for Drive ")+str+":").c_str(),"", sizeof(lFilterPatterns) / sizeof(lFilterPatterns[0]),lFilterPatterns,lFilterDescription,multiple?1:0);
if (lTheOpenFileName) fname = GetNewStr(lTheOpenFileName);
Expand Down Expand Up @@ -687,7 +687,7 @@ void MenuBrowseImageFile(char drive, bool arc, bool boot, bool multiple) {
strcpy(ext, fname.substr(fname.size()-4).c_str());
if(!strcasecmp(ext,".ima"))
strcpy(type,"-t floppy ");
else if((!strcasecmp(ext,".iso")) || (!strcasecmp(ext,".cue")) || (!strcasecmp(ext,".bin")) || (!strcasecmp(ext,".chd")) || (!strcasecmp(ext,".mdf")) || (!strcasecmp(ext,".gog")) || (!strcasecmp(ext,".ins")))
else if((!strcasecmp(ext,".iso")) || (!strcasecmp(ext,".cue")) || (!strcasecmp(ext,".bin")) || (!strcasecmp(ext,".chd")) || (!strcasecmp(ext,".mdf")) || (!strcasecmp(ext,".gog")) || (!strcasecmp(ext,".ins")) || (!strcasecmp(ext, ".inst")))
strcpy(type,"-t iso ");
else
strcpy(type,"");
Expand Down Expand Up @@ -5463,7 +5463,7 @@ class IMGMOUNT : public Program {
if (!rtype&&!rfstype&&fstype!="none"&&paths[0].length()>4) {
const char *ext = strrchr(paths[0].c_str(), '.');
if (ext != NULL) {
if (!strcasecmp(ext, ".iso")||!strcasecmp(ext, ".cue")||!strcasecmp(ext, ".bin")||!strcasecmp(ext, ".chd")||!strcasecmp(ext, ".mdf")||!strcasecmp(ext, ".gog")||!strcasecmp(ext, ".ins")||!strcasecmp(ext, ".ccd")) {
if (!strcasecmp(ext, ".iso")||!strcasecmp(ext, ".cue")||!strcasecmp(ext, ".bin")||!strcasecmp(ext, ".chd")||!strcasecmp(ext, ".mdf")||!strcasecmp(ext, ".gog")||!strcasecmp(ext, ".ins")||!strcasecmp(ext, ".ccd")||!strcasecmp(ext, ".inst")) {
type="iso";
fstype="iso";
if(ide_index < 0 || ideattach == "auto") {
Expand Down

0 comments on commit 85ba4e1

Please sign in to comment.