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:
bicarus
2026-04-11 14:42:51 -07:00
committed by GitHub
parent 727b99effd
commit ec3f6639b7
2 changed files with 54 additions and 2 deletions
+2 -2
View File
@@ -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 =