mirror of
https://github.com/Ryujinx/Ryujinx.git
synced 2025-08-09 01:42:34 -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);
|
||||
|
Reference in New Issue
Block a user