mirror of
https://github.com/spice2x/spice2x.github.io.git
synced 2026-08-02 14:50:41 -07:00
ccj: fix locale issues with carding in (#628)
## Link to GitHub Issue or related Pull Request, if one exists #624 ## Description of change See bug. Add locale hooks specifically for CCJ. also, fix y axis direction for XInput, it was flipped because XInput uses opposite values from what RawInput does ## Testing Tested card in / play one round with Windows regional format set to French (France) and other language set to English.
This commit is contained in:
@@ -245,7 +245,7 @@ XInputSetState(
|
||||
// left stick circular dead zone
|
||||
{
|
||||
const auto x_raw = x.Gamepad.sThumbLX;
|
||||
const auto y_raw = x.Gamepad.sThumbLY;
|
||||
const auto y_raw = -x.Gamepad.sThumbLY; // flip to make [down = positive]
|
||||
const float magnitude = sqrtf(x_raw * x_raw + y_raw * y_raw);
|
||||
if (magnitude > XINPUT_GAMEPAD_LEFT_THUMB_DEADZONE) {
|
||||
const float scaled =
|
||||
@@ -268,7 +268,7 @@ XInputSetState(
|
||||
// right stick circular dead zone
|
||||
{
|
||||
const auto x_raw = x.Gamepad.sThumbRX;
|
||||
const auto y_raw = x.Gamepad.sThumbRY;
|
||||
const auto y_raw = -x.Gamepad.sThumbRY; // flip to make [down = positive]
|
||||
const float magnitude = sqrtf(x_raw * x_raw + y_raw * y_raw);
|
||||
if (magnitude > XINPUT_GAMEPAD_RIGHT_THUMB_DEADZONE) {
|
||||
const float scaled =
|
||||
|
||||
Reference in New Issue
Block a user