mirror of
https://github.com/RetroPortingToolKit/psxrecomp
synced 2026-10-26 02:11:36 -04:00
Merge branch 'master' of https://github.com/RetroPortingToolKit/psxrecomp into fix/held-746-20261022
# Conflicts: # runtime/src/main.cpp
This commit is contained in:
@@ -398,6 +398,14 @@ int gl_renderer_request_internal_scale(int scale);
|
||||
* 0 when refused or deferred (inside a render pass; it then applies after
|
||||
* the next present). Never call it inside a render pass. */
|
||||
int gl_renderer_step_internal_scale_now(int scale);
|
||||
/* Live Internal resolution / Supersampling change: the scale to step to at
|
||||
* a context-owned sync point (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;
|
||||
@@ -610,6 +618,7 @@ int gl_renderer_get_texture_window_batching(void);
|
||||
int gl_renderer_render_thread_start(int max_frames);
|
||||
void gl_renderer_render_thread_stop(void);
|
||||
int gl_renderer_render_thread_active(void);
|
||||
int gl_renderer_vendor_is_nvidia(void);
|
||||
void gl_renderer_render_thread_frame_boundary(void);
|
||||
void gl_renderer_render_thread_sync(const char *reason);
|
||||
int gl_renderer_render_thread_json(char *out, size_t cap);
|
||||
|
||||
@@ -46,6 +46,16 @@ void psx_host_overlay_set_draw_cb(PsxHostOverlayDrawFn fn, void *ctx);
|
||||
int psx_host_overlay_has_draw(void);
|
||||
void psx_host_overlay_draw(int width, int height); /* renderer side */
|
||||
|
||||
/* ---- Game HUD layer ---------------------------------------------------------
|
||||
* A title's own heads-up display, drawn once per presented frame (real and
|
||||
* generated) under the in-game menu, same thread and GL rules as the overlay
|
||||
* callback above. OpenGL only; Vulkan and the SDL renderer never invoke it.
|
||||
* Replacing or NULL unregistering drains prior calls as for the overlay above;
|
||||
* the owner may then release its old context. Registration is session-scoped:
|
||||
* activation reset and GL shutdown clear it. Register again on activation. */
|
||||
void psx_host_set_hud_draw_cb(PsxHostOverlayDrawFn fn, void *ctx);
|
||||
void psx_host_hud_draw(int width, int height); /* renderer side */
|
||||
|
||||
/* ---- P3: input sink -----------------------------------------------------
|
||||
* The sink sees every host SDL event first (main thread), in the normal event
|
||||
* drain and in the host pause loop. Returning non-zero consumes the event.
|
||||
@@ -75,10 +85,11 @@ typedef struct PsxHostVideoSettings {
|
||||
int dynamic_resolution; /* 0/1 */
|
||||
int frame_generation; /* 0/1 */
|
||||
int renderer; /* restart */
|
||||
int internal_resolution; /* restart */
|
||||
int supersampling; /* restart */
|
||||
int internal_resolution; /* live (psx_video_apply_live) */
|
||||
int supersampling; /* legacy factor; restart */
|
||||
int render_thread; /* restart */
|
||||
int present_thread; /* restart */
|
||||
int supersample_milli; /* live: 1000 off, 1250, 1500, 2000 */
|
||||
} PsxHostVideoSettings;
|
||||
|
||||
/* Texture filter values: PSX_TEXTURE_FILTER_* and psx_texture_filter_from_ui
|
||||
@@ -99,6 +110,8 @@ typedef struct PsxHostVideoSettings {
|
||||
#define PSX_VIDEO_LIVE_PRESENT_LINEAR (1u << 4)
|
||||
#define PSX_VIDEO_LIVE_DYNRES (1u << 5)
|
||||
#define PSX_VIDEO_LIVE_FRAME_GEN (1u << 6)
|
||||
/* Internal resolution or supersampling: the scale moves at the next frame. */
|
||||
#define PSX_VIDEO_LIVE_RESOLUTION (1u << 7)
|
||||
|
||||
/* Pure helpers (unit-tested): which live fields differ, and which restart
|
||||
* fields differ from the values the session booted with. */
|
||||
@@ -106,6 +119,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