Refactor some extension methods off IEmulator that inexlicably used Global.Emulator instead of the IEmulator that was passed in
This commit is contained in:
parent
44fa93e15f
commit
0af5fb50b1
|
@ -21,46 +21,46 @@ namespace BizHawk.Client.EmuHawk.CoreExtensions
|
|||
{
|
||||
public static Bitmap Icon(this IEmulator core)
|
||||
{
|
||||
var attributes = Global.Emulator.Attributes();
|
||||
var attributes = core.Attributes();
|
||||
|
||||
if (!attributes.Ported)
|
||||
{
|
||||
return Properties.Resources.CorpHawkSmall;
|
||||
}
|
||||
|
||||
if (Global.Emulator is QuickNES)
|
||||
if (core is QuickNES)
|
||||
{
|
||||
return Properties.Resources.QuickNes;
|
||||
}
|
||||
else if (Global.Emulator is LibsnesCore)
|
||||
else if (core is LibsnesCore)
|
||||
{
|
||||
return Properties.Resources.bsnes;
|
||||
}
|
||||
else if (Global.Emulator is Yabause)
|
||||
else if (core is Yabause)
|
||||
{
|
||||
return Properties.Resources.yabause;
|
||||
}
|
||||
else if (Global.Emulator is Atari7800)
|
||||
else if (core is Atari7800)
|
||||
{
|
||||
return Properties.Resources.emu7800;
|
||||
}
|
||||
else if (Global.Emulator is GBA)
|
||||
else if (core is GBA)
|
||||
{
|
||||
return Properties.Resources.meteor;
|
||||
}
|
||||
else if (Global.Emulator is GPGX)
|
||||
else if (core is GPGX)
|
||||
{
|
||||
return Properties.Resources.genplus;
|
||||
}
|
||||
else if (Global.Emulator is PSP)
|
||||
else if (core is PSP)
|
||||
{
|
||||
return Properties.Resources.ppsspp;
|
||||
}
|
||||
else if (Global.Emulator is Gameboy)
|
||||
else if (core is Gameboy)
|
||||
{
|
||||
return Properties.Resources.gambatte;
|
||||
}
|
||||
else if (Global.Emulator is Snes9x)
|
||||
else if (core is Snes9x)
|
||||
{
|
||||
return Properties.Resources.snes9x;
|
||||
}
|
||||
|
@ -72,14 +72,14 @@ namespace BizHawk.Client.EmuHawk.CoreExtensions
|
|||
|
||||
public static string DisplayName(this IEmulator core)
|
||||
{
|
||||
var attributes = Global.Emulator.Attributes();
|
||||
var attributes = core.Attributes();
|
||||
|
||||
var str = (!attributes.Released ? "(Experimental) " : string.Empty) +
|
||||
attributes.CoreName;
|
||||
|
||||
if (Global.Emulator is LibsnesCore)
|
||||
if (core is LibsnesCore)
|
||||
{
|
||||
str += " (" + ((LibsnesCore)Global.Emulator).CurrentProfile + ")";
|
||||
str += " (" + ((LibsnesCore)core).CurrentProfile + ")";
|
||||
}
|
||||
|
||||
return str;
|
||||
|
|
Loading…
Reference in New Issue