mirror of
https://github.com/libsdl-org/SDL.git
synced 2026-06-05 22:30:29 +00:00
Update src/joystick/hidapi/SDL_hidapi_steam_triton.c
This commit is contained in:
parent
4f19c3ca4d
commit
aa0820691f
1 changed files with 6 additions and 6 deletions
|
|
@ -265,17 +265,17 @@ static void HIDAPI_DriverSteamTriton_HandleState(SDL_HIDAPI_Device *device,
|
|||
pTritonReport->sPressureLeft / 32768.0f);
|
||||
ctx->left_touch_down = left_touch_down;
|
||||
}
|
||||
if (downRight || ctx->right_touch_down){
|
||||
if (downRight){
|
||||
ctx->right_touch_x=pTritonReport->sRightPadX / 65536.0f + 0.5f;
|
||||
ctx->right_touch_y=-(float)pTritonReport->sRightPadY / 65536.0f + 0.5f;
|
||||
if (right_touch_down || ctx->right_touch_down) {
|
||||
if (right_touch_down) {
|
||||
ctx->right_touch_x = pTritonReport->sRightPadX / 65536.0f + 0.5f;
|
||||
ctx->right_touch_y = -(float)pTritonReport->sRightPadY / 65536.0f + 0.5f;
|
||||
}
|
||||
SDL_SendJoystickTouchpad(timestamp, joystick, 1, 0,
|
||||
downRight,
|
||||
right_touch_down,
|
||||
ctx->right_touch_x,
|
||||
ctx->right_touch_y,
|
||||
pTritonReport->sPressureRight / 32768.0f);
|
||||
ctx->right_touch_down=downRight;
|
||||
ctx->right_touch_down = right_touch_down;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue