Uses hasflag instead of bitwise comparison

This commit is contained in:
Andy Adshead 2019-04-17 20:52:01 +01:00
commit b3c533429b

View file

@ -243,8 +243,8 @@ namespace Ryujinx
controller.SendInput(currentButton, leftJoystick, rightJoystick); controller.SendInput(currentButton, leftJoystick, rightJoystick);
// Toggle vsync // Toggle vsync
if ((currentHotkeyButtons & HidHotkeyButtons.ToggleVSync) != 0 && if (currentHotkeyButtons.HasFlag(HidHotkeyButtons.ToggleVSync) &&
(_prevHotkeyButtons & HidHotkeyButtons.ToggleVSync) == 0) !_prevHotkeyButtons.HasFlag(HidHotkeyButtons.ToggleVSync))
{ {
_device.EnableDeviceVsync = !_device.EnableDeviceVsync; _device.EnableDeviceVsync = !_device.EnableDeviceVsync;
} }