LOCALPROC CheckMouseState(void) { si5b MotionX; si5b MotionY; /* TODO: - Don't hardcode motion values - Acceleration? - Allow key remapping - Handle touchscreen input (non-mouse motion) - Handle touchscreen input (trackpad style mouse motion) */ if (0 != (KeysHeld & KEY_LEFT)) { MotionX = -4; } else if (0 != (KeysHeld & KEY_RIGHT)) { MotionX = 4; } if (0 != (KeysHeld & KEY_UP)) { MotionY = -4; } else if (0 != (KeysHeld & KEY_DOWN)) { MotionY = 4; } HaveMouseMotion = trueblnr; MyMousePositionSetDelta(MotionX, MotionY); MyMouseButtonSet(0 != (KeysHeld & KEY_A)); }
LOCALPROC MyEvtQTryRecoverFromFull(void) { MyMouseButtonSet(falseblnr); DisconnectKeyCodes(0); }