mirror of
https://github.com/rommapp/romm.git
synced 2026-11-28 17:48:31 +01:00
EmulatorJS drops the EJS_defaultOptions passed from config.yaml in two places. preGetSetting short-circuits to the saved-settings localStorage object once any setting or control was changed, returning undefined for keys the user never touched. getCoreSettings, which writes the RetroArch core options file during boot, returns an empty string when localStorage is enabled but holds no saved entry yet, so core options such as mupen64plus-FXAA never reach the core on a fresh launch. Install a trap on the window.EJS_emulator assignment that patches both methods and recomputes the constructor-captured values (rewindEnabled, videoRotation, webgl2Enabled) right after the constructor returns, before the async core download and boot consume them. Patching in EJS_onGameStart (where the previous fix ended up after a cleanup) is too late: by then the GL context exists and retroarch.cfg and the core options file are already written. The console player installs the same trap, and the web player now looks up core options by the resolved core instead of the nullable core prop. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>