Report more accurate refresh rates to AV info struct

This commit is contained in:
twinaphex 2014-06-16 05:02:10 +02:00
parent 9e063b1e7e
commit 0ff7d93cd2
2 changed files with 3 additions and 5 deletions

View File

@ -2025,7 +2025,6 @@ static Deinterlacer deint;
#define MEDNAFEN_CORE_NAME "Mednafen PSX"
#define MEDNAFEN_CORE_VERSION "v0.9.35.1"
#define MEDNAFEN_CORE_EXTENSIONS "cue|toc|m3u|ccd"
static double mednafen_psx_fps = 59.82704; // Hardcoded for NTSC atm.
#define MEDNAFEN_CORE_GEOMETRY_BASE_W 320
#define MEDNAFEN_CORE_GEOMETRY_BASE_H 240
#define MEDNAFEN_CORE_GEOMETRY_MAX_W 700
@ -2360,7 +2359,6 @@ bool retro_load_game(const struct retro_game_info *info)
MDFN_PixelFormat pix_fmt(MDFN_COLORSPACE_RGB, 16, 8, 0, 24);
mednafen_psx_fb_height = (CalcDiscSCEx() == REGION_EU) ? 576 : 480;
mednafen_psx_fps = (CalcDiscSCEx() == REGION_EU) ? 50.0 : 59.82704;
surf = new MDFN_Surface(mednafen_buf, FB_WIDTH, mednafen_psx_fb_height, FB_WIDTH, pix_fmt);
#ifdef NEED_DEINTERLACER
@ -2669,7 +2667,7 @@ void retro_get_system_info(struct retro_system_info *info)
void retro_get_system_av_info(struct retro_system_av_info *info)
{
memset(info, 0, sizeof(*info));
info->timing.fps = mednafen_psx_fps; // Determined for NTSC from empirical testing.
info->timing.fps = (CalcDiscSCEx() == REGION_EU) ? 49.842 : 59.941;
info->timing.sample_rate = 44100;
info->geometry.base_width = MEDNAFEN_CORE_GEOMETRY_BASE_W;
info->geometry.base_height = MEDNAFEN_CORE_GEOMETRY_BASE_H;

View File

@ -181,7 +181,7 @@ void PS_GPU::FillVideoParams(MDFNGI* gi)
gi->fb_width = 768;
gi->fb_height = 576;
gi->fps = 836203078;
gi->fps = 836203078; // 49.842
gi->VideoSystem = VIDSYS_PAL;
}
@ -196,7 +196,7 @@ void PS_GPU::FillVideoParams(MDFNGI* gi)
gi->fb_width = 768;
gi->fb_height = 480;
gi->fps = 1005643085;
gi->fps = 1005643085; // 59.941
gi->VideoSystem = VIDSYS_NTSC;
}