Desktop default platform = GLASS (kills the recurring "old keymap" trap)
Root cause of the keymap whack-a-mole: three input layers exist (PadRIO/ bindings.txt under glass; btinput/CONTROLS.MAP under DEV; the bring-up drive bridge also under DEV, which clobbers e.g. Alt-reverse every frame), and DEV was the DEFAULT -- so every launcher that forgot BT_PLATFORM=glass booted the old stack: the play bats, then play_steam, then the operator console's local instances, each fixed with the same one line. Omission can't resurrect it now: with no BT_PLATFORM, desktop boots GLASS (and the menu on a zero-arg launch -- bare double-click of btl4.exe opens the mission menu). BT_PLATFORM=dev explicitly opts into the legacy DEV profile for debugging. BT_PLATFORM=pod is the cabinet profile; the real pod's SETENV.BAT must set it (contract recorded in glass-cockpit.md -- the old "bare boot == cabinet shape" menu-guard assumption is retired). Verified: no-env mission launch boots GLASS; bare no-env launch opens the MENU; BT_PLATFORM=dev boots DEV. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.8
parent
18ce589f4c
commit
9e85f6dc56
+23
-7
@@ -293,8 +293,10 @@ int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine
|
||||
int gBTPlatformGlass = 0;
|
||||
{
|
||||
const char *pe = getenv("BT_PLATFORM");
|
||||
int platform_dev = 0;
|
||||
if (pe && _stricmp(pe, "pod") == 0) gBTPlatformPod = 1;
|
||||
if (pe && _stricmp(pe, "glass") == 0) gBTPlatformGlass = 1;
|
||||
if (pe && _stricmp(pe, "dev") == 0) platform_dev = 1;
|
||||
// Convenience: also accept a raw `-platform pod` on the command line,
|
||||
// parsed off lpCmdLine independently of L4Application::ParseCommandLine.
|
||||
const char *pf = lpCmdLine ? strstr(lpCmdLine, "-platform") : 0;
|
||||
@@ -305,16 +307,30 @@ int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine
|
||||
gBTPlatformPod = 1;
|
||||
if (pv[0] && _stricmp(pv, "glass") == 0)
|
||||
gBTPlatformGlass = 1;
|
||||
if (pv[0] && _stricmp(pv, "dev") == 0)
|
||||
platform_dev = 1;
|
||||
}
|
||||
//
|
||||
// DESKTOP DEFAULT = GLASS (2026-07-22, "competing keymaps" fix): every
|
||||
// launcher that forgot BT_PLATFORM=glass booted the DEV profile -- no
|
||||
// PadRIO, the bring-up keyboard bridge owning the keys ("the old
|
||||
// keymap again": play bats, steam bat, then the operator console,
|
||||
// each needed the same one-line fix). Glass is now the DEFAULT when
|
||||
// no platform is chosen, so omission can never resurrect the old
|
||||
// input stack. BT_PLATFORM=dev opts back into the legacy DEV profile
|
||||
// for debugging; the FUTURE pod cabinet must set BT_PLATFORM=pod in
|
||||
// its SETENV.BAT (contract recorded in context/glass-cockpit.md --
|
||||
// note this changes the old "bare boot == cabinet shape" assumption).
|
||||
//
|
||||
if (!gBTPlatformPod && !gBTPlatformGlass && !platform_dev)
|
||||
gBTPlatformGlass = 1;
|
||||
}
|
||||
|
||||
// UNIFIED-BUILD GUARD (2026-07-21): the miniconsole menu is a GLASS-
|
||||
// platform feature. It must NOT claim a bare zero-arg boot -- that is
|
||||
// the POD CABINET's launch shape (DEV profile, wait for the console
|
||||
// egg). The menu runs only when the glass platform is selected
|
||||
// (BT_PLATFORM=glass / -platform glass, e.g. play_steam.bat) or forced
|
||||
// with BT_FE_MENU=1. (Platform parse moved ABOVE this block so the
|
||||
// flag is available; it reads only env/cmdline, no profile putenvs.)
|
||||
// MENU GATE (2026-07-21, amended 2026-07-22): the miniconsole menu runs
|
||||
// on a zero-arg GLASS boot. With glass now the desktop DEFAULT, a bare
|
||||
// double-click of btl4.exe opens the menu -- the desired desktop UX.
|
||||
// The pod cabinet opts out via BT_PLATFORM=pod (SETENV.BAT contract);
|
||||
// BT_PLATFORM=dev keeps the old bare-boot wait-for-egg shape.
|
||||
int fe_menu_mode = 0;
|
||||
{
|
||||
int fe_has_egg = lpCmdLine && strstr(lpCmdLine, "-egg") != NULL;
|
||||
|
||||
Reference in New Issue
Block a user