mirror of
https://github.com/Ryujinx/Ryujinx.git
synced 2025-09-19 06:32:14 -07:00
Add option to start games in fullscreen mode (#1580)
* Add option to start games in fullscreen mode * Add command line option * Use pascal case on menu item
This commit is contained in:
@@ -57,6 +57,7 @@ namespace Ryujinx.Ui
|
||||
[GUI] Box _statusBar;
|
||||
[GUI] MenuItem _stopEmulation;
|
||||
[GUI] MenuItem _fullScreen;
|
||||
[GUI] CheckMenuItem _startFullScreen;
|
||||
[GUI] CheckMenuItem _favToggle;
|
||||
[GUI] MenuItem _firmwareInstallDirectory;
|
||||
[GUI] MenuItem _firmwareInstallFile;
|
||||
@@ -136,6 +137,11 @@ namespace Ryujinx.Ui
|
||||
|
||||
ApplyTheme();
|
||||
|
||||
if (ConfigurationState.Instance.Ui.StartFullscreen)
|
||||
{
|
||||
_startFullScreen.Active = true;
|
||||
}
|
||||
|
||||
_stopEmulation.Sensitive = false;
|
||||
|
||||
if (ConfigurationState.Instance.Ui.GuiColumns.FavColumn) _favToggle.Active = true;
|
||||
@@ -552,6 +558,10 @@ namespace Ryujinx.Ui
|
||||
{
|
||||
ToggleExtraWidgets(false);
|
||||
}
|
||||
else if (ConfigurationState.Instance.Ui.StartFullscreen.Value)
|
||||
{
|
||||
FullScreen_Toggled(null, null);
|
||||
}
|
||||
});
|
||||
|
||||
_glWidget.WaitEvent.WaitOne();
|
||||
@@ -1164,7 +1174,7 @@ namespace Ryujinx.Ui
|
||||
}
|
||||
}
|
||||
|
||||
private void FullScreen_Toggled(object o, EventArgs args)
|
||||
private void FullScreen_Toggled(object sender, EventArgs args)
|
||||
{
|
||||
bool fullScreenToggled = this.Window.State.HasFlag(Gdk.WindowState.Fullscreen);
|
||||
|
||||
@@ -1182,6 +1192,13 @@ namespace Ryujinx.Ui
|
||||
}
|
||||
}
|
||||
|
||||
private void StartFullScreen_Toggled(object sender, EventArgs args)
|
||||
{
|
||||
ConfigurationState.Instance.Ui.StartFullscreen.Value = _startFullScreen.Active;
|
||||
|
||||
SaveConfig();
|
||||
}
|
||||
|
||||
private void Settings_Pressed(object sender, EventArgs args)
|
||||
{
|
||||
SettingsWindow settingsWin = new SettingsWindow(_virtualFileSystem, _contentManager);
|
||||
|
@@ -112,11 +112,26 @@
|
||||
<property name="use_underline">True</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkCheckMenuItem" id="_startFullScreen">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="label" translatable="yes">Start Games in Fullscreen Mode</property>
|
||||
<property name="use_underline">True</property>
|
||||
<signal name="toggled" handler="StartFullScreen_Toggled" swapped="no"/>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkSeparatorMenuItem">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkMenuItem" id="_stopEmulation">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="tooltip_text" translatable="yes">Stop emualtion of the current game and return to game selection</property>
|
||||
<property name="tooltip_text" translatable="yes">Stop emulation of the current game and return to game selection</property>
|
||||
<property name="label" translatable="yes">Stop Emulation</property>
|
||||
<property name="use_underline">True</property>
|
||||
<signal name="activate" handler="StopEmulation_Pressed" swapped="no"/>
|
||||
|
Reference in New Issue
Block a user