mirror of
https://github.com/Ryujinx/Ryujinx.git
synced 2024-10-01 12:30:00 +02: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
28 lines
654 B
C#
28 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;
|
|
}
|
|
}
|
|
}
|