Simplify execution path for extension checks
This commit is contained in:
parent
81cb8eb094
commit
95dbd7c20b
|
@ -924,7 +924,7 @@ namespace BizHawk.Client.Common
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
var doExtensionChecks = false;
|
var cancel = false;
|
||||||
|
|
||||||
if (OpenAdvanced is OpenAdvanced_Libretro)
|
if (OpenAdvanced is OpenAdvanced_Libretro)
|
||||||
{
|
{
|
||||||
|
@ -994,19 +994,15 @@ namespace BizHawk.Client.Common
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// if not libretro: do extension checking
|
|
||||||
doExtensionChecks = true;
|
|
||||||
|
|
||||||
// do the archive binding we had to skip
|
// do the archive binding we had to skip
|
||||||
if (!HandleArchiveBinding(file))
|
if (!HandleArchiveBinding(file))
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
var cancel = false;
|
// not libretro: do extension checking
|
||||||
var ext = file.Extension.ToLowerInvariant();
|
var ext = file.Extension.ToLowerInvariant();
|
||||||
if (doExtensionChecks) switch (ext)
|
switch (ext)
|
||||||
{
|
{
|
||||||
case ".m3u":
|
case ".m3u":
|
||||||
(nextEmulator, game) = LoadM3U(path, nextComm, file);
|
(nextEmulator, game) = LoadM3U(path, nextComm, file);
|
||||||
|
@ -1033,6 +1029,7 @@ namespace BizHawk.Client.Common
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (nextEmulator == null)
|
if (nextEmulator == null)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue