Support rarely used FCB feature: open file with search mask. Fixes Buckaroo Banzai.
Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@4096
This commit is contained in:
		
							parent
							
								
									a315f74074
								
							
						
					
					
						commit
						c7ced14d56
					
				
					 1 changed files with 14 additions and 0 deletions
				
			
		|  | @ -971,6 +971,20 @@ bool DOS_FCBOpen(Bit16u seg,Bit16u offset) { | |||
| 	char shortname[DOS_FCBNAME];Bit16u handle; | ||||
| 	fcb.GetName(shortname); | ||||
| 
 | ||||
| 	/* Search for file if name has wildcards */ | ||||
| 	if (strpbrk(shortname,"*?")) { | ||||
| 		LOG(LOG_FCB,LOG_WARN)("Wildcards in filename"); | ||||
| 		if (!DOS_FCBFindFirst(seg,offset)) return false; | ||||
| 		DOS_DTA find_dta(dos.tables.tempdta); | ||||
| 		DOS_FCB find_fcb(RealSeg(dos.tables.tempdta),RealOff(dos.tables.tempdta)); | ||||
| 		char name[DOS_NAMELENGTH_ASCII],file_name[9],ext[4]; | ||||
| 		Bit32u size;Bit16u date,time;Bit8u attr; | ||||
| 		find_dta.GetResult(name,size,date,time,attr); | ||||
| 		DTAExtendName(name,file_name,ext); | ||||
| 		find_fcb.SetName(fcb.GetDrive()+1,file_name,ext); | ||||
| 		find_fcb.GetName(shortname); | ||||
| 	} | ||||
| 
 | ||||
| 	/* First check if the name is correct */ | ||||
| 	Bit8u drive; | ||||
| 	char fullname[DOS_PATHLENGTH]; | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue