From a521f257cefd9f1f3beb6c4cd515830defd06ac8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Henrik=20Rydg=C3=A5rd?= Date: Fri, 9 Oct 2026 14:09:30 +0200 Subject: [PATCH] CmdLine: Add --msaa Co-Authored-By: Claude Opus 5.5 --- Core/CmdLine.cpp | 6 ++++++ Core/CmdLine.h | 1 + 2 files changed, 7 insertions(+) diff --git a/Core/CmdLine.cpp b/Core/CmdLine.cpp index 4c8fca4178..41ca3ea086 100644 --- a/Core/CmdLine.cpp +++ b/Core/CmdLine.cpp @@ -233,6 +233,7 @@ static const CommandLineParam g_autoParams[] = { {POFF(odsLog), CmdParamType::Bool, "odslog", 'o', "Also log through OutputDebugString (Windows)", CmdLineMode::Headless}, {POFF(generateInterpreterDispatch), CmdParamType::Bool, "generate-interpreter-dispatch", '\0', "Generate C++ interpreter dispatch code (ExecInstruction) to stdout and exit", CmdLineMode::Headless}, {POFF(resolutionScale), CmdParamType::Int, "resolution-scale", '\0', "Set the resolution scale factor"}, + {POFF(msaa), CmdParamType::Int, "msaa", '\0', "Set the MSAA level (0 = off, 1 = 2x, 2 = 4x, 3 = 8x)"}, {POFF(debuggerPort), CmdParamType::Int, "debugger", '\0', "Enable the WebSocket debugger on this port (0 = pick automatically); see docs/WebSocketDebugger.md"}, {POFF(debuggerRunPort), CmdParamType::Int, "debugger-run", '\0', "Like --debugger, but starts running instead of waiting at the entry point", CmdLineMode::Headless}, {POFF(autoSaveLoadSymbols), CmdParamType::Bool, "auto-save-load-symbols", '\0', "Auto save/load per-module and per-game symbol files (see bAutoSaveLoadSymbols)", CmdLineMode::Both}, @@ -617,6 +618,11 @@ void CommandLineOptions::ApplyToConfig() const { g_Config.DoNotSaveSetting(&g_Config.iInternalResolution); } + if (msaa.has_value()) { + g_Config.iMultiSampleLevel = msaa.value(); + g_Config.DoNotSaveSetting(&g_Config.iMultiSampleLevel); + } + if (memReadAction.has_value()) { g_Config.iExceptionActionMemRead = memReadAction.value(); g_Config.DoNotSaveSetting(&g_Config.iExceptionActionMemRead); diff --git a/Core/CmdLine.h b/Core/CmdLine.h index 4df2726356..2d7b160787 100644 --- a/Core/CmdLine.h +++ b/Core/CmdLine.h @@ -160,6 +160,7 @@ struct CommandLineOptions { // Headless options that may also be mildly useful in application mode std::optional resolutionScale; + std::optional msaa; // Headless options