mirror of
https://github.com/libretro/RetroArch
synced 2025-01-26 18:35:22 +00:00
(RMenu/RGUI) Console changes - menu should always run with vsync on +
remove video throttle option
This commit is contained in:
parent
74f3e8e11c
commit
a71a6a4749
@ -190,19 +190,29 @@ int rarch_main(int argc, char *argv[])
|
||||
if (driver.video_poke->set_aspect_ratio)
|
||||
driver.video_poke->set_aspect_ratio(driver.video_data, g_settings.video.aspect_ratio_idx);
|
||||
|
||||
if (g_extern.lifecycle_mode_state & (1ULL << MODE_VIDEO_THROTTLE_ENABLE))
|
||||
audio_start_func();
|
||||
|
||||
while(rarch_main_iterate());
|
||||
|
||||
if (g_extern.lifecycle_mode_state & (1ULL << MODE_VIDEO_THROTTLE_ENABLE))
|
||||
audio_stop_func();
|
||||
g_extern.lifecycle_mode_state &= ~(1ULL << MODE_GAME);
|
||||
}
|
||||
else if (g_extern.lifecycle_mode_state & (1ULL << MODE_MENU))
|
||||
{
|
||||
g_extern.lifecycle_mode_state |= (1ULL << MODE_MENU_PREINIT);
|
||||
// Menu should always run with vsync on
|
||||
video_set_nonblock_state_func(false);
|
||||
|
||||
if (driver.audio_data)
|
||||
audio_stop_func();
|
||||
|
||||
while (!g_extern.system.shutdown && menu_iterate());
|
||||
|
||||
driver_set_nonblock_state(driver.nonblock_state);
|
||||
|
||||
if (driver.audio_data && !audio_start_func())
|
||||
{
|
||||
RARCH_ERR("Failed to resume audio driver. Will continue without audio.\n");
|
||||
g_extern.audio_active = false;
|
||||
}
|
||||
|
||||
g_extern.lifecycle_mode_state &= ~(1ULL << MODE_MENU);
|
||||
}
|
||||
else
|
||||
|
@ -828,8 +828,6 @@ static void rgui_init_textures(void)
|
||||
|
||||
static int set_setting_action(uint8_t menu_type, unsigned switchvalue, uint64_t input)
|
||||
{
|
||||
DEVICE_CAST device_ptr = (DEVICE_CAST)driver.video_data;
|
||||
|
||||
switch (switchvalue)
|
||||
{
|
||||
#ifdef __CELLOS_LV2__
|
||||
@ -1003,24 +1001,6 @@ static int set_setting_action(uint8_t menu_type, unsigned switchvalue, uint64_t
|
||||
driver_set_monitor_refresh_rate(g_settings.video.refresh_rate);
|
||||
}
|
||||
break;
|
||||
case SETTING_THROTTLE_MODE:
|
||||
if ((input & (1ULL << DEVICE_NAV_LEFT)) || (input & (1ULL << DEVICE_NAV_RIGHT)) || (input & (1ULL << DEVICE_NAV_B)))
|
||||
{
|
||||
if (!(g_extern.lifecycle_mode_state & (1ULL << MODE_VIDEO_PAL_VSYNC_BLOCK)))
|
||||
{
|
||||
settings_set(1ULL << S_THROTTLE);
|
||||
device_ptr->ctx_driver->swap_interval((g_extern.lifecycle_mode_state & (1ULL << MODE_VIDEO_THROTTLE_ENABLE)) ? true : false);
|
||||
}
|
||||
}
|
||||
if (input & (1ULL << DEVICE_NAV_START))
|
||||
{
|
||||
if (!(g_extern.lifecycle_mode_state & (1ULL << MODE_VIDEO_PAL_VSYNC_BLOCK)))
|
||||
{
|
||||
settings_set(1ULL << 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:
|
||||
if ((input & (1ULL << DEVICE_NAV_LEFT)) || (input & (1ULL << DEVICE_NAV_RIGHT)) || (input & (1ULL << DEVICE_NAV_B)))
|
||||
{
|
||||
@ -1846,11 +1826,6 @@ static int select_setting(void *data, uint64_t input)
|
||||
snprintf(setting_text, sizeof(setting_text), "%fHz", g_settings.video.refresh_rate);
|
||||
strlcpy(comment, "INFO - Adjust or decrease [Refresh Rate].", sizeof(comment));
|
||||
break;
|
||||
case SETTING_THROTTLE_MODE:
|
||||
strlcpy(text, "Throttle Mode", sizeof(text));
|
||||
snprintf(setting_text, sizeof(setting_text), (g_extern.lifecycle_mode_state & (1ULL << MODE_VIDEO_THROTTLE_ENABLE)) ? "ON" : "OFF");
|
||||
snprintf(comment, sizeof(comment), (g_extern.lifecycle_mode_state & (1ULL << MODE_VIDEO_THROTTLE_ENABLE)) ? "INFO - [Throttle Mode] is 'ON' - Vsync is enabled." : "INFO - [Throttle Mode] is 'OFF' - Vsync is disabled.");
|
||||
break;
|
||||
case SETTING_TRIPLE_BUFFERING:
|
||||
strlcpy(text, "Triple Buffering", sizeof(text));
|
||||
snprintf(setting_text, sizeof(setting_text), (g_extern.lifecycle_mode_state & (1ULL << MODE_VIDEO_TRIPLE_BUFFERING_ENABLE)) ? "ON" : "OFF");
|
||||
|
@ -151,7 +151,6 @@ enum
|
||||
SETTING_SOFT_DISPLAY_FILTER,
|
||||
#endif
|
||||
SETTING_REFRESH_RATE,
|
||||
SETTING_THROTTLE_MODE,
|
||||
SETTING_TRIPLE_BUFFERING,
|
||||
SETTING_ASPECT_RATIO,
|
||||
SETTING_CUSTOM_VIEWPORT,
|
||||
|
@ -117,7 +117,6 @@ enum menu_enums
|
||||
MODE_VIDEO_TRIPLE_BUFFERING_ENABLE,
|
||||
MODE_VIDEO_FLICKER_FILTER_ENABLE,
|
||||
MODE_VIDEO_SOFT_FILTER_ENABLE,
|
||||
MODE_VIDEO_THROTTLE_ENABLE,
|
||||
MODE_VIDEO_PAL_ENABLE,
|
||||
MODE_VIDEO_PAL_TEMPORAL_ENABLE,
|
||||
MODE_VIDEO_PAL_VSYNC_BLOCK,
|
||||
@ -625,7 +624,6 @@ enum
|
||||
S_REWIND,
|
||||
S_SAVESTATE_DECREMENT,
|
||||
S_SAVESTATE_INCREMENT,
|
||||
S_THROTTLE,
|
||||
S_TRIPLE_BUFFERING,
|
||||
S_REFRESH_RATE_DECREMENT,
|
||||
S_REFRESH_RATE_INCREMENT,
|
||||
@ -637,7 +635,6 @@ enum
|
||||
S_DEF_AUDIO_CONTROL_RATE,
|
||||
S_DEF_HW_TEXTURE_FILTER,
|
||||
S_DEF_ROTATION,
|
||||
S_DEF_THROTTLE,
|
||||
S_DEF_TRIPLE_BUFFERING,
|
||||
S_DEF_SAVE_STATE,
|
||||
S_DEF_REFRESH_RATE,
|
||||
|
31
settings.c
31
settings.c
@ -267,7 +267,6 @@ void config_set_defaults(void)
|
||||
strlcpy(g_extern.savefile_dir, default_paths.sram_dir, sizeof(g_extern.savefile_dir));
|
||||
g_extern.console.screen.gamma_correction = DEFAULT_GAMMA;
|
||||
g_extern.lifecycle_mode_state |= (1ULL << MODE_AUDIO_CUSTOM_BGM_ENABLE);
|
||||
g_extern.lifecycle_mode_state |= (1ULL << MODE_VIDEO_THROTTLE_ENABLE);
|
||||
g_extern.lifecycle_mode_state |= (1ULL << MODE_VIDEO_TRIPLE_BUFFERING_ENABLE);
|
||||
g_extern.lifecycle_mode_state |= (1ULL << MODE_VIDEO_SOFT_FILTER_ENABLE);
|
||||
g_extern.lifecycle_mode_state |= (1ULL << MODE_VIDEO_FLICKER_FILTER_ENABLE);
|
||||
@ -543,14 +542,6 @@ bool config_load_file(const char *path)
|
||||
g_extern.lifecycle_mode_state &= ~(1ULL << MODE_INFO_DRAW);
|
||||
}
|
||||
|
||||
if (config_get_bool(conf, "throttle_enable", &throttle_enable))
|
||||
{
|
||||
if (throttle_enable)
|
||||
g_extern.lifecycle_mode_state |= (1ULL << MODE_VIDEO_THROTTLE_ENABLE);
|
||||
else
|
||||
g_extern.lifecycle_mode_state &= ~(1ULL << MODE_VIDEO_THROTTLE_ENABLE);
|
||||
}
|
||||
|
||||
if (config_get_bool(conf, "triple_buffering_enable", &triple_buffering_enable))
|
||||
{
|
||||
if (triple_buffering_enable)
|
||||
@ -1028,11 +1019,6 @@ bool config_save_file(const char *path)
|
||||
#ifdef _XBOX1
|
||||
config_set_int(conf, "sound_volume_level", g_extern.console.sound.volume_level);
|
||||
#endif
|
||||
if (g_extern.lifecycle_mode_state & (1ULL << MODE_VIDEO_THROTTLE_ENABLE))
|
||||
config_set_bool(conf, "throttle_enable", true);
|
||||
else
|
||||
config_set_bool(conf, "throttle_enable", false);
|
||||
|
||||
if (g_extern.lifecycle_mode_state & (1ULL << MODE_VIDEO_TRIPLE_BUFFERING_ENABLE))
|
||||
config_set_bool(conf, "triple_buffering_enable", true);
|
||||
else
|
||||
@ -1203,17 +1189,6 @@ void settings_set(uint64_t settings)
|
||||
if (settings & (1ULL << S_SAVESTATE_INCREMENT))
|
||||
g_extern.state_slot++;
|
||||
|
||||
if (settings & (1ULL << S_THROTTLE))
|
||||
{
|
||||
if(!g_extern.system.force_nonblock)
|
||||
{
|
||||
if (g_extern.lifecycle_mode_state & (1ULL << MODE_VIDEO_THROTTLE_ENABLE))
|
||||
g_extern.lifecycle_mode_state &= ~(1ULL << MODE_VIDEO_THROTTLE_ENABLE);
|
||||
else
|
||||
g_extern.lifecycle_mode_state |= (1ULL << MODE_VIDEO_THROTTLE_ENABLE);
|
||||
}
|
||||
}
|
||||
|
||||
if (settings & (1ULL << S_TRIPLE_BUFFERING))
|
||||
{
|
||||
if (g_extern.lifecycle_mode_state & (1ULL << MODE_VIDEO_TRIPLE_BUFFERING_ENABLE))
|
||||
@ -1265,12 +1240,6 @@ void settings_set(uint64_t settings)
|
||||
if (settings & (1ULL << S_DEF_ROTATION))
|
||||
g_extern.console.screen.orientation = ORIENTATION_NORMAL;
|
||||
|
||||
if (settings & (1ULL << S_DEF_THROTTLE))
|
||||
{
|
||||
if(!g_extern.system.force_nonblock)
|
||||
g_extern.lifecycle_mode_state |= (1ULL << MODE_VIDEO_THROTTLE_ENABLE);
|
||||
}
|
||||
|
||||
if (settings & (1ULL << S_DEF_TRIPLE_BUFFERING))
|
||||
g_extern.lifecycle_mode_state |= (1ULL << MODE_VIDEO_TRIPLE_BUFFERING_ENABLE);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user