mirror of
https://github.com/ryujinx-mirror/ryujinx.git
synced 2024-11-25 00:40:13 +01: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;
|
|
}
|
|
}
|
|
}
|