diff --git a/ChocolArm64/ChocolArm64.csproj b/ChocolArm64/ChocolArm64.csproj index 1156e361f5..7c9737a17c 100644 --- a/ChocolArm64/ChocolArm64.csproj +++ b/ChocolArm64/ChocolArm64.csproj @@ -3,16 +3,27 @@ netcoreapp2.1 win10-x64;osx-x64;linux-x64 + Debug;Release;Profile Debug;Profile Release true + + true + TRACE;USE_PROFILING + + true + + true + TRACE;USE_PROFILING + + diff --git a/Ryujinx.Audio/Ryujinx.Audio.csproj b/Ryujinx.Audio/Ryujinx.Audio.csproj index 82d2a4d152..53d3b1776f 100644 --- a/Ryujinx.Audio/Ryujinx.Audio.csproj +++ b/Ryujinx.Audio/Ryujinx.Audio.csproj @@ -3,16 +3,27 @@ netcoreapp2.1 win10-x64;osx-x64;linux-x64 + Debug;Release;Profile Debug;Profile Release true + + true + TRACE;USE_PROFILING + + true + + true + TRACE;USE_PROFILING + + diff --git a/Ryujinx.Common/Ryujinx.Common.csproj b/Ryujinx.Common/Ryujinx.Common.csproj index 5c9293b707..c4a7f3b5ed 100644 --- a/Ryujinx.Common/Ryujinx.Common.csproj +++ b/Ryujinx.Common/Ryujinx.Common.csproj @@ -3,14 +3,25 @@ netcoreapp2.1 win10-x64;osx-x64;linux-x64 + Debug;Release;Profile Debug;Profile Release true + + true + TRACE;USE_PROFILING + + true + + true + TRACE;USE_PROFILING + + diff --git a/Ryujinx.Graphics/Ryujinx.Graphics.csproj b/Ryujinx.Graphics/Ryujinx.Graphics.csproj index a4324715f3..e248526574 100644 --- a/Ryujinx.Graphics/Ryujinx.Graphics.csproj +++ b/Ryujinx.Graphics/Ryujinx.Graphics.csproj @@ -3,16 +3,27 @@ netcoreapp2.1 win10-x64;osx-x64;linux-x64 + Debug;Release;Profile Debug;Profile Release true + + true + TRACE;USE_PROFILING + + true + + true + TRACE;USE_PROFILING + + diff --git a/Ryujinx.HLE/Ryujinx.HLE.csproj b/Ryujinx.HLE/Ryujinx.HLE.csproj index c3f67ed374..542385068a 100644 --- a/Ryujinx.HLE/Ryujinx.HLE.csproj +++ b/Ryujinx.HLE/Ryujinx.HLE.csproj @@ -3,16 +3,27 @@ netcoreapp2.1 win10-x64;osx-x64;linux-x64 + Debug;Release;Profile Debug;Profile Release true + + true + TRACE;USE_PROFILING + + true + + true + TRACE;USE_PROFILING + + diff --git a/Ryujinx.LLE/Luea.csproj b/Ryujinx.LLE/Luea.csproj index 5c57156812..aa442b95ef 100644 --- a/Ryujinx.LLE/Luea.csproj +++ b/Ryujinx.LLE/Luea.csproj @@ -4,6 +4,15 @@ netcoreapp2.1 win10-x64;osx-x64;linux-x64 Exe + Debug;Release;Profile Debug;Profile Release + + + + TRACE;USE_PROFILING + + + + TRACE;USE_PROFILING diff --git a/Ryujinx.Profiler/Profile.cs b/Ryujinx.Profiler/Profile.cs index 9373a8c258..143c517db8 100644 --- a/Ryujinx.Profiler/Profile.cs +++ b/Ryujinx.Profiler/Profile.cs @@ -14,6 +14,7 @@ namespace Ryujinx.Profiler public static bool ProfilingEnabled() { + #if USE_PROFILING if (!_settings.Enabled) return false; @@ -21,13 +22,18 @@ namespace Ryujinx.Profiler _profileInstance = new InternalProfile(_settings.History); return true; + #else + return false; + #endif } + [Conditional("USE_PROFILING")] public static void Configure(ProfilerSettings settings) { _settings = settings; } + [Conditional("USE_PROFILING")] public static void FinishProfiling() { if (!ProfilingEnabled()) @@ -39,6 +45,7 @@ namespace Ryujinx.Profiler _profileInstance.Dispose(); } + [Conditional("USE_PROFILING")] public static void FlagTime(TimingFlagType flagType) { if (!ProfilingEnabled()) @@ -46,6 +53,7 @@ namespace Ryujinx.Profiler _profileInstance.FlagTime(flagType); } + [Conditional("USE_PROFILING")] public static void RegisterFlagReciever(Action reciever) { if (!ProfilingEnabled()) @@ -53,13 +61,16 @@ namespace Ryujinx.Profiler _profileInstance.RegisterFlagReciever(reciever); } + [Conditional("USE_PROFILING")] public static void Begin(ProfileConfig config) { if (!ProfilingEnabled()) return; _profileInstance.BeginProfile(config); + Console.WriteLine(""); } + [Conditional("USE_PROFILING")] public static void End(ProfileConfig config) { if (!ProfilingEnabled()) @@ -69,6 +80,7 @@ namespace Ryujinx.Profiler public static void Method(ProfileConfig config, Action method) { + #if USE_PROFILING // If profiling is disabled just call the method if (!ProfilingEnabled()) { @@ -79,13 +91,20 @@ namespace Ryujinx.Profiler Begin(config); method(); End(config); + #else + method(); + #endif } public static string GetSession() { + #if USE_PROFILING if (!ProfilingEnabled()) return null; return _profileInstance.GetSession(); + #else + return ""; + #endif } public static double ConvertTicksToMS(long ticks) @@ -105,23 +124,35 @@ namespace Ryujinx.Profiler public static Dictionary GetProfilingData() { + #if USE_PROFILING if (!ProfilingEnabled()) return new Dictionary(); return _profileInstance.GetProfilingData(); + #else + return new Dictionary(); + #endif } public static TimingFlag[] GetTimingFlags() { + #if USE_PROFILING if (!ProfilingEnabled()) return new TimingFlag[0]; return _profileInstance.GetTimingFlags(); + #else + return new TimingFlag[0]; + #endif } public static long GetCurrentTime() { + #if USE_PROFILING if (!ProfilingEnabled()) return 0; return _profileInstance.CurrentTime; + #else + return 0; + #endif } } } diff --git a/Ryujinx.Profiler/Ryujinx.Profiler.csproj b/Ryujinx.Profiler/Ryujinx.Profiler.csproj index 4d33758c2b..fdc124a326 100644 --- a/Ryujinx.Profiler/Ryujinx.Profiler.csproj +++ b/Ryujinx.Profiler/Ryujinx.Profiler.csproj @@ -4,6 +4,19 @@ netcoreapp2.1 win10-x64;osx-x64;linux-x64 true + Debug;Release;Profile Debug;Profile Release + + + + TRACE + + + + TRACE;USE_PROFILING + + + + TRACE;USE_PROFILING diff --git a/Ryujinx.ShaderTools/Ryujinx.ShaderTools.csproj b/Ryujinx.ShaderTools/Ryujinx.ShaderTools.csproj index 18452f0a61..fb2b3a9b35 100644 --- a/Ryujinx.ShaderTools/Ryujinx.ShaderTools.csproj +++ b/Ryujinx.ShaderTools/Ryujinx.ShaderTools.csproj @@ -4,6 +4,15 @@ netcoreapp2.1 win10-x64;osx-x64;linux-x64 Exe + Debug;Release;Profile Debug;Profile Release + + + + TRACE;USE_PROFILING + + + + TRACE;USE_PROFILING diff --git a/Ryujinx.Tests.Unicorn/Ryujinx.Tests.Unicorn.csproj b/Ryujinx.Tests.Unicorn/Ryujinx.Tests.Unicorn.csproj index ee7c103d55..02b9af1247 100644 --- a/Ryujinx.Tests.Unicorn/Ryujinx.Tests.Unicorn.csproj +++ b/Ryujinx.Tests.Unicorn/Ryujinx.Tests.Unicorn.csproj @@ -4,12 +4,21 @@ netcoreapp2.1 win10-x64;osx-x64;linux-x64 true + Debug;Release;Profile Debug;Profile Release false + + TRACE;USE_PROFILING + + + + TRACE;USE_PROFILING + + diff --git a/Ryujinx.Tests/Ryujinx.Tests.csproj b/Ryujinx.Tests/Ryujinx.Tests.csproj index 35405c769f..bb049c839f 100644 --- a/Ryujinx.Tests/Ryujinx.Tests.csproj +++ b/Ryujinx.Tests/Ryujinx.Tests.csproj @@ -9,12 +9,21 @@ windows osx linux + Debug;Release;Profile Debug;Profile Release false + + TRACE;USE_PROFILING + + + + TRACE;USE_PROFILING + + diff --git a/Ryujinx.sln b/Ryujinx.sln index 2b20326c66..d9dc723a73 100644 --- a/Ryujinx.sln +++ b/Ryujinx.sln @@ -31,51 +31,97 @@ EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU + Profile Debug|Any CPU = Profile Debug|Any CPU + Profile Release|Any CPU = Profile Release|Any CPU Release|Any CPU = Release|Any CPU EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution {074045D4-3ED2-4711-9169-E385F2BFB5A0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {074045D4-3ED2-4711-9169-E385F2BFB5A0}.Debug|Any CPU.Build.0 = Debug|Any CPU + {074045D4-3ED2-4711-9169-E385F2BFB5A0}.Profile Debug|Any CPU.ActiveCfg = Profile Debug|Any CPU + {074045D4-3ED2-4711-9169-E385F2BFB5A0}.Profile Debug|Any CPU.Build.0 = Profile Debug|Any CPU + {074045D4-3ED2-4711-9169-E385F2BFB5A0}.Profile Release|Any CPU.ActiveCfg = Profile Release|Any CPU + {074045D4-3ED2-4711-9169-E385F2BFB5A0}.Profile Release|Any CPU.Build.0 = Profile Release|Any CPU {074045D4-3ED2-4711-9169-E385F2BFB5A0}.Release|Any CPU.ActiveCfg = Release|Any CPU {074045D4-3ED2-4711-9169-E385F2BFB5A0}.Release|Any CPU.Build.0 = Release|Any CPU {EBB55AEA-C7D7-4DEB-BF96-FA1789E225E9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {EBB55AEA-C7D7-4DEB-BF96-FA1789E225E9}.Debug|Any CPU.Build.0 = Debug|Any CPU + {EBB55AEA-C7D7-4DEB-BF96-FA1789E225E9}.Profile Debug|Any CPU.ActiveCfg = Profile Debug|Any CPU + {EBB55AEA-C7D7-4DEB-BF96-FA1789E225E9}.Profile Debug|Any CPU.Build.0 = Profile Debug|Any CPU + {EBB55AEA-C7D7-4DEB-BF96-FA1789E225E9}.Profile Release|Any CPU.ActiveCfg = Profile Release|Any CPU + {EBB55AEA-C7D7-4DEB-BF96-FA1789E225E9}.Profile Release|Any CPU.Build.0 = Profile Release|Any CPU {EBB55AEA-C7D7-4DEB-BF96-FA1789E225E9}.Release|Any CPU.ActiveCfg = Release|Any CPU {EBB55AEA-C7D7-4DEB-BF96-FA1789E225E9}.Release|Any CPU.Build.0 = Release|Any CPU {D8F72938-78EF-4E8C-BAFE-531C9C3C8F15}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {D8F72938-78EF-4E8C-BAFE-531C9C3C8F15}.Debug|Any CPU.Build.0 = Debug|Any CPU + {D8F72938-78EF-4E8C-BAFE-531C9C3C8F15}.Profile Debug|Any CPU.ActiveCfg = Profile Debug|Any CPU + {D8F72938-78EF-4E8C-BAFE-531C9C3C8F15}.Profile Debug|Any CPU.Build.0 = Profile Debug|Any CPU + {D8F72938-78EF-4E8C-BAFE-531C9C3C8F15}.Profile Release|Any CPU.ActiveCfg = Profile Release|Any CPU + {D8F72938-78EF-4E8C-BAFE-531C9C3C8F15}.Profile Release|Any CPU.Build.0 = Profile Release|Any CPU {D8F72938-78EF-4E8C-BAFE-531C9C3C8F15}.Release|Any CPU.ActiveCfg = Release|Any CPU {D8F72938-78EF-4E8C-BAFE-531C9C3C8F15}.Release|Any CPU.Build.0 = Release|Any CPU {CB92CFF9-1D62-4D4F-9E88-8130EF61E351}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {CB92CFF9-1D62-4D4F-9E88-8130EF61E351}.Debug|Any CPU.Build.0 = Debug|Any CPU + {CB92CFF9-1D62-4D4F-9E88-8130EF61E351}.Profile Debug|Any CPU.ActiveCfg = Profile Debug|Any CPU + {CB92CFF9-1D62-4D4F-9E88-8130EF61E351}.Profile Debug|Any CPU.Build.0 = Profile Debug|Any CPU + {CB92CFF9-1D62-4D4F-9E88-8130EF61E351}.Profile Release|Any CPU.ActiveCfg = Profile Release|Any CPU + {CB92CFF9-1D62-4D4F-9E88-8130EF61E351}.Profile Release|Any CPU.Build.0 = Profile Release|Any CPU {CB92CFF9-1D62-4D4F-9E88-8130EF61E351}.Release|Any CPU.ActiveCfg = Release|Any CPU {CB92CFF9-1D62-4D4F-9E88-8130EF61E351}.Release|Any CPU.Build.0 = Release|Any CPU {2345A1A7-8DEF-419B-9AFB-4DFD41D20D05}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {2345A1A7-8DEF-419B-9AFB-4DFD41D20D05}.Debug|Any CPU.Build.0 = Debug|Any CPU + {2345A1A7-8DEF-419B-9AFB-4DFD41D20D05}.Profile Debug|Any CPU.ActiveCfg = Profile Debug|Any CPU + {2345A1A7-8DEF-419B-9AFB-4DFD41D20D05}.Profile Debug|Any CPU.Build.0 = Profile Debug|Any CPU + {2345A1A7-8DEF-419B-9AFB-4DFD41D20D05}.Profile Release|Any CPU.ActiveCfg = Profile Release|Any CPU + {2345A1A7-8DEF-419B-9AFB-4DFD41D20D05}.Profile Release|Any CPU.Build.0 = Profile Release|Any CPU {2345A1A7-8DEF-419B-9AFB-4DFD41D20D05}.Release|Any CPU.ActiveCfg = Release|Any CPU {2345A1A7-8DEF-419B-9AFB-4DFD41D20D05}.Release|Any CPU.Build.0 = Release|Any CPU {EAAE36AF-7781-4578-A7E0-F0EFD2025569}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {EAAE36AF-7781-4578-A7E0-F0EFD2025569}.Debug|Any CPU.Build.0 = Debug|Any CPU + {EAAE36AF-7781-4578-A7E0-F0EFD2025569}.Profile Debug|Any CPU.ActiveCfg = Profile Debug|Any CPU + {EAAE36AF-7781-4578-A7E0-F0EFD2025569}.Profile Debug|Any CPU.Build.0 = Profile Debug|Any CPU + {EAAE36AF-7781-4578-A7E0-F0EFD2025569}.Profile Release|Any CPU.ActiveCfg = Profile Release|Any CPU + {EAAE36AF-7781-4578-A7E0-F0EFD2025569}.Profile Release|Any CPU.Build.0 = Profile Release|Any CPU {EAAE36AF-7781-4578-A7E0-F0EFD2025569}.Release|Any CPU.ActiveCfg = Release|Any CPU {EAAE36AF-7781-4578-A7E0-F0EFD2025569}.Release|Any CPU.Build.0 = Release|Any CPU {5C1D818E-682A-46A5-9D54-30006E26C270}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {5C1D818E-682A-46A5-9D54-30006E26C270}.Debug|Any CPU.Build.0 = Debug|Any CPU + {5C1D818E-682A-46A5-9D54-30006E26C270}.Profile Debug|Any CPU.ActiveCfg = Profile Debug|Any CPU + {5C1D818E-682A-46A5-9D54-30006E26C270}.Profile Debug|Any CPU.Build.0 = Profile Debug|Any CPU + {5C1D818E-682A-46A5-9D54-30006E26C270}.Profile Release|Any CPU.ActiveCfg = Profile Release|Any CPU + {5C1D818E-682A-46A5-9D54-30006E26C270}.Profile Release|Any CPU.Build.0 = Profile Release|Any CPU {5C1D818E-682A-46A5-9D54-30006E26C270}.Release|Any CPU.ActiveCfg = Release|Any CPU {5C1D818E-682A-46A5-9D54-30006E26C270}.Release|Any CPU.Build.0 = Release|Any CPU {3AB294D0-2230-468F-9EB3-BDFCAEAE99A5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {3AB294D0-2230-468F-9EB3-BDFCAEAE99A5}.Debug|Any CPU.Build.0 = Debug|Any CPU + {3AB294D0-2230-468F-9EB3-BDFCAEAE99A5}.Profile Debug|Any CPU.ActiveCfg = Profile Debug|Any CPU + {3AB294D0-2230-468F-9EB3-BDFCAEAE99A5}.Profile Debug|Any CPU.Build.0 = Profile Debug|Any CPU + {3AB294D0-2230-468F-9EB3-BDFCAEAE99A5}.Profile Release|Any CPU.ActiveCfg = Profile Release|Any CPU + {3AB294D0-2230-468F-9EB3-BDFCAEAE99A5}.Profile Release|Any CPU.Build.0 = Profile Release|Any CPU {3AB294D0-2230-468F-9EB3-BDFCAEAE99A5}.Release|Any CPU.ActiveCfg = Release|Any CPU {3AB294D0-2230-468F-9EB3-BDFCAEAE99A5}.Release|Any CPU.Build.0 = Release|Any CPU {8E7D36DD-9626-47E2-8EF5-8F2F66751C9C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {8E7D36DD-9626-47E2-8EF5-8F2F66751C9C}.Debug|Any CPU.Build.0 = Debug|Any CPU + {8E7D36DD-9626-47E2-8EF5-8F2F66751C9C}.Profile Debug|Any CPU.ActiveCfg = Profile Debug|Any CPU + {8E7D36DD-9626-47E2-8EF5-8F2F66751C9C}.Profile Debug|Any CPU.Build.0 = Profile Debug|Any CPU + {8E7D36DD-9626-47E2-8EF5-8F2F66751C9C}.Profile Release|Any CPU.ActiveCfg = Profile Release|Any CPU + {8E7D36DD-9626-47E2-8EF5-8F2F66751C9C}.Profile Release|Any CPU.Build.0 = Profile Release|Any CPU {8E7D36DD-9626-47E2-8EF5-8F2F66751C9C}.Release|Any CPU.ActiveCfg = Release|Any CPU {8E7D36DD-9626-47E2-8EF5-8F2F66751C9C}.Release|Any CPU.Build.0 = Release|Any CPU {5FD4E4F6-8928-4B3C-BE07-28A675C17226}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {5FD4E4F6-8928-4B3C-BE07-28A675C17226}.Debug|Any CPU.Build.0 = Debug|Any CPU + {5FD4E4F6-8928-4B3C-BE07-28A675C17226}.Profile Debug|Any CPU.ActiveCfg = Profile Debug|Any CPU + {5FD4E4F6-8928-4B3C-BE07-28A675C17226}.Profile Debug|Any CPU.Build.0 = Profile Debug|Any CPU + {5FD4E4F6-8928-4B3C-BE07-28A675C17226}.Profile Release|Any CPU.ActiveCfg = Profile Release|Any CPU + {5FD4E4F6-8928-4B3C-BE07-28A675C17226}.Profile Release|Any CPU.Build.0 = Profile Release|Any CPU {5FD4E4F6-8928-4B3C-BE07-28A675C17226}.Release|Any CPU.ActiveCfg = Release|Any CPU {5FD4E4F6-8928-4B3C-BE07-28A675C17226}.Release|Any CPU.Build.0 = Release|Any CPU {4E69B67F-8CA7-42CF-A9E1-CCB0915DFB34}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {4E69B67F-8CA7-42CF-A9E1-CCB0915DFB34}.Debug|Any CPU.Build.0 = Debug|Any CPU + {4E69B67F-8CA7-42CF-A9E1-CCB0915DFB34}.Profile Debug|Any CPU.ActiveCfg = Profile Debug|Any CPU + {4E69B67F-8CA7-42CF-A9E1-CCB0915DFB34}.Profile Debug|Any CPU.Build.0 = Profile Debug|Any CPU + {4E69B67F-8CA7-42CF-A9E1-CCB0915DFB34}.Profile Release|Any CPU.ActiveCfg = Profile Release|Any CPU + {4E69B67F-8CA7-42CF-A9E1-CCB0915DFB34}.Profile Release|Any CPU.Build.0 = Profile Release|Any CPU {4E69B67F-8CA7-42CF-A9E1-CCB0915DFB34}.Release|Any CPU.ActiveCfg = Release|Any CPU {4E69B67F-8CA7-42CF-A9E1-CCB0915DFB34}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection diff --git a/Ryujinx/Ryujinx.conf b/Ryujinx/Ryujinx.conf index 3c2280b3e8..2f1436bf18 100644 --- a/Ryujinx/Ryujinx.conf +++ b/Ryujinx/Ryujinx.conf @@ -22,13 +22,13 @@ Logging_Enable_Error = true #Filtered log classes, seperated by ", ", eg. `Logging_Filtered_Classes = Loader, ServiceFS` Logging_Filtered_Classes = -#Enable profiling +#Enable profiling (Only available on a profiling enabled build) Profiling_Enabled = true #Set profile file dump location, if blank file dumping disabled. (e.g. `ProfileDump.csv`) Profile_Dump_Path = -#Update rate for profiler UI, in hertz +#Update rate for profiler UI, in hertz. -1 updates every time a frame is issued Profiling_Update_Rate = 4 #Set how long to keep profiling data in seconds, reduce if profiling is taking too much RAM diff --git a/Ryujinx/Ryujinx.csproj b/Ryujinx/Ryujinx.csproj index 7554b6abfe..d381719f0e 100644 --- a/Ryujinx/Ryujinx.csproj +++ b/Ryujinx/Ryujinx.csproj @@ -5,6 +5,15 @@ win10-x64;osx-x64;linux-x64 Exe true + Debug;Release;Profile Debug;Profile Release + + + + TRACE;USE_PROFILING + + + + TRACE;USE_PROFILING diff --git a/Ryujinx/Ui/GLScreen.cs b/Ryujinx/Ui/GLScreen.cs index 5959bba0a2..0c842a186e 100644 --- a/Ryujinx/Ui/GLScreen.cs +++ b/Ryujinx/Ui/GLScreen.cs @@ -30,14 +30,16 @@ namespace Ryujinx private Thread _renderThread; - private ProfileWindowManager _profileWindow; - private bool _resizeEvent; private bool _titleEvent; private string _newTitle; + #if USE_PROFILING + private ProfileWindowManager _profileWindow; + #endif + public GlScreen(Switch device, IGalRenderer renderer) : base(1280, 720, new GraphicsMode(), "Ryujinx", 0, @@ -51,8 +53,10 @@ namespace Ryujinx (DisplayDevice.Default.Width / 2) - (Width / 2), (DisplayDevice.Default.Height / 2) - (Height / 2)); + #if USE_PROFILING // Start profile window, it will handle itself from there _profileWindow = new ProfileWindowManager(); + #endif } private void RenderLoop() @@ -149,12 +153,14 @@ namespace Ryujinx { KeyboardState keyboard = _keyboard.Value; + #if USE_PROFILING // Debug if (Config.NPadDebug.TogglePressed(keyboard)) { _profileWindow.ToggleVisible(); } Config.NPadDebug.SetPrevKeyboardState(keyboard); + #endif // Normal Input currentButton = Config.NpadKeyboard.GetButtons(keyboard);