Commit Graph
13 Commits
Author SHA1 Message Date
Henrik RydgårdandClaude Opus 5 7e5dca0309 Unify --debugger=PORT for both the app and headless builds
The headless build's own --debugger=PORT never actually worked on
Windows: headless/Headless.cpp never called net::Init() (WSAStartup),
so socket binding silently failed ("Unable to listen on any port
(debugger - webserver)"). Fixed by calling net::Init()/net::Shutdown()
there, gated on --debugger being passed since headless has no other use
for networking.

With that confirmed working, move parsing into the shared
Core/CmdLine.cpp auto-param table as a single --debugger=PORT option
(0 = pick automatically) available on both CmdLineMode::Application and
CmdLineMode::Headless, replacing the previous app-only boolean
--debugger flag and headless's separate ad hoc argv scan for it.

Behavior differs deliberately by build, same as before:
- App: just starts the debugger, game boots and runs normally.
- Headless: also forces coreParameter.startBreak = true (break before
  anything runs), as it always has. Headless re-applies iRemoteISOPort
  after its own g_Config.RestoreDefaults() call, which runs after
  ApplyToConfig() and would otherwise wipe the requested port.

Verified live: headless now binds the requested port and responds to
cpu.status/game.status; the app build binds the requested port and
runs the game normally (not paused).

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01XDNwPPuidmNxQGRJxBuRL6
2026-07-26 21:49:37 +02:00
Henrik RydgårdandClaude Opus 5 3ebc9872a5 Add --debugger command line flag to enable the WebSocket debugger
Application-mode only (CmdLineMode::Application) - the headless build has
its own separate --debugger=PORT mechanism in headless/Headless.cpp, which
doesn't currently work reliably, so this new flag intentionally does not
apply there. Sets bRemoteDebuggerOnStartup for the session without
persisting it to the config file.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01XDNwPPuidmNxQGRJxBuRL6
2026-07-26 21:02:00 +02:00
Henrik Rydgård 00a566514e Buildfixes 2026-07-21 14:00:02 +02:00
Henrik Rydgård 8666a3cd57 Add resolution scale parameter to headless 2026-07-20 21:40:14 +02:00
Henrik Rydgård 4b24c187f2 Move more command line parameters to the new parser 2026-07-20 17:44:19 +02:00
Henrik Rydgård 650a59f964 Migrate more config parsing to the new parser 2026-07-20 16:50:34 +02:00
Henrik Rydgård bd25962cbe Convert more options to the new command line parser 2026-07-20 16:33:03 +02:00
Henrik Rydgård dca65d02ad Move the force_gl_version command line hack to the new parser
See #20687
2026-07-20 16:33:03 +02:00
Henrik Rydgård e6875fa339 More cmdline work. 2026-07-20 16:33:03 +02:00
Henrik Rydgård cef7da49b3 Add utility to parse parameters with params 2026-07-20 16:33:03 +02:00
Henrik Rydgård 717ffc9fae Buildfixes 2026-07-20 12:02:07 +02:00
Henrik Rydgård a59637975a Call the new command line parser from all backends 2026-07-20 12:02:07 +02:00
Henrik Rydgård 29836ea74e Move the new incomplete command line parser to Core 2026-07-20 12:02:07 +02:00