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)
{
if (config != null)
@ -117,6 +128,7 @@ namespace Ryujinx.Ava.UI.Models.Input
ResScaleDown = config.ResScaleDown;
VolumeUp = config.VolumeUp;
VolumeDown = config.VolumeDown;
ToggleTurbo = config.ToggleTurbo;
}
}
@ -133,6 +145,7 @@ namespace Ryujinx.Ava.UI.Models.Input
ResScaleDown = ResScaleDown,
VolumeUp = VolumeUp,
VolumeDown = VolumeDown,
ToggleTurbo = ToggleTurbo,
};
return config;

View File

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

View File

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