fix PS framerate issues

This commit is contained in:
Shaun Inman 2023-01-04 12:17:45 -05:00
parent cfcc855df9
commit 9a69d137fe

View file

@ -739,7 +739,7 @@ static void video_refresh_callback(const void *data, unsigned width, unsigned he
GFX_clearAll(); GFX_clearAll();
} }
scale(data,width,height,pitch,screen->pixels); scale(data,width,height,pitch,screen->pixels);
// GFX_flip(screen); GFX_flip(screen);
} }
static void audio_sample_callback(int16_t left, int16_t right) { static void audio_sample_callback(int16_t left, int16_t right) {
@ -926,10 +926,10 @@ int main(int argc , char* argv[]) {
// else if (PAD_justPressed(BTN_R1)) State_write(); // else if (PAD_justPressed(BTN_R1)) State_write();
core.run(); core.run();
unsigned long frame_duration = SDL_GetTicks() - frame_start; // unsigned long frame_duration = SDL_GetTicks() - frame_start;
#define TARGET_FRAME_DURATION 15 // #define TARGET_FRAME_DURATION 15
if (frame_duration<TARGET_FRAME_DURATION) SDL_Delay(TARGET_FRAME_DURATION-frame_duration); // if (frame_duration<TARGET_FRAME_DURATION) SDL_Delay(TARGET_FRAME_DURATION-frame_duration);
GFX_flip(screen); // GFX_flip(screen);
} }
Game_close(); Game_close();