imgmount drag-drop patch

Here you can discuss the development of patches.

imgmount drag-drop patch

Postby rcblanke » 2009-6-14 @ 14:58

Hi,

Here's a simple patch to provide automatic iso/cue file imgmounting, when dragging a CD image onto a DOSBox shortcut (as long as the filename is in 8.3 format).

Mods, would you be as kind to move it to the patches section?

Code: Select all
Index: shell.cpp
===================================================================
RCS file: /cvsroot/dosbox/dosbox/src/shell/shell.cpp,v
retrieving revision 1.99
diff -c -r1.99 shell.cpp
*** shell.cpp   14 May 2009 18:44:54 -0000   1.99
--- shell.cpp   14 Jun 2009 12:23:58 -0000
***************
*** 412,417 ****
--- 412,422 ----
                 //No secure mode here as boot is destructive and enabling securemode disables boot
                 /* Boot image files */
                 autoexec[15].Install(std::string("BOOT ") + name);
+             } else if((strstr(name,".ISO") != 0) || (strstr(name,".CUE") !=0)) {
+           if(secure) autoexec[14].Install("z:\\config.com -securemode");
+                /* imgmount CD image files */
+                autoexec[15].Install(std::string("IMGMOUNT D \"") + name + std::string("\" -t iso"));
+                autoexec[16].Install("D:");
              } else {
                 if(secure) autoexec[14].Install("z:\\config.com -securemode");
                 autoexec[15].Install(name);


Regards,
Ronald
User avatar
rcblanke
Oldbie
 
Posts: 1308
Joined: 2005-4-01 @ 09:44
Location: Round 42

Re: imgmount drag-drop patch

Postby MiniMax » 2009-6-14 @ 16:32

Moved.
DOSBox 0.73 ReadMe | DOSBox Wiki | DOSBox 60 seconds guide | How to ask questions
_________________
Lenovo M58p | Core 2 Quad Q8400 @ 2.66 GHz | Radeon R7 240 | LG HL-DT-ST DVDRAM GH40N | Win 10 Pro
User avatar
MiniMax
Moderator
 
Posts: 5128
Joined: 2004-1-18 @ 04:15
Location: Stockholm, Sweden, Europe, Earth Interests: Old games & young women


Return to DOSBox Patches

Who is online

Users browsing this forum: No registered users and 2 guests