diff --git a/game/btl4main.cpp b/game/btl4main.cpp index 521c468..dd83e4a 100644 --- a/game/btl4main.cpp +++ b/game/btl4main.cpp @@ -256,6 +256,15 @@ int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine // `-platform pod` ATTEMPTS the path (FindBestAdapterIndices degrades to the // primary adapter) -- selectable for bring-up, not fully validated off-pod. // --------------------------------------------------------------------------- + // SINGLE-WINDOW COCKPIT (L4MFDSPLIT): the desktop cockpit's on-screen RIO + // button banks + analog controls run on the PadRIO virtual-RIO surface, so + // PAD is the cockpit's control DEFAULT -- established HERE, before the + // platform-profile block, so the DEV keyboard default (below) does not win + // (that left the RIO controls inert). An explicit L4CONTROLS still + // overrides (e.g. L4CONTROLS=RIO for a real serial board). + if (getenv("L4MFDSPLIT") != NULL && getenv("L4CONTROLS") == NULL) + putenv("L4CONTROLS=PAD"); + int gBTPlatformPod = 0; { const char *pe = getenv("BT_PLATFORM"); @@ -319,13 +328,10 @@ int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine // SINGLE-WINDOW COCKPIT (L4MFDSPLIT=1, RP412's flag): the 3D viewscreen fills // the window and the six instrument surfaces frame it (BTDrawCockpitPanel). // Like the dev-gauge path it needs the gauge renderer awake (L4GAUGE); the - // window itself is sized to the 1920x1080 cockpit canvas below. PAD controls - // come along for the ride (a desktop cockpit has no serial RIO). - if (getenv("L4MFDSPLIT") != NULL) - { - if (getenv("L4GAUGE") == NULL) putenv("L4GAUGE=640x480x16"); - if (getenv("L4CONTROLS") == NULL) putenv("L4CONTROLS=PAD"); - } + // window itself is sized to the 1920x1080 cockpit canvas below. (The PAD + // control default is set earlier, before the platform-profile block.) + if (getenv("L4MFDSPLIT") != NULL && getenv("L4GAUGE") == NULL) + putenv("L4GAUGE=640x480x16"); std::cout << "[boot] platform profile: " << (gBTPlatformPod ? "POD (RIO cockpit input; multi-surface gauges/MFDs via pod hardware or explicit L4GAUGE)"