소스 검색

UI: Attach dev tools in debug.

Evan Husted 1 년 전
부모
커밋
9a1bdaae16
1개의 변경된 파일5개의 추가작업 그리고 1개의 파일을 삭제
  1. 5 1
      src/Ryujinx/UI/ViewModels/MainWindowViewModel.cs

+ 5 - 1
src/Ryujinx/UI/ViewModels/MainWindowViewModel.cs

@@ -170,6 +170,10 @@ namespace Ryujinx.Ava.UI.ViewModels
             SwitchToGameControl = switchToGameControl;
             SetMainContent = setMainContent;
             TopLevel = topLevel;
+            
+#if DEBUG
+            topLevel.AttachDevTools(new KeyGesture(Avalonia.Input.Key.F12, KeyModifiers.Control));
+#endif
         }
 
         #region Properties
@@ -1434,7 +1438,7 @@ namespace Ryujinx.Ava.UI.ViewModels
         {
             if (IsGameRunning)
             {
-                ConfigurationState.Instance.System.EnableDockedMode.Value = !ConfigurationState.Instance.System.EnableDockedMode.Value;
+                ConfigurationState.Instance.System.EnableDockedMode.Toggle();
             }
         }