Remove dead code for force selecting CD drive
This commit is contained in:
		
							parent
							
								
									ac4411389b
								
							
						
					
					
						commit
						f82a0a46da
					
				
					 6 changed files with 14 additions and 20 deletions
				
			
		|  | @ -25,7 +25,7 @@ | |||
| #include "dosbox.h" | ||||
| #include "support.h" | ||||
| 
 | ||||
| int CDROM_GetMountType(char* path, int) { | ||||
| int CDROM_GetMountType(char* path) { | ||||
| // 1 - Iso file
 | ||||
| // 2 - subdirectory
 | ||||
| 
 | ||||
|  |  | |||
|  | @ -73,13 +73,13 @@ inline int msf_to_frames(int m, int s, int f) { | |||
| 	return m * 60 * REDBOOK_FRAMES_PER_SECOND + s * REDBOOK_FRAMES_PER_SECOND + f; | ||||
| } | ||||
| 
 | ||||
| extern int CDROM_GetMountType(char* path, int force); | ||||
| extern int CDROM_GetMountType(char* path); | ||||
| 
 | ||||
| class CDROM_Interface | ||||
| { | ||||
| public: | ||||
| 	virtual ~CDROM_Interface        (void) {}; | ||||
| 	virtual bool SetDevice          (char* path, int forceCD) = 0; | ||||
| 	virtual ~CDROM_Interface        (void) {} | ||||
| 	virtual bool SetDevice          (char *path) = 0; | ||||
| 	virtual bool GetUPC             (unsigned char& attr, char* upc) = 0; | ||||
| 	virtual bool GetAudioTracks     (int& stTrack, int& end, TMSF& leadOut) = 0; | ||||
| 	virtual bool GetAudioTrackInfo  (int track, TMSF& start, unsigned char& attr) = 0; | ||||
|  | @ -98,7 +98,7 @@ public: | |||
| class CDROM_Interface_Fake : public CDROM_Interface | ||||
| { | ||||
| public: | ||||
| 	bool SetDevice          (char* /*path*/, int /*forceCD*/) { return true; }; | ||||
| 	bool SetDevice          (char *) { return true; } | ||||
| 	bool GetUPC             (unsigned char& attr, char* upc) { attr = 0; strcpy(upc,"UPC"); return true; }; | ||||
| 	bool GetAudioTracks     (int& stTrack, int& end, TMSF& leadOut); | ||||
| 	bool GetAudioTrackInfo  (int track, TMSF& start, unsigned char& attr); | ||||
|  | @ -183,7 +183,7 @@ public: | |||
| 	CDROM_Interface_Image           (Bit8u _subUnit); | ||||
| 	virtual ~CDROM_Interface_Image  (void); | ||||
| 	void	InitNewMedia            (void); | ||||
| 	bool	SetDevice               (char* path, int forceCD); | ||||
| 	bool	SetDevice               (char *path); | ||||
| 	bool	GetUPC                  (unsigned char& attr, char* upc); | ||||
| 	bool	GetAudioTracks          (int& stTrack, int& end, TMSF& leadOut); | ||||
| 	bool	GetAudioTrackInfo       (int track, TMSF& start, unsigned char& attr); | ||||
|  |  | |||
|  | @ -263,9 +263,8 @@ void CDROM_Interface_Image::InitNewMedia() | |||
| { | ||||
| } | ||||
| 
 | ||||
| bool CDROM_Interface_Image::SetDevice(char* path, int forceCD) | ||||
| bool CDROM_Interface_Image::SetDevice(char* path) | ||||
| { | ||||
| 	(void)forceCD; // unused by part of the API
 | ||||
| 	if (LoadCueSheet(path) || | ||||
| 	    LoadIsoFile(path)) { | ||||
| 		return true; | ||||
|  |  | |||
|  | @ -47,8 +47,6 @@ | |||
| #define	REQUEST_STATUS_DONE		0x0100 | ||||
| #define	REQUEST_STATUS_ERROR	0x8000 | ||||
| 
 | ||||
| int forceCD				= -1; | ||||
| 
 | ||||
| static Bitu MSCDEX_Strategy_Handler(void);  | ||||
| static Bitu MSCDEX_Interrupt_Handler(void); | ||||
| 
 | ||||
|  | @ -250,7 +248,7 @@ int CMscdex::AddDrive(Bit16u _drive, char* physicalPath, Bit8u& subUnit) | |||
| 	// Set return type to ok
 | ||||
| 	int result = 0; | ||||
| 	// Get Mounttype and init needed cdrom interface
 | ||||
| 	switch (CDROM_GetMountType(physicalPath,forceCD)) { | ||||
| 	switch (CDROM_GetMountType(physicalPath)) { | ||||
| 	case 0x00: | ||||
| 		LOG(LOG_MISC,LOG_NORMAL)("MSCDEX: Mounting physical cdrom: %s"	,physicalPath); | ||||
| 		// TODO: support for mounting physical CD-ROMs removed, provide
 | ||||
|  | @ -270,7 +268,7 @@ int CMscdex::AddDrive(Bit16u _drive, char* physicalPath, Bit8u& subUnit) | |||
| 		return 6; | ||||
| 	}; | ||||
| 
 | ||||
| 	if (!cdrom[numDrives]->SetDevice(physicalPath,forceCD)) { | ||||
| 	if (!cdrom[numDrives]->SetDevice(physicalPath)) { | ||||
| //		delete cdrom[numDrives] ; mount seems to delete it
 | ||||
| 		return 3; | ||||
| 	} | ||||
|  | @ -1297,10 +1295,6 @@ bool MSCDEX_HasMediaChanged(Bit8u subUnit) | |||
| 	return true; | ||||
| } | ||||
| 
 | ||||
| void MSCDEX_SetCDInterface(int, int numCD) { | ||||
| 	forceCD	= numCD; | ||||
| } | ||||
| 
 | ||||
| void MSCDEX_ShutDown(Section* /*sec*/) { | ||||
| 	delete mscdex; | ||||
| 	mscdex = 0; | ||||
|  |  | |||
|  | @ -51,7 +51,6 @@ | |||
| Bitu DEBUG_EnableDebugger(void); | ||||
| #endif | ||||
| 
 | ||||
| void MSCDEX_SetCDInterface(int intNr, int forceCD); | ||||
| static Bitu ZDRIVE_NUM = 25; | ||||
| 
 | ||||
| static const char* UnmountHelper(char umount) { | ||||
|  | @ -323,12 +322,15 @@ public: | |||
| 			if (type=="cdrom") { | ||||
| 				int num = -1; | ||||
| 				cmd->FindInt("-usecd",num,true); | ||||
| 				// TODO: 
 | ||||
| 				// if (num >= 0)
 | ||||
| 				//     WriteOut warning, -usecd ignored, no physical CD support
 | ||||
| 				int error = 0; | ||||
| 				if (cmd->FindExist("-ioctl", false)) { | ||||
| 					WriteOut(MSG_Get("MSCDEX_WARNING_IOCTL")); | ||||
| 				} | ||||
| 				if (cmd->FindExist("-noioctl", false)) { | ||||
| 					MSCDEX_SetCDInterface(0, num); | ||||
| 					WriteOut(MSG_Get("MSCDEX_WARNING_IOCTL")); | ||||
| 				} | ||||
| 				newdrive  = new cdromDrive(drive,temp_line.c_str(),sizes[0],bit8size,sizes[2],0,mediaid,error); | ||||
| 				// Check Mscdex, if it worked out...
 | ||||
|  | @ -1411,7 +1413,6 @@ public: | |||
| 				return; | ||||
| 			} | ||||
| 
 | ||||
| 			MSCDEX_SetCDInterface(0, -1); | ||||
| 			// create new drives for all images
 | ||||
| 			std::vector<DOS_Drive*> isoDisks; | ||||
| 			std::vector<std::string>::size_type i; | ||||
|  |  | |||
|  | @ -187,7 +187,7 @@ int isoDrive::UpdateMscdex(char driveLetter, const char* path, Bit8u& subUnit) { | |||
| 		CDROM_Interface* cdrom = new CDROM_Interface_Image(subUnit); | ||||
| 		char pathCopy[CROSS_LEN]; | ||||
| 		safe_strncpy(pathCopy, path, CROSS_LEN); | ||||
| 		if (!cdrom->SetDevice(pathCopy, 0)) { | ||||
| 		if (!cdrom->SetDevice(pathCopy)) { | ||||
| 			CDROM_Interface_Image::images[subUnit] = oldCdrom; | ||||
| 			delete cdrom; | ||||
| 			return 3; | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue