updated on Thu Jan 26 16:09:46 UTC 2012
[aur-mirror.git] / dosbox-svn-patched / multiimage.patch
bloba29f51f57d4b76127abbf1f60dd5dfa67f33ec8c
1 diff -urN dosbox.orig/src/dos/dos_programs.cpp dosbox/src/dos/dos_programs.cpp
2 --- dosbox.orig/src/dos/dos_programs.cpp 2011-01-14 20:33:18.467118657 -0300
3 +++ dosbox/src/dos/dos_programs.cpp 2011-01-14 20:34:14.943785324 -0300
4 @@ -1641,7 +1641,27 @@
5 if (paths.size() == 1)
6 temp_line = paths[0];
7 if (paths.size() > 1 && fstype != "iso") {
8 - WriteOut(MSG_Get("PROGRAM_IMGMOUNT_MULTIPLE_NON_CUEISO_FILES"));
9 + // create new drives for all floppy images wow
10 + std::vector<DOS_Drive*> imgDisks;
11 + std::vector<std::string>::size_type i;
12 + std::vector<DOS_Drive*>::size_type ct;
13 + for (i = 0; i < paths.size(); i++) {
14 + int error = -1;
15 + DOS_Drive* newDrive = new fatDrive(paths[i].c_str(),sizes[0],sizes[1],sizes[2],sizes[3],0);
16 + imgDisks.push_back(newDrive);
17 + }
19 + // Update DriveManager
20 + for(ct = 0; ct < imgDisks.size(); ct++) {
21 + DriveManager::AppendDisk(drive - 'A', imgDisks[ct]);
22 + }
23 + DriveManager::InitializeDrive(drive - 'A');
25 + // Set the correct media byte in the table
26 + mem_writeb(Real2Phys(dos.tables.mediaid) + (drive - 'A') * 2, mediaid);
28 + WriteOut("MULTI-FLOPPY IMAGE PATCH ACTIVE... \n");
29 + WriteOut(MSG_Get("PROGRAM_MOUNT_STATUS_2"), drive, temp_line.c_str());
30 return;