mirror of
https://git.ryujinx.app/projects/Kenji-NX.git
synced 2026-11-19 09:21:15 +01:00
UI: More advanced customization for what happens when Ryujinx loses focus
This commit is contained in:
1 parent
d765814a1b
commit
5ecd35a1c6
28 files changed
+287
-38
No files matched your search
@@ -29,10 +29,10 @@ namespace Ryujinx.Ava.UI.ViewModels
|
||||
Version = Program.Version;
|
||||
UpdateLogoTheme(ConfigurationState.Instance.UI.BaseStyle.Value);
|
||||
|
||||
ThemeManager.ThemeChanged += ThemeManager_ThemeChanged;
|
||||
App.ThemeChanged += Ryujinx_ThemeChanged;
|
||||
}
|
||||
|
||||
private void ThemeManager_ThemeChanged(object sender, EventArgs e)
|
||||
private void Ryujinx_ThemeChanged()
|
||||
{
|
||||
Dispatcher.UIThread.Post(() => UpdateLogoTheme(ConfigurationState.Instance.UI.BaseStyle.Value));
|
||||
}
|
||||
@@ -55,7 +55,7 @@ namespace Ryujinx.Ava.UI.ViewModels
|
||||
|
||||
public void Dispose()
|
||||
{
|
||||
ThemeManager.ThemeChanged -= ThemeManager_ThemeChanged;
|
||||
App.ThemeChanged -= Ryujinx_ThemeChanged;
|
||||
GC.SuppressFinalize(this);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -11,6 +11,7 @@ using Ryujinx.Ava.Common.Locale;
|
||||
using Ryujinx.Ava.UI.Helpers;
|
||||
using Ryujinx.Ava.UI.Models.Input;
|
||||
using Ryujinx.Ava.UI.Windows;
|
||||
using Ryujinx.Ava.Utilities.Configuration.UI;
|
||||
using Ryujinx.Common.Configuration;
|
||||
using Ryujinx.Common.Configuration.Multiplayer;
|
||||
using Ryujinx.Common.GraphicsDriver;
|
||||
@@ -154,6 +155,8 @@ namespace Ryujinx.Ava.UI.ViewModels
|
||||
public bool EnableMouse { get; set; }
|
||||
public bool DisableInputWhenOutOfFocus { get; set; }
|
||||
|
||||
public int FocusLostActionType { get; set; }
|
||||
|
||||
public VSyncMode VSyncMode
|
||||
{
|
||||
get => _vSyncMode;
|
||||
@@ -575,6 +578,7 @@ namespace Ryujinx.Ava.UI.ViewModels
|
||||
ShowConfirmExit = config.ShowConfirmExit;
|
||||
RememberWindowState = config.RememberWindowState;
|
||||
HideCursor = (int)config.HideCursor.Value;
|
||||
FocusLostActionType = (int)config.FocusLostActionType.Value;
|
||||
|
||||
GameDirectories.Clear();
|
||||
GameDirectories.AddRange(config.UI.GameDirs.Value);
|
||||
@@ -693,6 +697,7 @@ namespace Ryujinx.Ava.UI.ViewModels
|
||||
config.ShowConfirmExit.Value = ShowConfirmExit;
|
||||
config.RememberWindowState.Value = RememberWindowState;
|
||||
config.HideCursor.Value = (HideCursorMode)HideCursor;
|
||||
config.FocusLostActionType.Value = (FocusLostType)FocusLostActionType;
|
||||
|
||||
if (_gameDirectoryChanged)
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user