mirror of
https://github.com/LIV2/WinUAE.git
synced 2025-12-06 00:12:52 +00:00
Check also normal ROM path for Munt ROMs. Keep checking other paths if first path existed but didn't have all required ROMs.
This commit is contained in:
parent
5f4df5d3c4
commit
15fd9b73eb
49
midiemu.cpp
49
midiemu.cpp
@ -132,33 +132,38 @@ bool midi_emu_available(const TCHAR *id)
|
||||
return false;
|
||||
}
|
||||
|
||||
fetch_rompath(path, sizeof(path) / sizeof(TCHAR));
|
||||
_tcscat(path, _T("mt32-roms\\"));
|
||||
if (!my_existsdir(path)) {
|
||||
_tcscpy(path, _T("C:\\mt32-rom-data\\"));
|
||||
}
|
||||
if (!my_existsdir(path)) {
|
||||
return false;
|
||||
}
|
||||
if (me == 1) {
|
||||
if (!check_rom(path, _T("pcm_mt32")) && !check_rom(path, _T("mt32_pcm"))) {
|
||||
if (!check_rom(path, _T("pcm_mt32_l")) || !check_rom(path, _T("pcm_mt32_h"))) {
|
||||
return false;
|
||||
for (int rc = 0; rc < 3; rc++) {
|
||||
if (rc == 0) {
|
||||
fetch_rompath(path, sizeof(path) / sizeof(TCHAR));
|
||||
} else if (rc == 1) {
|
||||
fetch_rompath(path, sizeof(path) / sizeof(TCHAR));
|
||||
_tcscat(path, _T("mt32-roms\\"));
|
||||
} else if (rc == 2) {
|
||||
_tcscpy(path, _T("C:\\mt32-rom-data\\"));
|
||||
}
|
||||
if (!my_existsdir(path)) {
|
||||
continue;
|
||||
}
|
||||
if (me == 1) {
|
||||
if (!check_rom(path, _T("pcm_mt32")) && !check_rom(path, _T("mt32_pcm"))) {
|
||||
if (!check_rom(path, _T("pcm_mt32_l")) || !check_rom(path, _T("pcm_mt32_h"))) {
|
||||
continue;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if (!check_rom(path, _T("pcm_cm32l")) && !check_rom(path, _T("cm32l_pcm"))) {
|
||||
if (!check_rom(path, _T("pcm_mt32")) || !check_rom(path, _T("pcm_cm32l_h"))) {
|
||||
continue;
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if (!check_rom(path, _T("pcm_cm32l")) && !check_rom(path, _T("cm32l_pcm"))) {
|
||||
if (!check_rom(path, _T("pcm_mt32")) || !check_rom(path, _T("pcm_cm32l_h"))) {
|
||||
return false;
|
||||
const TCHAR **ctl = me == 1 ? mt32ctl : cm32lctl;
|
||||
for (int i = 0; ctl[i]; i++) {
|
||||
if (check_rom(path, ctl[i])) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
const TCHAR **ctl = me == 1 ? mt32ctl : cm32lctl;
|
||||
for (int i = 0; ctl[i]; i++) {
|
||||
if (check_rom(path, ctl[i])) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user