mirror of
https://github.com/RetroPortingToolKit/psxrecomp
synced 2026-10-25 18:05:12 -04:00
Live resolution: truthful restart contract per backend
Keep the requested internal resolution / supersample (shown and saved) apart from what the backend last applied. When the live change is unavailable (no GL, windowed high-resolution mode, CPU-authoritative dual rendering, no context) or refused, the session scale is left as applied and PSX_VIDEO_RESTART_RESOLUTION stays set, in both psx_video_apply_live and the menu's restart bits (psx_host_video_restart_bits_backend, unit-tested for the capable and refused cases). video_set rejects invalid presets and factors without applying or saving, and reports applied values, capability and pending restart. TCP command index regenerated. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -399,6 +399,10 @@ int gl_renderer_step_internal_scale_now(int scale);
|
||||
* the next frame boundary (the new ceiling). Returns the scale applied, 0 when
|
||||
* the backend cannot change it live. */
|
||||
int gl_renderer_set_internal_scale_live(int scale);
|
||||
/* 1 when gl_renderer_set_internal_scale_live can apply on this session (no
|
||||
* windowed high-resolution mode, no CPU-authoritative dual rendering, a live
|
||||
* raster context). 0 means a resolution change needs a relaunch. */
|
||||
int gl_renderer_internal_scale_live_capable(void);
|
||||
typedef struct GlDynresStats {
|
||||
int level, ceiling, pending; /* pending: requested level, 0 = none */
|
||||
uint64_t steps, deferred, refused;
|
||||
|
||||
@@ -109,6 +109,13 @@ unsigned psx_host_video_live_changes(const PsxHostVideoSettings *prev,
|
||||
const PsxHostVideoSettings *next);
|
||||
unsigned psx_host_video_restart_bits(const PsxHostVideoSettings *boot,
|
||||
const PsxHostVideoSettings *next);
|
||||
/* psx_host_video_restart_bits for a backend that may not move the resolution
|
||||
* live: when res_live_ok is 0 (backend incapable, or a live change was
|
||||
* refused), an internal resolution / supersample that differs from boot keeps
|
||||
* PSX_VIDEO_RESTART_RESOLUTION. */
|
||||
unsigned psx_host_video_restart_bits_backend(const PsxHostVideoSettings *boot,
|
||||
const PsxHostVideoSettings *next,
|
||||
int res_live_ok);
|
||||
/* Runtime side (main.cpp). */
|
||||
unsigned psx_video_apply_live(const PsxHostVideoSettings *next);
|
||||
void psx_video_current(PsxHostVideoSettings *out);
|
||||
|
||||
Reference in New Issue
Block a user