forked from Ports/goldeneye-pc-port
Steam Deck: first-run preset (native 1280x800 fullscreen, MSAA 4, 150% draw/LOD distance) (#77)
STEAMOS detection in main() seeds video config defaults before configLoad; first-launch-only by construction (an existing ge007.ini always wins). The 150% DrawDistance/LodDistance addresses authored N64 fade distances reading short on the close-up Deck panel (e.g. the Dam lock fading in within sight) while desktops keep the faithful 100% default.
This commit is contained in:
1 parent
f8526f66d0
commit
da31edaa70
4 files changed
+38
-2
No files matched your search
@@ -98,7 +98,10 @@ The Linux bundle is the Deck build. SFTP it over from your PC, or download
|
||||
it straight from the [releases page](../../releases) on the Deck itself:
|
||||
unzip, drop your ROM in `data/`, run `prepare-assets` once, and add the
|
||||
executable as a non-Steam game. SDL2 is bundled, so no dependencies need
|
||||
installing. The renderer is CPU-bound (software RSP); expect original N64-era
|
||||
installing. On SteamOS the first launch seeds `ge007.ini` with Deck-friendly
|
||||
defaults — native 1280×800 fullscreen, VSync, MSAA 4, and 150% draw/LOD
|
||||
distance (the authored N64 fade distances read short on the close-up panel);
|
||||
everything is changeable in the options overlay and persists afterwards. The renderer is CPU-bound (software RSP); expect original N64-era
|
||||
performance at 60 fps rather than more. A v0.1.0-era crash on the Deck in
|
||||
Facility was never reproduced and its prime suspect has since been fixed, but
|
||||
this release has not yet been verified on real Deck hardware.
|
||||
|
||||
@@ -20,6 +20,9 @@ extern "C" {
|
||||
#endif
|
||||
|
||||
/* Initialize the window + GL context. Returns 0 on success. */
|
||||
/* Steam Deck first-run preset; must run after the config constructor and
|
||||
* before configLoad() (see video.c). No-op effect once an ini exists. */
|
||||
void videoApplySteamOSDefaults(void);
|
||||
int videoInit(void);
|
||||
void videoDestroy(void);
|
||||
|
||||
|
||||
+8
-1
@@ -115,7 +115,14 @@ int main(int argc, char **argv)
|
||||
else sysLogPrintf(LOG_NOTE, "fresh: no %s to remove", eep);
|
||||
}
|
||||
|
||||
/* 1. Platform + config + filesystem. */
|
||||
/* 1. Platform + config + filesystem. Steam Deck / SteamOS: seed the
|
||||
* first-run preset (native 1280x800 fullscreen, MSAA 4, longer draw/LOD
|
||||
* distances) before the load so a missing ini saves these values; an
|
||||
* existing ini always wins. */
|
||||
if (getenv("STEAMOS")) {
|
||||
sysLogPrintf(LOG_INFO, "video: SteamOS detected; applying Steam Deck first-run defaults");
|
||||
videoApplySteamOSDefaults();
|
||||
}
|
||||
configLoad();
|
||||
atexit(portAtExit); /* persist config + window geometry on clean exit */
|
||||
|
||||
|
||||
@@ -220,6 +220,29 @@ PD_CONSTRUCTOR static void videoConfigInit(void)
|
||||
configRegisterInt("Window.Maximized", &cfgWinMax, 0, 1);
|
||||
}
|
||||
|
||||
/* Steam Deck / SteamOS first-run preset. Called from main() when STEAMOS is
|
||||
* set, BEFORE configLoad(): if no ge007.ini exists yet, configLoad's
|
||||
* first-run path saves these values to disk and every later launch reads the
|
||||
* file (user changes via F10 win outright); if an ini already exists its
|
||||
* values overwrite everything here. So this is a first-launch preset only.
|
||||
* 1280x800 is the Deck's native panel resolution; MSAA 4 + VSync is
|
||||
* comfortable headroom for the A11 GPU; DrawDistance/LodDistance at 150%
|
||||
* because the authored N64 fade distances read "things pop in just before
|
||||
* you can see them" on a sharp 7" close-up panel (e.g. the Dam lock).
|
||||
* Note: the panel is 16:10 and the game renders 4:3, so this stretches
|
||||
* uniformly like any non-4:3 window today (letterboxing is the parked
|
||||
* WIDESCREEN-FOV-PLAN). */
|
||||
void videoApplySteamOSDefaults(void)
|
||||
{
|
||||
cfgFullscreen = 1;
|
||||
cfgWinW = 1280;
|
||||
cfgWinH = 800;
|
||||
cfgVSync = 1;
|
||||
cfgMSAA = 4;
|
||||
cfgDrawDistance = 150;
|
||||
cfgLodDistance = 150;
|
||||
}
|
||||
|
||||
/* Set by videoRequestLiveConfig() (F10 overlay, host thread); consumed on the
|
||||
* scheduler thread in videoStartFrame() where the GL context is bound. */
|
||||
static volatile int liveCfgDirty = 0;
|
||||
|
||||
Reference in new issue
Block a user