fix(input): resolve SDL3Mouse ODR violation causing dropped clicks#232
fix(input): resolve SDL3Mouse ODR violation causing dropped clicks#232fbraz3 wants to merge 2 commits into
Conversation
The previous attempt to include PreRTS.h caused build failures on macOS because PreRTS.h is not available in the GameEngineDevice include paths. Instead, we include Common/GameCommon.h which brings in the DUMP_PERF_STATS macro, successfully aligning the memory layout of SubsystemInterface without breaking the build.
|
Thanks for digging into this @fbraz3 — the ODR violation is a real find and worth fixing on its own. I built this branch (
So the ODR fix is good to land as its own correctness fix, but #231 is not resolved by it. Worth noting re: the "dropped clicks" framing — from testing, clicks are not actually dropped: stationary units always select. The user-visible issue is a consistent delay between the mouse click and when the game acts on it; moving units only appear to drop because they move off the clicked spot during that delay. Critically, keyboard input has no such delay (control groups select instantly), which points at something specific to the mouse-event path rather than the shared message/logic pipeline. Full problem definition is in the updated #231 body. Happy to test any follow-up. |
Description
Fixes #231
Changes
#include "PreRTS.h"inSDL3Mouse.cppfor both Generals and Zero Hour to resolve an ODR violation regarding theDUMP_PERF_STATSmacro, ensuring theSubsystemInterfacelayout is correctly sized so the virtualupdate()dispatch executes.