gui: Toggle Docked/Handheld mode and VSync by clicking status bar (#1726)

* gui: Toggle between docked/handheld mode by clicking status bar

This PR just add a way to toggle between the docked and the handheld mode by clicking the lable in the status bar.
Nothing more.

* Fix glade file formatting

* Add VSync toggle
This commit is contained in:
Ac_K 2020-11-19 01:34:28 +01:00 committed by GitHub
parent 41ab43151b
commit f8f23bf899
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 37 additions and 11 deletions

View file

@ -117,9 +117,9 @@ namespace Ryujinx.Ui
End(null);
}
_virtualFileSystem = VirtualFileSystem.CreateInstance();
_virtualFileSystem = VirtualFileSystem.CreateInstance();
_userChannelPersistence = new UserChannelPersistence();
_contentManager = new ContentManager(_virtualFileSystem);
_contentManager = new ContentManager(_virtualFileSystem);
if (migrationNeeded)
{
@ -848,6 +848,16 @@ namespace Ryujinx.Ui
LoadApplication(path);
}
private void VSyncStatus_Clicked(object sender, ButtonReleaseEventArgs args)
{
_emulationContext.EnableDeviceVsync = !_emulationContext.EnableDeviceVsync;
}
private void DockedMode_Clicked(object sender, ButtonReleaseEventArgs args)
{
ConfigurationState.Instance.System.EnableDockedMode.Value = !ConfigurationState.Instance.System.EnableDockedMode.Value;
}
private void Row_Clicked(object sender, ButtonReleaseEventArgs args)
{
if (args.Event.Button != 3) return;