Browse Source

searches for bios in rom_path and <rom_path>/bios folders

Vincent-FK 3 years ago
parent
commit
99b133f312
1 changed files with 18 additions and 1 deletions
  1. 18 1
      platform/common/emu.c

+ 18 - 1
platform/common/emu.c

@@ -221,8 +221,25 @@ static const char *find_bios(int *region, const char *cd_fname)
 		if (f) break;
 	}
 
+	/** Check Bios files in <rom path>/bios */
+	if(!f){
+		for (i = 0; i < count; i++)
+		{
+			sprintf(static_buff, "%s/bios/%s", mRomPath, files[i]);
+			printf("static_buff: %s\n", static_buff);
+			strcat(static_buff, ".bin");
+			f = fopen(static_buff, "rb");
+			if (f) break;
+
+			static_buff[strlen(static_buff) - 4] = 0;
+			strcat(static_buff, ".zip");
+			f = fopen(static_buff, "rb");
+			if (f) break;
+		}
+	}
+
+	/** Check Bios files in rom path */
 	if(!f){
-		/** Check Bios files in rom path */
 		for (i = 0; i < count; i++)
 		{
 			sprintf(static_buff, "%s/%s", mRomPath, files[i]);