Circle pad and touch customisable

This commit is contained in:
CTurt 2014-12-07 13:37:55 +00:00
parent 61f3572ee5
commit 121a73d4a4

View file

@ -110,12 +110,25 @@ int WINAPI WinMain(HINSTANCE hInst, HINSTANCE hPrevInst, LPSTR lpCmd, int nShow)
}
if(currentKeys & KEY_TOUCH) {
POINT p;
GetCursorPos(&p);
SetCursorPos(p.x + (currentTouch.x - lastTouch.x), p.y + (currentTouch.y - lastTouch.y));
if(settings.touch == mouse) {
POINT p;
GetCursorPos(&p);
SetCursorPos(p.x + (currentTouch.x - lastTouch.x), p.y + (currentTouch.y - lastTouch.y));
}
else if(settings.touch == joystick) {
if(vJoy) updateJoystick((currentTouch.x) * 128, (240 - currentTouch.y) * 128);
}
}
if(settings.circlePad == mouse) {
POINT p;
GetCursorPos(&p);
SetCursorPos(p.x + cstick.x / 64, p.y + cstick.y / 64);
}
else if(settings.circlePad == joystick) {
if(vJoy) updateJoystick((cstick.x + 128) * 128, (128 - cstick.y) * 128);
}
if(vJoy) updateJoystick((cstick.x + 128) * 128, (128 - cstick.y) * 128);
break;
}
}