mirror of
https://github.com/Ryujinx/Ryujinx.git
synced 2024-11-13 14:06:54 +00:00
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:
parent
41ab43151b
commit
f8f23bf899
2 changed files with 37 additions and 11 deletions
|
@ -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;
|
||||
|
|
|
@ -469,6 +469,12 @@
|
|||
<object class="GtkBox" id="_statusBar">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<child>
|
||||
<object class="GtkEventBox">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="margin_left">0</property>
|
||||
<signal name="button-release-event" handler="VSyncStatus_Clicked" swapped="no"/>
|
||||
<child>
|
||||
<object class="GtkLabel" id="_vSyncStatus">
|
||||
<property name="visible">True</property>
|
||||
|
@ -478,6 +484,8 @@
|
|||
<property name="margin_right">5</property>
|
||||
<property name="label" translatable="yes">VSync</property>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">True</property>
|
||||
|
@ -495,6 +503,12 @@
|
|||
<property name="position">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkEventBox">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="margin_left">0</property>
|
||||
<signal name="button-release-event" handler="DockedMode_Clicked" swapped="no"/>
|
||||
<child>
|
||||
<object class="GtkLabel" id="_dockedMode">
|
||||
<property name="visible">True</property>
|
||||
|
@ -503,6 +517,8 @@
|
|||
<property name="margin_left">5</property>
|
||||
<property name="margin_right">5</property>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">True</property>
|
||||
|
|
Loading…
Reference in a new issue