mirror of
https://github.com/Ryujinx-NX/Ryujinx.git
synced 2024-11-14 21:17:43 -07:00
b2b736abc2
* Fix typos * Remove unneeded using statements * Enforce var style more * Remove redundant qualifiers * Fix some indentation * Disable naming warnings on files with external enum names * Fix build * Mass find & replace for comments with no spacing * Standardize todo capitalization and for/if spacing
29 lines
654 B
C#
29 lines
654 B
C#
using OpenTK.Input;
|
|
|
|
namespace Ryujinx.Profiler
|
|
{
|
|
public struct ProfilerButtons
|
|
{
|
|
public Key ToggleProfiler;
|
|
}
|
|
|
|
public class ProfilerKeyboardHandler
|
|
{
|
|
public ProfilerButtons Buttons;
|
|
|
|
private KeyboardState _prevKeyboard;
|
|
|
|
public ProfilerKeyboardHandler(ProfilerButtons buttons)
|
|
{
|
|
Buttons = buttons;
|
|
}
|
|
|
|
public bool TogglePressed(KeyboardState keyboard) => !keyboard[Buttons.ToggleProfiler] && _prevKeyboard[Buttons.ToggleProfiler];
|
|
|
|
public void SetPrevKeyboardState(KeyboardState keyboard)
|
|
{
|
|
_prevKeyboard = keyboard;
|
|
}
|
|
}
|
|
}
|