Uses hasflag instead of bitwise comparison

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

View file

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