Files
bigmak94andClaude Opus 5.5 d4094454ed 0.19: what players wrote elsewhere: the launcher's runtime check, the game's language, controllers that take turns on the PC, a view that turns by steps
From the project's thread on Reddit and the comments under the videos about it, all written
before 0.18. What 0.18 had not answered:

- The PC launcher asked for the Visual C++ runtime again and again, however often it was
  installed (one player cut the check out of the launcher to play). Started from a 32-bit
  program, "powershell" is the 32-bit one, to which Windows shows the 32-bit system folder
  under the 64-bit one's name, and vcruntime140_1.dll only exists in 64 bits. The launcher
  hands over to the 64-bit PowerShell first (which also puts the OpenXR runtime's registry
  entry where it looks), looks for the files where a 64-bit program finds them and next to
  the emulator, names the ones it misses, and its question can be answered with "start the
  game all the same". When the emulator ends with "DLL not found" it says what that is.
- The game was in English whatever the console's language should have been: the emulator's
  console was set to English and nothing offered another. SHADPS4_CONSOLE_LANGUAGE takes a
  language tag ("fr-FR", "pt_BR", "zh-Hans-CN") or the console's number
  (Common::ConsoleLanguageFromTag). The PC launcher passes the language Windows is shown in,
  or the one chosen in its window from the game's 28 (language=); the Quest app passes the
  headset's (language= for another).
- On the PC the headset's controllers did nothing while a gamepad was connected, even one
  that only lay there. Whichever was used last plays (Input::PadSource): a button or a stick
  of the headset's controllers takes over once the gamepad has said nothing for a quarter of
  a second, which leaves a gamepad that a streaming program makes of those controllers
  playing as before; the gamepad takes back with its first button, stick or touch. While the
  headset's controllers play, GameController leaves the gamepad's input aside, and the
  runtime believes a host that says where the controller is over a gamepad's sensors.
- Turning the view by steps, asked for by a player who cannot turn round where they sit:
  Runtime::TurnView turns the seat about the head (the head keeps its place in the title's
  world, the controller comes round, a reset of the view undoes it). Asked for with a button
  the game has no use for in play, held, and the right stick flicked to a side
  (Input::ViewTurn): L1 on a gamepad, the grip of the hand that does not hold the controller
  on the headset's own; from the Quest app as two new flags of the pad pose message. 30
  degrees a step (SHADPS4_VR_TURN, turn=). The Quest app's card names it.
- "Save Migration", a question in a box behind the game's window at the first start
  (reported from Linux, where the package's ready-made folder was not used): only asked
  where an older shadPS4 left something to move.

README: common questions (getting the game, headsets, controllers, SteamVR, why the picture
looks reprojected, language, Linux), and a player's recipe for Proton, as reported.

Tried: the unit tests (console_language_test, pad_source_test, pad_router_test with the
turn, launcher-test under 64-bit and 32-bit PowerShell, the launcher's hand-over from a
32-bit one); the game on the PC in French, Japanese and Arabic, and in English for a
language it lacks; against a simulated headset with a test gamepad and test presses of the
headset's controllers (SHADPS4_TEST_VIRTUAL_PRESS/_TURN, SHADPS4_XR_TEST_PRESS/_TURN): each
takes over from the other, the view turns by either, the picture turns and the head stays in
place; on a Quest 3 without wearing it: the language reaches the game, the self-test's new
HOST_TURN turns the view with a tracked and with an untracked controller alike, the card
shows its new line. Not tried: any of it worn, and Virtual Desktop's own gamepad emulation.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-06 15:22:17 +02:00

92 lines
2.6 KiB
C++

// Tries Common::ConsoleLanguageFromTag (shadps4-arm64-main/src/common/console_language.h): the
// console's number for a language as Windows, Android and the settings name it.
// source tools/env-win.sh
// clang-cl /std:c++latest /EHsc -fuse-ld=lld /I shadps4-arm64-main/src \
// tools/tests/console_language_test.cpp /Fe:build/console_language_test.exe
#include <cstdio>
#include <optional>
#include <string>
#include "common/console_language.h"
static int failed = 0;
static void Check(const char* tag, std::optional<int> want) {
const std::optional<int> got = Common::ConsoleLanguageFromTag(tag);
if (got == want) {
std::printf("ok \"%s\" -> %s\n", tag,
got ? Common::ConsoleLanguageName(*got) : "nothing");
} else {
++failed;
std::printf("FAIL \"%s\": got %d, want %d\n", tag, got.value_or(-1), want.value_or(-1));
}
}
int main() {
// What Windows calls its display languages.
Check("en-US", 1);
Check("en-GB", 18);
Check("en-AU", 18);
Check("en-CA", 1);
Check("fr-FR", 2);
Check("fr-BE", 2);
Check("fr-CA", 22);
Check("es-ES", 3);
Check("es-MX", 20);
Check("es-419", 20);
Check("de-DE", 4);
Check("de-AT", 4);
Check("it-IT", 5);
Check("nl-NL", 6);
Check("pt-PT", 7);
Check("pt-BR", 17);
Check("ru-RU", 8);
Check("ko-KR", 9);
Check("zh-TW", 10);
Check("zh-HK", 10);
Check("zh-Hant", 10);
Check("zh-CN", 11);
Check("zh-Hans", 11);
Check("fi-FI", 12);
Check("sv-SE", 13);
Check("da-DK", 14);
Check("nb-NO", 15);
Check("nn-NO", 15);
Check("pl-PL", 16);
Check("tr-TR", 19);
Check("ar-SA", 21);
Check("cs-CZ", 23);
Check("hu-HU", 24);
Check("el-GR", 25);
Check("ro-RO", 26);
Check("th-TH", 27);
Check("ja-JP", 0);
// Android's, and a Unix locale.
Check("zh-Hans-CN", 11);
Check("zh-Hant-TW", 10);
Check("pt_BR", 17);
Check("fr_FR.UTF-8", 2);
Check("in-ID", 29);
Check("vi-VN", 28);
// A language alone, in any case, with spaces around.
Check("fr", 2);
Check("EN", 1);
Check("es", 3);
Check("pt", 7);
Check("zh", 11);
Check(" de-DE ", 4);
// The console's own numbers.
Check("0", 0);
Check("2", 2);
Check("29", 29);
Check("30", std::nullopt);
Check("123", std::nullopt);
// What the console has no language for.
Check("uk-UA", std::nullopt);
Check("he-IL", std::nullopt);
Check("", std::nullopt);
Check("windows", std::nullopt);
std::printf("failed: %d\n", failed);
return failed == 0 ? 0 : 1;
}