fix slow performance in window mode on some cores due to constant churning of bitmaps for the disk activity light

This commit is contained in:
zeromus 2014-02-17 09:20:08 +00:00
parent 02762576aa
commit c4c05740a7
1 changed files with 9 additions and 8 deletions

View File

@ -28,13 +28,16 @@ namespace BizHawk.Client.EmuHawk
{ {
Text = "BizHawk" + (VersionInfo.INTERIM ? " (interim) " : String.Empty); Text = "BizHawk" + (VersionInfo.INTERIM ? " (interim) " : String.Empty);
// Hide Status bar icons Global.CheatList.Changed += ToolHelpers.UpdateCheatRelatedTools;
// Hide Status bar icons and general statusbar prep
PlayRecordStatusButton.Visible = false; PlayRecordStatusButton.Visible = false;
AVIStatusLabel.Visible = false; AVIStatusLabel.Visible = false;
SetPauseStatusbarIcon(); SetPauseStatusbarIcon();
ToolHelpers.UpdateCheatRelatedTools(null, null); ToolHelpers.UpdateCheatRelatedTools(null, null);
RebootStatusBarIcon.Visible = false; RebootStatusBarIcon.Visible = false;
Global.CheatList.Changed += ToolHelpers.UpdateCheatRelatedTools; StatusBarDiskLightOnImage = Properties.Resources.LightOn;
StatusBarDiskLightOffImage = Properties.Resources.LightOff;
} }
static MainForm() static MainForm()
@ -992,10 +995,8 @@ namespace BizHawk.Client.EmuHawk
private readonly bool _autoCloseOnDump; private readonly bool _autoCloseOnDump;
private int _lastOpenRomFilter; private int _lastOpenRomFilter;
//TODO GL - this whole feature will have to be re-added // Resources
//// workaround for possible memory leak in SysdrawingRenderPanel Bitmap StatusBarDiskLightOnImage, StatusBarDiskLightOffImage;
//private RetainedViewportPanel _captureOsdRvp;
//private SysdrawingRenderPanel _captureOsdSrp;
private object _syncSettingsHack; private object _syncSettingsHack;
@ -2065,8 +2066,8 @@ namespace BizHawk.Client.EmuHawk
} }
LedLightStatusLabel.Image = Global.Emulator.CoreComm.DriveLED LedLightStatusLabel.Image = Global.Emulator.CoreComm.DriveLED
? Properties.Resources.LightOn ? StatusBarDiskLightOnImage
: Properties.Resources.LightOff; : StatusBarDiskLightOffImage;
} }
else else
{ {