Fixed some bindings and added tweaks.
The volume slider is now the Z axis and the touchpad (if configured like a joystick) is more accurate. If the touchpad is lifted off of, then the RX and RY axis will center (like taking your thumb off a real joystick)
This commit is contained in:
parent
82917a0437
commit
ef7b8c2c9e
3 changed files with 19 additions and 8 deletions
|
@ -23,8 +23,8 @@ Make sure to use a single space, not a tab for seperating settings,
|
||||||
Port: 8889
|
Port: 8889
|
||||||
Throttle: 20
|
Throttle: 20
|
||||||
Circle Pad: JOYSTICK1
|
Circle Pad: JOYSTICK1
|
||||||
C Stick: JOYSTICK2
|
C Stick: MOUSE
|
||||||
Touch: MOUSE
|
Touch: JOYSTICK2
|
||||||
Mouse Speed: 4
|
Mouse Speed: 4
|
||||||
|
|
||||||
A: JOY1
|
A: JOY1
|
||||||
|
|
|
@ -13,7 +13,8 @@
|
||||||
#define joyY iReport.wAxisY
|
#define joyY iReport.wAxisY
|
||||||
#define joyRX iReport.wAxisXRot
|
#define joyRX iReport.wAxisXRot
|
||||||
#define joyRY iReport.wAxisYRot
|
#define joyRY iReport.wAxisYRot
|
||||||
#define joyVolume iReport.wSlider
|
//#define joyVolume iReport.wSlider
|
||||||
|
#define joyVolume iReport.wAxisZ
|
||||||
#define povHat iReport.bHats
|
#define povHat iReport.bHats
|
||||||
|
|
||||||
#define joyButtons iReport.lButtons
|
#define joyButtons iReport.lButtons
|
||||||
|
|
|
@ -167,18 +167,28 @@ int WINAPI WinMain(HINSTANCE hInst, HINSTANCE hPrevInst, LPSTR lpCmd, int nShow)
|
||||||
SetCursorPos((int)((double)currentTouch.x * widthMultiplier), (int)((double)currentTouch.y * heightMultiplier));
|
SetCursorPos((int)((double)currentTouch.x * widthMultiplier), (int)((double)currentTouch.y * heightMultiplier));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if(settings.touch == joystick1) {
|
else if(settings.touch == joystick1) { //made a little bit more accurate to the screen size.
|
||||||
joyX = (currentTouch.x) * 128;
|
joyX = (int)((float)(currentTouch.x) * 102.3f);
|
||||||
joyY = (currentTouch.y) * 128;
|
joyY = (int)((float)(currentTouch.y) * 136.5f);
|
||||||
}
|
}
|
||||||
|
|
||||||
else if(settings.touch == joystick2) {
|
else if(settings.touch == joystick2) {
|
||||||
joyRX = (currentTouch.x) * 128;
|
joyRX = (int)((float)(currentTouch.x) * 102.3f);
|
||||||
joyRY = (currentTouch.y) * 128;
|
joyRY = (int)((float)(currentTouch.y) * 136.5f);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
handleKey(KEY_TOUCH, settings.Tap);
|
handleKey(KEY_TOUCH, settings.Tap);
|
||||||
}
|
}
|
||||||
|
} else { //If we are not touching, move to center (Like if you release the joystick on a normal controller).
|
||||||
|
if(settings.touch == joystick1) {
|
||||||
|
joyX = 16383; //Halfway between the x
|
||||||
|
joyY = 16383; //Halfway between the y
|
||||||
|
}
|
||||||
|
|
||||||
|
else if(settings.touch == joystick2) {
|
||||||
|
joyRX = 16383; //Halfway between the rx
|
||||||
|
joyRY = 16383; //Halfway between the ry
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if(settings.circlePad == mouse) {
|
if(settings.circlePad == mouse) {
|
||||||
|
|
Loading…
Add table
Reference in a new issue