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:
Xpl0itR 2020-12-01 22:02:27 +00:00 committed by GitHub
parent f6d88558b1
commit bd8d28c59d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 83 additions and 6 deletions

View file

@ -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);