mirror of
https://github.com/libretro/RetroArch
synced 2025-02-20 15:40:44 +00:00
(PS3) Add PAL60 mode
This commit is contained in:
parent
95961d1ccb
commit
ca9edec941
@ -139,6 +139,11 @@ static void populate_setting_item(void *data, unsigned input)
|
||||
snprintf(current_item->comment, sizeof(current_item->comment), "INFO - Change the display resolution.");
|
||||
}
|
||||
break;
|
||||
case SETTING_PAL60_MODE:
|
||||
snprintf(current_item->text, sizeof(current_item->text), "PAL60 Mode");
|
||||
snprintf(current_item->setting_text, sizeof(current_item->setting_text), (g_extern.lifecycle_mode_state & (1ULL << MODE_VIDEO_PAL_TEMPORAL_ENABLE)) ? "ON" : "OFF");
|
||||
snprintf(current_item->comment, sizeof(current_item->comment), (g_extern.lifecycle_mode_state & (1ULL << MODE_VIDEO_PAL_TEMPORAL_ENABLE)) ? "INFO - [PAL60 Mode] is set to 'ON'.\nconverts frames from 60Hz to 50Hz." : "INFO - [PAL60 Mode is set to 'OFF'.\nframes are not converted.");
|
||||
break;
|
||||
#endif
|
||||
#if defined(HAVE_CG) || defined(HAVE_HLSL) || defined(HAVE_GLSL)
|
||||
case SETTING_SHADER_PRESETS:
|
||||
@ -994,35 +999,48 @@ static int set_setting_action(void *data, unsigned switchvalue, uint64_t input)
|
||||
if (g_extern.console.screen.resolutions.list[g_extern.console.screen.resolutions.current.idx] == CELL_VIDEO_OUT_RESOLUTION_576)
|
||||
{
|
||||
if(gfx_ctx_check_resolution(CELL_VIDEO_OUT_RESOLUTION_576))
|
||||
{
|
||||
//ps3graphics_set_pal60hz(Settings.PS3PALTemporalMode60Hz);
|
||||
driver.video->restart();
|
||||
}
|
||||
g_extern.lifecycle_mode_state |= (1ULL<< MODE_VIDEO_PAL_ENABLE);
|
||||
}
|
||||
else
|
||||
{
|
||||
//ps3graphics_set_pal60hz(0);
|
||||
g_extern.lifecycle_mode_state &= ~(1ULL << MODE_VIDEO_PAL_ENABLE);
|
||||
g_extern.lifecycle_mode_state &= ~(1ULL << MODE_VIDEO_PAL_TEMPORAL_ENABLE);
|
||||
g_extern.lifecycle_mode_state &= ~(1ULL << MODE_VIDEO_PAL_VSYNC_BLOCK);
|
||||
}
|
||||
|
||||
driver.video->restart();
|
||||
}
|
||||
break;
|
||||
case SETTING_PAL60_MODE:
|
||||
if((input & (1ULL << RMENU_DEVICE_NAV_LEFT)) || (input & (1ULL << RMENU_DEVICE_NAV_RIGHT)) || (input & (1ULL << RMENU_DEVICE_NAV_B)))
|
||||
{
|
||||
if (g_extern.lifecycle_mode_state & (1ULL << MODE_VIDEO_PAL_ENABLE))
|
||||
{
|
||||
if (g_extern.lifecycle_mode_state & (1ULL << MODE_VIDEO_PAL_TEMPORAL_ENABLE))
|
||||
{
|
||||
g_extern.lifecycle_mode_state &= ~(1ULL << MODE_VIDEO_PAL_TEMPORAL_ENABLE);
|
||||
g_extern.lifecycle_mode_state &= ~(1ULL << MODE_VIDEO_PAL_VSYNC_BLOCK);
|
||||
}
|
||||
else
|
||||
{
|
||||
g_extern.lifecycle_mode_state |= (1ULL << MODE_VIDEO_PAL_TEMPORAL_ENABLE);
|
||||
g_extern.lifecycle_mode_state |= (1ULL << MODE_VIDEO_PAL_VSYNC_BLOCK);
|
||||
}
|
||||
|
||||
driver.video->restart();
|
||||
}
|
||||
}
|
||||
|
||||
if(input & (1ULL << RMENU_DEVICE_NAV_START))
|
||||
{
|
||||
if (g_extern.lifecycle_mode_state & (1ULL << MODE_VIDEO_PAL_ENABLE))
|
||||
{
|
||||
g_extern.lifecycle_mode_state &= ~(1ULL << MODE_VIDEO_PAL_TEMPORAL_ENABLE);
|
||||
g_extern.lifecycle_mode_state &= ~(1ULL << MODE_VIDEO_PAL_VSYNC_BLOCK);
|
||||
driver.video->restart();
|
||||
}
|
||||
}
|
||||
break;
|
||||
/*
|
||||
case SETTING_PAL60_MODE:
|
||||
if((input & (1ULL << RMENU_DEVICE_NAV_LEFT)) || (input & (1ULL << RMENU_DEVICE_NAV_RIGHT)) || (input & (1ULL << RMENU_DEVICE_NAV_B)))
|
||||
{
|
||||
if (Graphics->GetCurrentResolution() == CELL_VIDEO_OUT_RESOLUTION_576)
|
||||
{
|
||||
if(Graphics->CheckResolution(CELL_VIDEO_OUT_RESOLUTION_576))
|
||||
{
|
||||
Settings.PS3PALTemporalMode60Hz = !Settings.PS3PALTemporalMode60Hz;
|
||||
Graphics->SetPAL60Hz(Settings.PS3PALTemporalMode60Hz);
|
||||
Graphics->SwitchResolution(Graphics->GetCurrentResolution(), Settings.PS3PALTemporalMode60Hz, Settings.TripleBuffering);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
break;
|
||||
*/
|
||||
#endif
|
||||
#if defined(HAVE_CG) || defined(HAVE_HLSL) || defined(HAVE_GLSL)
|
||||
case SETTING_SHADER_PRESETS:
|
||||
@ -1247,13 +1265,19 @@ static int set_setting_action(void *data, unsigned switchvalue, uint64_t input)
|
||||
case SETTING_THROTTLE_MODE:
|
||||
if((input & (1ULL << RMENU_DEVICE_NAV_LEFT)) || (input & (1ULL << RMENU_DEVICE_NAV_RIGHT)) || (input & (1ULL << RMENU_DEVICE_NAV_B)))
|
||||
{
|
||||
rmenu_settings_set(S_THROTTLE);
|
||||
device_ptr->ctx_driver->swap_interval((g_extern.lifecycle_mode_state & (1ULL << MODE_VIDEO_THROTTLE_ENABLE)) ? true : false);
|
||||
if (!(g_extern.lifecycle_mode_state & (1ULL << MODE_VIDEO_PAL_VSYNC_BLOCK)))
|
||||
{
|
||||
rmenu_settings_set(S_THROTTLE);
|
||||
device_ptr->ctx_driver->swap_interval((g_extern.lifecycle_mode_state & (1ULL << MODE_VIDEO_THROTTLE_ENABLE)) ? true : false);
|
||||
}
|
||||
}
|
||||
if(input & (1ULL << RMENU_DEVICE_NAV_START))
|
||||
{
|
||||
rmenu_settings_set_default(S_DEF_THROTTLE);
|
||||
device_ptr->ctx_driver->swap_interval((g_extern.lifecycle_mode_state & (1ULL << MODE_VIDEO_THROTTLE_ENABLE)) ? true : false);
|
||||
if (!(g_extern.lifecycle_mode_state & (1ULL << MODE_VIDEO_PAL_VSYNC_BLOCK)))
|
||||
{
|
||||
rmenu_settings_set_default(S_DEF_THROTTLE);
|
||||
device_ptr->ctx_driver->swap_interval((g_extern.lifecycle_mode_state & (1ULL << MODE_VIDEO_THROTTLE_ENABLE)) ? true : false);
|
||||
}
|
||||
}
|
||||
break;
|
||||
case SETTING_TRIPLE_BUFFERING:
|
||||
|
@ -101,6 +101,7 @@ enum
|
||||
{
|
||||
#ifdef __CELLOS_LV2__
|
||||
SETTING_CHANGE_RESOLUTION,
|
||||
SETTING_PAL60_MODE,
|
||||
#endif
|
||||
#if defined(HAVE_CG) || defined(HAVE_HLSL) || defined(HAVE_GLSL)
|
||||
SETTING_SHADER_PRESETS,
|
||||
|
@ -129,6 +129,9 @@ enum menu_enums
|
||||
MODE_VIDEO_SCREENSHOTS_ENABLE,
|
||||
MODE_VIDEO_THROTTLE_ENABLE,
|
||||
MODE_VIDEO_OVERSCAN_ENABLE,
|
||||
MODE_VIDEO_PAL_ENABLE,
|
||||
MODE_VIDEO_PAL_TEMPORAL_ENABLE,
|
||||
MODE_VIDEO_PAL_VSYNC_BLOCK,
|
||||
MODE_AUDIO_CUSTOM_BGM_ENABLE,
|
||||
MODE_UNZIP_TO_CURDIR,
|
||||
MODE_UNZIP_TO_CURDIR_AND_LOAD_FIRST_FILE,
|
||||
|
@ -416,6 +416,7 @@ static bool gfx_ctx_init(void)
|
||||
|
||||
if (g_extern.lifecycle_mode_state & (1ULL << MODE_VIDEO_TRIPLE_BUFFERING_ENABLE))
|
||||
{
|
||||
RARCH_LOG("[PSGL Context]: Setting triple buffering.\n");
|
||||
params.enable |= PSGL_DEVICE_PARAMETERS_BUFFERING_MODE;
|
||||
params.bufferingMode = PSGL_BUFFERING_MODE_TRIPLE;
|
||||
}
|
||||
@ -425,6 +426,23 @@ static bool gfx_ctx_init(void)
|
||||
params.enable |= PSGL_DEVICE_PARAMETERS_WIDTH_HEIGHT;
|
||||
params.width = gfx_ctx_get_resolution_width(g_extern.console.screen.resolutions.current.id);
|
||||
params.height = gfx_ctx_get_resolution_height(g_extern.console.screen.resolutions.current.id);
|
||||
|
||||
if (params.width == 720 && params.height == 576)
|
||||
{
|
||||
RARCH_LOG("[PSGL Context]: 720x576 resolution detected, setting MODE_VIDEO_PAL_ENABLE.\n");
|
||||
g_extern.lifecycle_mode_state |= (1ULL << MODE_VIDEO_PAL_ENABLE);
|
||||
}
|
||||
else
|
||||
g_extern.lifecycle_mode_state &= ~(1ULL << MODE_VIDEO_PAL_ENABLE);
|
||||
}
|
||||
|
||||
if (g_extern.lifecycle_mode_state & (1ULL << MODE_VIDEO_PAL_TEMPORAL_ENABLE))
|
||||
{
|
||||
RARCH_LOG("[PSGL Context]: Setting temporal PAL60 mode.\n");
|
||||
params.enable |= PSGL_DEVICE_PARAMETERS_RESC_PAL_TEMPORAL_MODE;
|
||||
params.enable |= PSGL_DEVICE_PARAMETERS_RESC_RATIO_MODE;
|
||||
params.rescPalTemporalMode = RESC_PAL_TEMPORAL_MODE_60_INTERPOLATE;
|
||||
params.rescRatioMode = RESC_RATIO_MODE_FULLSCREEN;
|
||||
}
|
||||
|
||||
gl_device = psglCreateDeviceExtended(¶ms);
|
||||
|
Loading…
x
Reference in New Issue
Block a user