mirror of
https://github.com/RetroPortingToolKit/psxrecomp
synced 2026-10-26 02:11:36 -04:00
Frame generation: PSX_PRESENT_SHOT_GENERATED captures a generated frame
Diagnostic: a staged present_shot waits for the next generated frame, so the in-between images can be inspected in game. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -8496,7 +8496,15 @@ static void gl_swap_with_osd(void) {
|
||||
extern int present_shot_take(char *out, int n);
|
||||
extern void present_shot_done(int ok);
|
||||
char shot_path[512];
|
||||
if (present_shot_take(shot_path, (int)sizeof(shot_path))) {
|
||||
/* PSX_PRESENT_SHOT_GENERATED=1 (diagnostic): a staged present_shot
|
||||
* waits for the next generated frame (frame generation). */
|
||||
static int gen_only = -1;
|
||||
if (gen_only < 0) {
|
||||
const char *e = getenv("PSX_PRESENT_SHOT_GENERATED");
|
||||
gen_only = (e && *e && *e != '0') ? 1 : 0;
|
||||
}
|
||||
if ((!gen_only || s_fg_presenting) &&
|
||||
present_shot_take(shot_path, (int)sizeof(shot_path))) {
|
||||
int ww = 0, wh = 0;
|
||||
int wrote = 0;
|
||||
SDL_GL_GetDrawableSize(s_win, &ww, &wh);
|
||||
|
||||
Reference in New Issue
Block a user