Files
DroidDeck/tools/dirt-ws2
The412Banner 268dcef559 fix(dual-screen): DiRT 3 and DiRT Showdown telemetry no longer stops the game (error 10038)
DiRT 3 and DiRT Showdown keep sending motion telemetry on the UDP socket they
closed at the end of a race (and when leaving Joyride); sendto() fails with
WSAENOTSOCK and the game stops with "sendto failed with error 10038".

- tools/dirt-ws2: a 32-bit ws2_32.dll stand-in. Every export jumps to the
  same-ordinal export of Wine's own ws2_32.dll; only a sendto() failing with
  10038 reports 0 bytes sent. Built in CI (components recipe dirt-ws2, clang +
  lld) with its exports checked against Wine 11's list, staged to
  /usr/local/lib/droiddeck-dirt.
- droiddeck-game-env: for dirt3_game.exe / showdown.exe / showdown_avx.exe
  with the game's UDP/motion output on, and a Proton whose own ws2_32.dll lacks
  the fix, the stand-in replaces the prefix's syswow64/ws2_32.dll (Wine loads
  ws2_32 as a KnownDLL from there, so a copy beside the game is ignored) with
  WINEDLLOVERRIDES=ws2_32=n,b; the launch waits for the game and puts the
  prefix's own file back. A copy left by a killed launch is put back at the
  next launch in that prefix.
- Automatic turns DiRT 3 and DiRT Showdown on like the other games again; the
  crash warning and the switched-on-by-hand memory from the previous build
  are gone.

Same behaviour as DiRTTelemetryErrorFix by RoccoC (MIT), based on the fix by
Carsten Gottschling. DroidDeck-Proton gets the same rule in its own ws2_32
(branch fix/dirt-telemetry-sendto); the swap is skipped there.
2026-10-31 21:55:36 +00:00
..

DiRT 3 / DiRT Showdown ws2_32 stand-in

DiRT 3 (dirt3_game.exe) and DiRT Showdown (showdown.exe, showdown_avx.exe) close their motion telemetry UDP socket at the end of a race, and when leaving Joyride, but keep calling sendto() on it. sendto() fails with WSAENOTSOCK and the game stops with "sendto failed with error 10038". The same happens on Windows.

ws2_32.dll here is a 32-bit stand-in: every export jumps to the same-ordinal export of Wine's own ws2_32.dll; only a sendto() that fails with 10038 reports 0 bytes sent instead. Same behaviour as DiRTTelemetryErrorFix by RoccoC (MIT), based on the original fix by Carsten Gottschling.

Wine loads ws2_32 as a KnownDLL, so a copy beside the game is ignored. droiddeck-game-env puts the stand-in in place of the prefix's syswow64/ws2_32.dll for these games while their telemetry output is on, adds WINEDLLOVERRIDES=ws2_32=n,b, and puts Wine's file back when the game exits. It skips the swap when the game's Proton already has the fix in its own ws2_32.dll (DroidDeck-Proton patch dirt-telemetry-sendto-closed-socket.patch).

build.sh OUT builds it with clang, lld and llvm-dlltool and checks its exports against ws2_32-exports.txt (taken from Wine 11's ws2_32.dll).