UI: Proper fix for flashing game selection screen

This commit is contained in:
Souryo 2017-05-26 07:34:27 -04:00
parent 8e34a819a7
commit b517e4eafd
2 changed files with 6 additions and 5 deletions

View File

@ -54,6 +54,11 @@ namespace Mesen.GUI.Controls
base.OnVisibleChanged(e);
}
public int GameCount
{
get { return _recentGames.Count; }
}
public void Initialize()
{
_recentGames = new List<RecentGameInfo>();

View File

@ -665,12 +665,8 @@ namespace Mesen.GUI.Forms
this.BeginInvoke((MethodInvoker)(() => this.UpdateMenus()));
} else {
panelInfo.Visible = _emuThread == null;
ctrlRecentGames.Visible = ctrlRecentGames.GameCount > 0 && _emuThread == null;
mnuPowerOff.Enabled = _emuThread != null;
if(ctrlRecentGames.Visible && _emuThread == null) {
ctrlRecentGames.Visible = false;
} else {
ctrlRecentGames.Visible = true;
}
ctrlLoading.Visible = (_romLoadCounter > 0);