Add RARCH_DISPLAY_CTL_DEFAULT_SETTINGS

This commit is contained in:
twinaphex 2015-11-21 09:54:55 +01:00
parent 37544a7b3b
commit 35aef696ea
3 changed files with 18 additions and 2 deletions

View File

@ -715,11 +715,11 @@ static void config_set_defaults(void)
global->console.sound.system_bgm_enable = false;
#ifdef RARCH_CONSOLE
global->console.screen.gamma_correction = DEFAULT_GAMMA;
global->console.screen.resolutions.current.id = 0;
global->console.sound.mode = SOUND_MODE_NORMAL;
#endif
video_driver_ctl(RARCH_DISPLAY_CTL_DEFAULT_SETTINGS, NULL);
if (*g_defaults.path.buildbot_server_url)
strlcpy(settings->network.buildbot_url,
g_defaults.path.buildbot_server_url, sizeof(settings->network.buildbot_url));

View File

@ -22,6 +22,7 @@
#include "video_pixel_converter.h"
#include "video_context_driver.h"
#include "video_monitor.h"
#include "../config.def.h"
#include "../general.h"
#include "../performance.h"
#include "../string_list_special.h"
@ -1214,6 +1215,20 @@ bool video_driver_ctl(enum rarch_display_ctl_state state, void *data)
return false;
case RARCH_DISPLAY_CTL_FRAME_FILTER_IS_32BIT:
return video_state.filter.out_rgb32;
case RARCH_DISPLAY_CTL_DEFAULT_SETTINGS:
{
global_t *global = global_get_ptr();
if (!global)
return false;
global->console.screen.gamma_correction = DEFAULT_GAMMA;
global->console.flickerfilter_enable = false;
global->console.softfilter_enable = false;
global->console.screen.resolutions.current.id = 0;
}
return true;
case RARCH_DISPLAY_CTL_LOAD_SETTINGS:
{
global_t *global = global_get_ptr();

View File

@ -223,6 +223,7 @@ enum rarch_display_ctl_state
RARCH_DISPLAY_CTL_NONE = 0,
RARCH_DISPLAY_CTL_INIT,
RARCH_DISPLAY_CTL_DEINIT,
RARCH_DISPLAY_CTL_DEFAULT_SETTINGS,
RARCH_DISPLAY_CTL_LOAD_SETTINGS,
RARCH_DISPLAY_CTL_SAVE_SETTINGS,
RARCH_DISPLAY_CTL_MONITOR_RESET,