1
0
Fork 0
mirror of https://github.com/Ryujinx/Ryujinx.git synced 2024-11-18 04:16:39 +00:00

Update ToggleTurbo hotkey to refactored Input

This commit is contained in:
unknown 2024-06-02 23:01:54 -03:00
parent 32c4a5c04c
commit c5eecc320c
3 changed files with 17 additions and 1 deletions

View file

@ -104,6 +104,17 @@ namespace Ryujinx.Ava.UI.Models.Input
} }
} }
private Key _toggleTurbo;
public Key ToggleTurbo
{
get => _toggleTurbo;
set
{
_toggleTurbo = value;
OnPropertyChanged();
}
}
public HotkeyConfig(KeyboardHotkeys config) public HotkeyConfig(KeyboardHotkeys config)
{ {
if (config != null) if (config != null)
@ -117,6 +128,7 @@ namespace Ryujinx.Ava.UI.Models.Input
ResScaleDown = config.ResScaleDown; ResScaleDown = config.ResScaleDown;
VolumeUp = config.VolumeUp; VolumeUp = config.VolumeUp;
VolumeDown = config.VolumeDown; VolumeDown = config.VolumeDown;
ToggleTurbo = config.ToggleTurbo;
} }
} }
@ -133,6 +145,7 @@ namespace Ryujinx.Ava.UI.Models.Input
ResScaleDown = ResScaleDown, ResScaleDown = ResScaleDown,
VolumeUp = VolumeUp, VolumeUp = VolumeUp,
VolumeDown = VolumeDown, VolumeDown = VolumeDown,
ToggleTurbo = ToggleTurbo,
}; };
return config; return config;

View file

@ -105,7 +105,7 @@
</StackPanel> </StackPanel>
<StackPanel Margin="10,0,0,0" Orientation="Horizontal"> <StackPanel Margin="10,0,0,0" Orientation="Horizontal">
<TextBlock VerticalAlignment="Center" Text="{locale:Locale SettingsTabHotkeysToggleTurboHotkey}" Width="230" /> <TextBlock VerticalAlignment="Center" Text="{locale:Locale SettingsTabHotkeysToggleTurboHotkey}" Width="230" />
<ToggleButton Width="90" Height="27" Checked="Button_Checked" Unchecked="Button_Unchecked"> <ToggleButton Name="ToggleTurbo">
<TextBlock <TextBlock
Text="{Binding KeyboardHotkeys.ToggleTurbo, Mode=TwoWay, Converter={StaticResource Key}}" Text="{Binding KeyboardHotkeys.ToggleTurbo, Mode=TwoWay, Converter={StaticResource Key}}"
TextAlignment="Center" /> TextAlignment="Center" />

View file

@ -109,6 +109,9 @@ namespace Ryujinx.Ava.UI.Views.Settings
case "VolumeDown": case "VolumeDown":
viewModel.KeyboardHotkey.VolumeDown = buttonValue.AsHidType<Key>(); viewModel.KeyboardHotkey.VolumeDown = buttonValue.AsHidType<Key>();
break; break;
case "ToggleTurbo":
viewModel.KeyboardHotkey.ToggleTurbo = buttonValue.AsHidType<Key>();
break;
} }
} }
}; };