Beispiel #1
0
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));
}
Beispiel #2
0
LOCALPROC MyEvtQTryRecoverFromFull(void)
{
	MyMouseButtonSet(falseblnr);
	DisconnectKeyCodes(0);
}