ui: disable "Simulate Wake-up" when no game is running (#1863)

This commit is contained in:
Bruno Macabeus 2021-01-11 15:03:37 +00:00 committed by GitHub
parent 5117b21c52
commit b81f19613f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 4 deletions

View File

@ -62,6 +62,7 @@ namespace Ryujinx.Ui
[GUI] Box _footerBox; [GUI] Box _footerBox;
[GUI] Box _statusBar; [GUI] Box _statusBar;
[GUI] MenuItem _stopEmulation; [GUI] MenuItem _stopEmulation;
[GUI] MenuItem _simulateWakeUpMessage;
[GUI] MenuItem _fullScreen; [GUI] MenuItem _fullScreen;
[GUI] CheckMenuItem _startFullScreen; [GUI] CheckMenuItem _startFullScreen;
[GUI] CheckMenuItem _favToggle; [GUI] CheckMenuItem _favToggle;
@ -140,7 +141,8 @@ namespace Ryujinx.Ui
_startFullScreen.Active = true; _startFullScreen.Active = true;
} }
_stopEmulation.Sensitive = false; _stopEmulation.Sensitive = false;
_simulateWakeUpMessage.Sensitive = false;
if (ConfigurationState.Instance.Ui.GuiColumns.FavColumn) _favToggle.Active = true; if (ConfigurationState.Instance.Ui.GuiColumns.FavColumn) _favToggle.Active = true;
if (ConfigurationState.Instance.Ui.GuiColumns.IconColumn) _iconToggle.Active = true; if (ConfigurationState.Instance.Ui.GuiColumns.IconColumn) _iconToggle.Active = true;
@ -527,8 +529,9 @@ namespace Ryujinx.Ui
windowThread.Start(); windowThread.Start();
#endif #endif
_gameLoaded = true; _gameLoaded = true;
_stopEmulation.Sensitive = true; _stopEmulation.Sensitive = true;
_simulateWakeUpMessage.Sensitive = true;
_firmwareInstallFile.Sensitive = false; _firmwareInstallFile.Sensitive = false;
_firmwareInstallDirectory.Sensitive = false; _firmwareInstallDirectory.Sensitive = false;
@ -622,6 +625,7 @@ namespace Ryujinx.Ui
Task.Run(HandleRelaunch); Task.Run(HandleRelaunch);
_stopEmulation.Sensitive = false; _stopEmulation.Sensitive = false;
_simulateWakeUpMessage.Sensitive = false;
_firmwareInstallFile.Sensitive = true; _firmwareInstallFile.Sensitive = true;
_firmwareInstallDirectory.Sensitive = true; _firmwareInstallDirectory.Sensitive = true;
}); });

View File

@ -138,7 +138,7 @@
</object> </object>
</child> </child>
<child> <child>
<object class="GtkMenuItem" id="SimulateWakeUpMessage"> <object class="GtkMenuItem" id="_simulateWakeUpMessage">
<property name="visible">True</property> <property name="visible">True</property>
<property name="can_focus">False</property> <property name="can_focus">False</property>
<property name="tooltip_text" translatable="yes">Simulate a Wake-up Message</property> <property name="tooltip_text" translatable="yes">Simulate a Wake-up Message</property>