mirror of
https://git.ryujinx.app/kenji-nx/ryujinx.git
synced 2025-12-19 22:37:08 +00:00
UI: Button to set emulator time based on system time in settings, under the time settings
This commit is contained in:
parent
95ac0a7a51
commit
d640f50203
12 changed files with 50 additions and 2 deletions
|
|
@ -1,5 +1,7 @@
|
|||
using Avalonia.Controls;
|
||||
using Avalonia.Interactivity;
|
||||
using Ryujinx.Ava.UI.ViewModels;
|
||||
using System;
|
||||
using TimeZone = Ryujinx.Ava.UI.Models.TimeZone;
|
||||
|
||||
namespace Ryujinx.Ava.UI.Views.Settings
|
||||
|
|
@ -15,7 +17,7 @@ namespace Ryujinx.Ava.UI.Views.Settings
|
|||
|
||||
private void TimeZoneBox_OnSelectionChanged(object sender, SelectionChangedEventArgs e)
|
||||
{
|
||||
if (e.AddedItems != null && e.AddedItems.Count > 0)
|
||||
if (e.AddedItems.Count > 0)
|
||||
{
|
||||
if (e.AddedItems[0] is TimeZone timeZone)
|
||||
{
|
||||
|
|
@ -33,5 +35,7 @@ namespace Ryujinx.Ava.UI.Views.Settings
|
|||
ViewModel.ValidateAndSetTimeZone(timeZone.Location);
|
||||
}
|
||||
}
|
||||
|
||||
private void MatchSystemTime_OnClick(object sender, RoutedEventArgs e) => ViewModel.MatchSystemTime();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue