Reverted the changed XOR-call

This commit is contained in:
Unknown6656 2016-08-19 19:38:05 +02:00
parent a7f72cc2e6
commit bc8e7a7659

View file

@ -59,9 +59,9 @@ namespace Cosmos.HAL
if (ctrl)
if (alt)
key = xor(shift, caps) ? map.ControlAltShift : map.ControlAlt;
key = shift ^ caps ? map.ControlAltShift : map.ControlAlt;
else
key = xor(shift, caps) ? map.ControlShift : map.Control;
key = shift ^ caps ? map.ControlShift : map.Control;
else if (shift)
key = caps ? map.ShiftCaps
: num ? map.ShiftNum
@ -82,8 +82,5 @@ namespace Cosmos.HAL
return found ? keyev : null;
}
#warning TODO: WHY IS XOR FOR BOOLEANS NOT IMPLEMENTED!?
internal static bool xor(bool b1, bool b2) => (b1 || b2) && !(b1 && b2);
}
}