mirror of
https://git.ryujinx.app/ryubing/ryujinx.git
synced 2025-08-01 10:39:50 -06:00
Compare commits
14 Commits
Canary-1.2
...
Canary-1.2
Author | SHA1 | Date | |
---|---|---|---|
855161b23b | |||
6b55d158b7 | |||
91f73a4891 | |||
883d4d863a | |||
ca5de909a1 | |||
5172567b08 | |||
6fe4cee7c0 | |||
8623452abc | |||
17e8ae1d9a | |||
7591b07fce | |||
89b4389ed2 | |||
d9ee729199 | |||
ba0cd13cff | |||
501b199e24 |
4
.github/workflows/canary.yml
vendored
4
.github/workflows/canary.yml
vendored
@ -29,7 +29,7 @@ env:
|
||||
jobs:
|
||||
tag:
|
||||
name: Create tag
|
||||
runs-on: ubuntu-20.04
|
||||
runs-on: ubuntu-24.04
|
||||
steps:
|
||||
- name: Get version info
|
||||
id: version_info
|
||||
@ -202,7 +202,7 @@ jobs:
|
||||
|
||||
macos_release:
|
||||
name: Release MacOS universal
|
||||
runs-on: ubuntu-20.04
|
||||
runs-on: ubuntu-24.04
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
|
4
.github/workflows/release.yml
vendored
4
.github/workflows/release.yml
vendored
@ -18,7 +18,7 @@ env:
|
||||
jobs:
|
||||
tag:
|
||||
name: Create tag
|
||||
runs-on: ubuntu-20.04
|
||||
runs-on: ubuntu-24.04
|
||||
steps:
|
||||
- name: Get version info
|
||||
id: version_info
|
||||
@ -183,7 +183,7 @@ jobs:
|
||||
|
||||
macos_release:
|
||||
name: Release MacOS universal
|
||||
runs-on: ubuntu-20.04
|
||||
runs-on: ubuntu-24.04
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
|
@ -39,12 +39,12 @@
|
||||
<p align="center">
|
||||
Click below to join the Discord:
|
||||
<br>
|
||||
<a href="https://discord.gg/dHPrkBkkyA">
|
||||
<a href="https://discord.gg/PEuzjrFXUA">
|
||||
<img src="https://img.shields.io/discord/1294443224030511104?color=5865F2&label=Ryubing&logo=discord&logoColor=white" alt="Discord">
|
||||
</a>
|
||||
<br>
|
||||
<br>
|
||||
<img src="https://raw.githubusercontent.com/GreemDev/Ryujinx/refs/heads/master/docs/shell.png">
|
||||
<img src="https://raw.githubusercontent.com/Ryubing/Ryujinx/refs/heads/master/docs/shell.png">
|
||||
</p>
|
||||
|
||||
## Usage
|
||||
|
@ -1249,7 +1249,7 @@
|
||||
0100A6B00D4EC000,"Furwind",,playable,2021-02-19 19:44:08
|
||||
0100ECE00C0C4000,"Fury Unleashed",crash;services,ingame,2020-10-18 11:52:40
|
||||
010070000ED9E000,"Fury Unleashed Demo",,playable,2020-10-08 20:09:21
|
||||
0100E1F013674000,"FUSER™",nvdec;UE4,playable,2022-10-17 20:58:32
|
||||
0100E1F013674000,"FUSER™",nvdec;UE4;slow;gpu,ingame,2025-02-12 16:03:00
|
||||
0100A7A015E4C000,"Fushigi no Gensokyo Lotus Labyrinth",Needs Update;audio;gpu;nvdec,ingame,2021-01-20 15:30:02
|
||||
01003C300B274000,"Futari de! Nyanko Daisensou",,playable,2024-01-05 22:26:52
|
||||
010055801134E000,"FUZE Player",online-broken;vulkan-backend-bug,ingame,2022-10-18 12:23:53
|
||||
@ -2988,8 +2988,8 @@
|
||||
010015D003EE4000,"The Jackbox Party Pack 2",online-working,playable,2022-08-22 18:23:40
|
||||
0100CC80013D6000,"The Jackbox Party Pack 3",slow;online-working,playable,2022-08-22 18:41:06
|
||||
0100E1F003EE8000,"The Jackbox Party Pack 4",online-working,playable,2022-08-22 18:56:34
|
||||
01006fe0096ac000,"The Jackbox Party Pack 5",ldn-untested,boots,2025-02-03 22:32:00
|
||||
01005a400db52000,"The Jackbox Party Pack 6",ldn-untested,boots,2025-02-03 22:32:00
|
||||
01006fe0096ac000,"The Jackbox Party Pack 5",slow;online-working,ingame,2025-02-14 05:32:00
|
||||
01005a400db52000,"The Jackbox Party Pack 6",slow;online-working,ingame,2025-02-14 05:26:00
|
||||
010052C00B184000,"The Journey Down: Chapter One",nvdec,playable,2021-02-24 13:32:41
|
||||
01006BC00B188000,"The Journey Down: Chapter Three",nvdec,playable,2021-02-24 13:45:27
|
||||
01009AB00B186000,"The Journey Down: Chapter Two",nvdec,playable,2021-02-24 13:32:13
|
||||
|
|
@ -186,7 +186,7 @@ namespace ARMeilleure.Translation.Cache
|
||||
|
||||
int newRegionNumber = _activeRegionIndex;
|
||||
|
||||
Logger.Warning?.Print(LogClass.Cpu, $"JIT Cache Region {exhaustedRegion} exhausted, creating new Cache Region {newRegionNumber} ({((newRegionNumber + 1) * CacheSize).Bytes()} Total Allocation).");
|
||||
Logger.Warning?.Print(LogClass.Cpu, $"JIT Cache Region {exhaustedRegion} exhausted, creating new Cache Region {newRegionNumber} ({((long)(newRegionNumber + 1) * CacheSize).Bytes()} Total Allocation).");
|
||||
|
||||
_cacheAllocator = new CacheMemoryAllocator(CacheSize);
|
||||
|
||||
|
@ -166,7 +166,7 @@ namespace Ryujinx.Cpu.LightningJit.Cache
|
||||
|
||||
int newRegionNumber = _activeRegionIndex;
|
||||
|
||||
Logger.Warning?.Print(LogClass.Cpu, $"JIT Cache Region {exhaustedRegion} exhausted, creating new Cache Region {newRegionNumber} ({((newRegionNumber + 1) * CacheSize).Bytes()} Total Allocation).");
|
||||
Logger.Warning?.Print(LogClass.Cpu, $"JIT Cache Region {exhaustedRegion} exhausted, creating new Cache Region {newRegionNumber} ({((long)(newRegionNumber + 1) * CacheSize).Bytes()} Total Allocation).");
|
||||
|
||||
_cacheAllocator = new CacheMemoryAllocator(CacheSize);
|
||||
|
||||
|
@ -185,6 +185,15 @@ namespace Ryujinx.Input.HLE
|
||||
}
|
||||
}
|
||||
|
||||
public bool InputUpdatesBlocked
|
||||
{
|
||||
get
|
||||
{
|
||||
lock (_lock)
|
||||
return _blockInputUpdates;
|
||||
}
|
||||
}
|
||||
|
||||
public void BlockInputUpdates()
|
||||
{
|
||||
lock (_lock)
|
||||
|
@ -517,7 +517,7 @@ namespace Ryujinx.Ava
|
||||
Device?.System.ChangeDockedModeState(e.NewValue);
|
||||
}
|
||||
|
||||
private void UpdateAudioVolumeState(object sender, ReactiveEventArgs<float> e)
|
||||
public void UpdateAudioVolumeState(object sender, ReactiveEventArgs<float> e)
|
||||
{
|
||||
Device?.SetVolume(e.NewValue);
|
||||
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -1,14 +0,0 @@
|
||||
using System;
|
||||
|
||||
namespace Ryujinx.Ava.Common
|
||||
{
|
||||
public static class ThemeManager
|
||||
{
|
||||
public static event Action ThemeChanged;
|
||||
|
||||
public static void OnThemeChanged()
|
||||
{
|
||||
ThemeChanged?.Invoke();
|
||||
}
|
||||
}
|
||||
}
|
@ -22,6 +22,8 @@ namespace Ryujinx.Ava
|
||||
{
|
||||
public class RyujinxApp : Application
|
||||
{
|
||||
public static event Action ThemeChanged;
|
||||
|
||||
internal static string FormatTitle(LocaleKeys? windowTitleKey = null, bool includeVersion = true)
|
||||
=> windowTitleKey is null
|
||||
? $"{FullAppName}{(includeVersion ? $" {Program.Version}" : string.Empty)}"
|
||||
@ -112,7 +114,7 @@ namespace Ryujinx.Ava
|
||||
baseStyle = ConfigurationState.Instance.UI.BaseStyle;
|
||||
}
|
||||
|
||||
ThemeManager.OnThemeChanged();
|
||||
ThemeChanged?.Invoke();
|
||||
|
||||
RequestedThemeVariant = baseStyle switch
|
||||
{
|
||||
|
@ -25,10 +25,10 @@ namespace Ryujinx.Ava.UI.ViewModels
|
||||
Version = RyujinxApp.FullAppName + "\n" + Program.Version;
|
||||
UpdateLogoTheme(ConfigurationState.Instance.UI.BaseStyle.Value);
|
||||
|
||||
ThemeManager.ThemeChanged += ThemeManager_ThemeChanged;
|
||||
RyujinxApp.ThemeChanged += Ryujinx_ThemeChanged;
|
||||
}
|
||||
|
||||
private void ThemeManager_ThemeChanged()
|
||||
private void Ryujinx_ThemeChanged()
|
||||
{
|
||||
Dispatcher.UIThread.Post(() => UpdateLogoTheme(ConfigurationState.Instance.UI.BaseStyle.Value));
|
||||
}
|
||||
@ -49,7 +49,7 @@ namespace Ryujinx.Ava.UI.ViewModels
|
||||
|
||||
public void Dispose()
|
||||
{
|
||||
ThemeManager.ThemeChanged -= ThemeManager_ThemeChanged;
|
||||
RyujinxApp.ThemeChanged -= Ryujinx_ThemeChanged;
|
||||
|
||||
GithubLogo.Dispose();
|
||||
DiscordLogo.Dispose();
|
||||
|
@ -126,6 +126,10 @@ namespace Ryujinx.Ava.UI.ViewModels
|
||||
public bool EnableDockedMode { get; set; }
|
||||
public bool EnableKeyboard { get; set; }
|
||||
public bool EnableMouse { get; set; }
|
||||
public bool DisableInputWhenOutOfFocus { get; set; }
|
||||
|
||||
public int FocusLostActionType { get; set; }
|
||||
|
||||
public VSyncMode VSyncMode
|
||||
{
|
||||
get => _vSyncMode;
|
||||
@ -479,6 +483,7 @@ namespace Ryujinx.Ava.UI.ViewModels
|
||||
ShowTitleBar = config.ShowTitleBar;
|
||||
HideCursor = (int)config.HideCursor.Value;
|
||||
UpdateCheckerType = (int)config.UpdateCheckerType.Value;
|
||||
FocusLostActionType = (int)config.FocusLostActionType.Value;
|
||||
|
||||
GameDirectories.Clear();
|
||||
GameDirectories.AddRange(config.UI.GameDirs.Value);
|
||||
@ -498,6 +503,7 @@ namespace Ryujinx.Ava.UI.ViewModels
|
||||
EnableDockedMode = config.System.EnableDockedMode;
|
||||
EnableKeyboard = config.Hid.EnableKeyboard;
|
||||
EnableMouse = config.Hid.EnableMouse;
|
||||
DisableInputWhenOutOfFocus = config.Hid.DisableInputWhenOutOfFocus;
|
||||
|
||||
// Keyboard Hotkeys
|
||||
KeyboardHotkey = new HotkeyConfig(config.Hid.Hotkeys.Value);
|
||||
@ -586,6 +592,7 @@ namespace Ryujinx.Ava.UI.ViewModels
|
||||
config.ShowTitleBar.Value = ShowTitleBar;
|
||||
config.HideCursor.Value = (HideCursorMode)HideCursor;
|
||||
config.UpdateCheckerType.Value = (UpdaterType)UpdateCheckerType;
|
||||
config.FocusLostActionType.Value = (FocusLostType)FocusLostActionType;
|
||||
|
||||
if (GameDirectoryChanged)
|
||||
{
|
||||
@ -609,6 +616,7 @@ namespace Ryujinx.Ava.UI.ViewModels
|
||||
config.System.EnableDockedMode.Value = EnableDockedMode;
|
||||
config.Hid.EnableKeyboard.Value = EnableKeyboard;
|
||||
config.Hid.EnableMouse.Value = EnableMouse;
|
||||
config.Hid.DisableInputWhenOutOfFocus.Value = DisableInputWhenOutOfFocus;
|
||||
|
||||
// Keyboard Hotkeys
|
||||
config.Hid.Hotkeys.Value = KeyboardHotkey.GetConfig();
|
||||
|
@ -40,6 +40,30 @@
|
||||
<CheckBox IsChecked="{Binding ShowTitleBar}" IsVisible="{x:Static helper:RunningPlatform.IsWindows}">
|
||||
<TextBlock Text="{ext:Locale SettingsTabGeneralShowTitleBar}" />
|
||||
</CheckBox>
|
||||
<StackPanel Margin="0, 15, 0, 0" Orientation="Horizontal">
|
||||
<TextBlock VerticalAlignment="Center"
|
||||
Text="{ext:Locale SettingsTabGeneralFocusLossType}"
|
||||
Width="150" />
|
||||
<ComboBox SelectedIndex="{Binding FocusLostActionType}"
|
||||
HorizontalContentAlignment="Left"
|
||||
MinWidth="100">
|
||||
<ComboBoxItem>
|
||||
<TextBlock Text="{ext:Locale SettingsTabGeneralFocusLossTypeDoNothing}" />
|
||||
</ComboBoxItem>
|
||||
<ComboBoxItem>
|
||||
<TextBlock Text="{ext:Locale SettingsTabGeneralFocusLossTypeBlockInput}" />
|
||||
</ComboBoxItem>
|
||||
<ComboBoxItem>
|
||||
<TextBlock Text="{ext:Locale SettingsTabGeneralFocusLossTypeMuteAudio}" />
|
||||
</ComboBoxItem>
|
||||
<ComboBoxItem>
|
||||
<TextBlock Text="{ext:Locale SettingsTabGeneralFocusLossTypeBlockInputAndMuteAudio}" />
|
||||
</ComboBoxItem>
|
||||
<ComboBoxItem>
|
||||
<TextBlock Text="{ext:Locale SettingsTabGeneralFocusLossTypePauseEmulation}" />
|
||||
</ComboBoxItem>
|
||||
</ComboBox>
|
||||
</StackPanel>
|
||||
<StackPanel Margin="0, 15, 0, 0" Orientation="Horizontal">
|
||||
<TextBlock VerticalAlignment="Center"
|
||||
Text="{ext:Locale SettingsTabGeneralCheckUpdatesOnLaunch}"
|
||||
|
@ -21,7 +21,9 @@
|
||||
x:DataType="viewModels:MainWindowViewModel"
|
||||
mc:Ignorable="d"
|
||||
WindowStartupLocation="Manual"
|
||||
Focusable="True">
|
||||
Focusable="True"
|
||||
GotFocus="InputElement_OnGotFocus"
|
||||
LostFocus="InputElement_OnLostFocus">
|
||||
<Window.Styles>
|
||||
<Style Selector="TitleBar:fullscreen">
|
||||
<Setter Property="Background" Value="#000000" />
|
||||
|
@ -1,6 +1,7 @@
|
||||
using Avalonia;
|
||||
using Avalonia.Controls;
|
||||
using Avalonia.Controls.Primitives;
|
||||
using Avalonia.Input;
|
||||
using Avalonia.Interactivity;
|
||||
using Avalonia.Platform;
|
||||
using Avalonia.Threading;
|
||||
@ -761,5 +762,119 @@ namespace Ryujinx.Ava.UI.Windows
|
||||
|
||||
_intelMacWarningShown = true;
|
||||
}
|
||||
|
||||
private void InputElement_OnGotFocus(object sender, GotFocusEventArgs e)
|
||||
{
|
||||
if (ViewModel.AppHost is null) return;
|
||||
|
||||
if (!_focusLoss.Active)
|
||||
return;
|
||||
|
||||
switch (_focusLoss.Type)
|
||||
{
|
||||
case FocusLostType.BlockInput:
|
||||
{
|
||||
if (!ViewModel.AppHost.NpadManager.InputUpdatesBlocked)
|
||||
{
|
||||
_focusLoss = default;
|
||||
return;
|
||||
}
|
||||
|
||||
ViewModel.AppHost.NpadManager.UnblockInputUpdates();
|
||||
_focusLoss = default;
|
||||
break;
|
||||
}
|
||||
case FocusLostType.MuteAudio:
|
||||
{
|
||||
if (!ViewModel.AppHost.Device.IsAudioMuted())
|
||||
{
|
||||
_focusLoss = default;
|
||||
return;
|
||||
}
|
||||
|
||||
ViewModel.AppHost.Device.SetVolume(ViewModel.VolumeBeforeMute);
|
||||
|
||||
_focusLoss = default;
|
||||
break;
|
||||
}
|
||||
case FocusLostType.BlockInputAndMuteAudio:
|
||||
{
|
||||
if (!ViewModel.AppHost.Device.IsAudioMuted())
|
||||
goto case FocusLostType.BlockInput;
|
||||
|
||||
ViewModel.AppHost.Device.SetVolume(ViewModel.VolumeBeforeMute);
|
||||
ViewModel.AppHost.NpadManager.UnblockInputUpdates();
|
||||
|
||||
_focusLoss = default;
|
||||
break;
|
||||
}
|
||||
case FocusLostType.PauseEmulation:
|
||||
{
|
||||
if (!ViewModel.AppHost.Device.System.IsPaused)
|
||||
{
|
||||
_focusLoss = default;
|
||||
return;
|
||||
}
|
||||
|
||||
ViewModel.AppHost.Resume();
|
||||
|
||||
_focusLoss = default;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private (FocusLostType Type, bool Active) _focusLoss;
|
||||
|
||||
private void InputElement_OnLostFocus(object sender, RoutedEventArgs e)
|
||||
{
|
||||
if (ConfigurationState.Instance.FocusLostActionType.Value is FocusLostType.DoNothing)
|
||||
return;
|
||||
|
||||
if (ViewModel.AppHost is null) return;
|
||||
|
||||
switch (ConfigurationState.Instance.FocusLostActionType.Value)
|
||||
{
|
||||
case FocusLostType.BlockInput:
|
||||
{
|
||||
if (ViewModel.AppHost.NpadManager.InputUpdatesBlocked)
|
||||
return;
|
||||
|
||||
ViewModel.AppHost.NpadManager.BlockInputUpdates();
|
||||
_focusLoss = (FocusLostType.BlockInput, ViewModel.AppHost.NpadManager.InputUpdatesBlocked);
|
||||
break;
|
||||
}
|
||||
case FocusLostType.MuteAudio:
|
||||
{
|
||||
if (ViewModel.AppHost.Device.GetVolume() is 0)
|
||||
return;
|
||||
|
||||
ViewModel.VolumeBeforeMute = ViewModel.AppHost.Device.GetVolume();
|
||||
ViewModel.AppHost.Device.SetVolume(0);
|
||||
_focusLoss = (FocusLostType.MuteAudio, ViewModel.AppHost.Device.GetVolume() is 0f);
|
||||
break;
|
||||
}
|
||||
case FocusLostType.BlockInputAndMuteAudio:
|
||||
{
|
||||
if (ViewModel.AppHost.Device.GetVolume() is 0)
|
||||
goto case FocusLostType.BlockInput;
|
||||
|
||||
ViewModel.VolumeBeforeMute = ViewModel.AppHost.Device.GetVolume();
|
||||
ViewModel.AppHost.Device.SetVolume(0);
|
||||
ViewModel.AppHost.NpadManager.BlockInputUpdates();
|
||||
_focusLoss = (FocusLostType.BlockInputAndMuteAudio, ViewModel.AppHost.Device.GetVolume() is 0f && ViewModel.AppHost.NpadManager.InputUpdatesBlocked);
|
||||
break;
|
||||
}
|
||||
case FocusLostType.PauseEmulation:
|
||||
{
|
||||
if (ViewModel.AppHost.Device.System.IsPaused)
|
||||
return;
|
||||
|
||||
ViewModel.AppHost.Pause();
|
||||
_focusLoss = (FocusLostType.PauseEmulation, ViewModel.AppHost.Device.System.IsPaused);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -80,7 +80,7 @@ namespace Ryujinx.Ava.Utilities.AppLibrary
|
||||
|
||||
public string LocalizedStatusTooltip =>
|
||||
Compatibility.Convert(x =>
|
||||
#pragma warning disable CS8509 It is exhaustive for all possible values this can contain.
|
||||
#pragma warning disable CS8509 // It is exhaustive for all possible values this can contain.
|
||||
LocaleManager.Instance[x.Status switch
|
||||
#pragma warning restore CS8509
|
||||
{
|
||||
|
@ -15,7 +15,7 @@ namespace Ryujinx.Ava.Utilities.Configuration
|
||||
/// <summary>
|
||||
/// The current version of the file format
|
||||
/// </summary>
|
||||
public const int CurrentVersion = 65;
|
||||
public const int CurrentVersion = 67;
|
||||
|
||||
/// <summary>
|
||||
/// Version of the configuration file format
|
||||
@ -171,6 +171,11 @@ namespace Ryujinx.Ava.Utilities.Configuration
|
||||
/// Checks for updates when Ryujinx starts when enabled, either prompting when an update is found or just showing a notification.
|
||||
/// </summary>
|
||||
public UpdaterType UpdateCheckerType { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// How the emulator should behave when you click off/on the window.
|
||||
/// </summary>
|
||||
public FocusLostType FocusLostActionType { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Show "Confirm Exit" Dialog
|
||||
@ -383,6 +388,11 @@ namespace Ryujinx.Ava.Utilities.Configuration
|
||||
/// Enable or disable mouse support (Independent from controllers binding)
|
||||
/// </summary>
|
||||
public bool EnableMouse { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Enable/disable the ability to control Ryujinx when it's not the currently focused window.
|
||||
/// </summary>
|
||||
public bool DisableInputWhenOutOfFocus { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Hotkey Keyboard Bindings
|
||||
|
@ -46,6 +46,7 @@ namespace Ryujinx.Ava.Utilities.Configuration
|
||||
EnableDiscordIntegration.Value = cff.EnableDiscordIntegration;
|
||||
CheckUpdatesOnStart.Value = cff.CheckUpdatesOnStart;
|
||||
UpdateCheckerType.Value = cff.UpdateCheckerType;
|
||||
FocusLostActionType.Value = cff.FocusLostActionType;
|
||||
ShowConfirmExit.Value = cff.ShowConfirmExit;
|
||||
RememberWindowState.Value = cff.RememberWindowState;
|
||||
ShowTitleBar.Value = cff.ShowTitleBar;
|
||||
@ -139,6 +140,7 @@ namespace Ryujinx.Ava.Utilities.Configuration
|
||||
|
||||
Hid.EnableKeyboard.Value = cff.EnableKeyboard;
|
||||
Hid.EnableMouse.Value = cff.EnableMouse;
|
||||
Hid.DisableInputWhenOutOfFocus.Value = cff.DisableInputWhenOutOfFocus;
|
||||
Hid.Hotkeys.Value = cff.Hotkeys;
|
||||
Hid.InputConfig.Value = cff.InputConfig ?? [];
|
||||
Hid.RainbowSpeed.Value = cff.RainbowSpeed;
|
||||
@ -433,7 +435,9 @@ namespace Ryujinx.Ava.Utilities.Configuration
|
||||
(62, static cff => cff.RainbowSpeed = 1f),
|
||||
(63, static cff => cff.MatchSystemTime = false),
|
||||
(64, static cff => cff.LoggingEnableAvalonia = false),
|
||||
(65, static cff => cff.UpdateCheckerType = cff.CheckUpdatesOnStart ? UpdaterType.PromptAtStartup : UpdaterType.Off)
|
||||
(65, static cff => cff.UpdateCheckerType = cff.CheckUpdatesOnStart ? UpdaterType.PromptAtStartup : UpdaterType.Off),
|
||||
(66, static cff => cff.DisableInputWhenOutOfFocus = false),
|
||||
(67, static cff => cff.FocusLostActionType = cff.DisableInputWhenOutOfFocus ? FocusLostType.BlockInput : FocusLostType.DoNothing)
|
||||
);
|
||||
}
|
||||
}
|
||||
|
@ -447,6 +447,11 @@ namespace Ryujinx.Ava.Utilities.Configuration
|
||||
/// Enable or disable mouse support (Independent from controllers binding)
|
||||
/// </summary>
|
||||
public ReactiveObject<bool> EnableMouse { get; private set; }
|
||||
|
||||
/// <summary>
|
||||
/// Enable/disable the ability to control Ryujinx when it's not the currently focused window.
|
||||
/// </summary>
|
||||
public ReactiveObject<bool> DisableInputWhenOutOfFocus { get; private set; }
|
||||
|
||||
/// <summary>
|
||||
/// Hotkey Keyboard Bindings
|
||||
@ -469,6 +474,7 @@ namespace Ryujinx.Ava.Utilities.Configuration
|
||||
{
|
||||
EnableKeyboard = new ReactiveObject<bool>();
|
||||
EnableMouse = new ReactiveObject<bool>();
|
||||
DisableInputWhenOutOfFocus = new ReactiveObject<bool>();
|
||||
Hotkeys = new ReactiveObject<KeyboardHotkeys>();
|
||||
InputConfig = new ReactiveObject<List<InputConfig>>();
|
||||
RainbowSpeed = new ReactiveObject<float>();
|
||||
@ -773,6 +779,11 @@ namespace Ryujinx.Ava.Utilities.Configuration
|
||||
/// Checks for updates when Ryujinx starts when enabled, either prompting when an update is found or just showing a notification.
|
||||
/// </summary>
|
||||
public ReactiveObject<UpdaterType> UpdateCheckerType { get; private set; }
|
||||
|
||||
/// <summary>
|
||||
/// How the emulator should behave when you click off/on the window.
|
||||
/// </summary>
|
||||
public ReactiveObject<FocusLostType> FocusLostActionType { get; private set; }
|
||||
|
||||
/// <summary>
|
||||
/// Show "Confirm Exit" Dialog
|
||||
@ -811,6 +822,7 @@ namespace Ryujinx.Ava.Utilities.Configuration
|
||||
EnableDiscordIntegration = new ReactiveObject<bool>();
|
||||
CheckUpdatesOnStart = new ReactiveObject<bool>();
|
||||
UpdateCheckerType = new ReactiveObject<UpdaterType>();
|
||||
FocusLostActionType = new ReactiveObject<FocusLostType>();
|
||||
ShowConfirmExit = new ReactiveObject<bool>();
|
||||
RememberWindowState = new ReactiveObject<bool>();
|
||||
ShowTitleBar = new ReactiveObject<bool>();
|
||||
|
@ -57,6 +57,7 @@ namespace Ryujinx.Ava.Utilities.Configuration
|
||||
EnableDiscordIntegration = EnableDiscordIntegration,
|
||||
CheckUpdatesOnStart = CheckUpdatesOnStart,
|
||||
UpdateCheckerType = UpdateCheckerType,
|
||||
FocusLostActionType = FocusLostActionType,
|
||||
ShowConfirmExit = ShowConfirmExit,
|
||||
RememberWindowState = RememberWindowState,
|
||||
ShowTitleBar = ShowTitleBar,
|
||||
@ -131,6 +132,7 @@ namespace Ryujinx.Ava.Utilities.Configuration
|
||||
ShowConsole = UI.ShowConsole,
|
||||
EnableKeyboard = Hid.EnableKeyboard,
|
||||
EnableMouse = Hid.EnableMouse,
|
||||
DisableInputWhenOutOfFocus = Hid.DisableInputWhenOutOfFocus,
|
||||
Hotkeys = Hid.Hotkeys,
|
||||
InputConfig = Hid.InputConfig,
|
||||
RainbowSpeed = Hid.RainbowSpeed,
|
||||
@ -177,6 +179,7 @@ namespace Ryujinx.Ava.Utilities.Configuration
|
||||
System.EnableDockedMode.Value = true;
|
||||
EnableDiscordIntegration.Value = true;
|
||||
UpdateCheckerType.Value = UpdaterType.PromptAtStartup;
|
||||
FocusLostActionType.Value = FocusLostType.DoNothing;
|
||||
ShowConfirmExit.Value = true;
|
||||
RememberWindowState.Value = true;
|
||||
ShowTitleBar.Value = !OperatingSystem.IsWindows();
|
||||
@ -245,6 +248,7 @@ namespace Ryujinx.Ava.Utilities.Configuration
|
||||
UI.WindowStartup.WindowMaximized.Value = false;
|
||||
Hid.EnableKeyboard.Value = false;
|
||||
Hid.EnableMouse.Value = false;
|
||||
Hid.DisableInputWhenOutOfFocus.Value = false;
|
||||
Hid.Hotkeys.Value = new KeyboardHotkeys
|
||||
{
|
||||
ToggleVSyncMode = Key.F1,
|
||||
|
15
src/Ryujinx/Utilities/Configuration/UI/FocusLostType.cs
Normal file
15
src/Ryujinx/Utilities/Configuration/UI/FocusLostType.cs
Normal file
@ -0,0 +1,15 @@
|
||||
using Ryujinx.Common.Utilities;
|
||||
using System.Text.Json.Serialization;
|
||||
|
||||
namespace Ryujinx.Ava.Utilities.Configuration.UI
|
||||
{
|
||||
[JsonConverter(typeof(TypedStringEnumConverter<FocusLostType>))]
|
||||
public enum FocusLostType
|
||||
{
|
||||
DoNothing,
|
||||
BlockInput,
|
||||
MuteAudio,
|
||||
BlockInputAndMuteAudio,
|
||||
PauseEmulation
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user