Add GPU screenshots option.

This commit is contained in:
Themaister 2013-09-16 23:10:15 +02:00
parent bbbe058cad
commit 815cf1f35c
3 changed files with 20 additions and 0 deletions

View File

@ -157,6 +157,7 @@ typedef enum
RGUI_SETTINGS_DISK_APPEND,
#ifdef HAVE_SCREENSHOTS
RGUI_SETTINGS_SCREENSHOT,
RGUI_SETTINGS_GPU_SCREENSHOT,
#endif
RGUI_BROWSER_DIR_PATH,
RGUI_SHADER_DIR_PATH,

View File

@ -661,6 +661,11 @@ static void render_text(rgui_handle_t *rgui)
case RGUI_SETTINGS_REWIND_ENABLE:
strlcpy(type_str, g_settings.rewind_enable ? "ON" : "OFF", sizeof(type_str));
break;
#ifdef HAVE_SCREENSHOTS
case RGUI_SETTINGS_GPU_SCREENSHOT:
strlcpy(type_str, g_settings.video.gpu_screenshot ? "ON" : "OFF", sizeof(type_str));
break;
#endif
case RGUI_SETTINGS_REWIND_GRANULARITY:
snprintf(type_str, sizeof(type_str), "%u", g_settings.rewind_granularity);
break;
@ -946,6 +951,16 @@ static int rgui_settings_toggle_setting(rgui_handle_t *rgui, unsigned setting, r
rarch_deinit_rewind();
}
break;
#ifdef HAVE_SCREENSHOTS
case RGUI_SETTINGS_GPU_SCREENSHOT:
if (action == RGUI_ACTION_OK ||
action == RGUI_ACTION_LEFT ||
action == RGUI_ACTION_RIGHT)
g_settings.video.gpu_screenshot = !g_settings.video.gpu_screenshot;
else if (action == RGUI_ACTION_START)
g_settings.video.gpu_screenshot = true;
break;
#endif
case RGUI_SETTINGS_REWIND_GRANULARITY:
if (action == RGUI_ACTION_OK || action == RGUI_ACTION_RIGHT)
g_settings.rewind_granularity++;
@ -1425,6 +1440,9 @@ static void rgui_settings_options_populate_entries(rgui_handle_t *rgui)
rgui_list_clear(rgui->selection_buf);
rgui_list_push(rgui->selection_buf, "Rewind", RGUI_SETTINGS_REWIND_ENABLE, 0);
rgui_list_push(rgui->selection_buf, "Rewind Granularity", RGUI_SETTINGS_REWIND_GRANULARITY, 0);
#ifdef HAVE_SCREENSHOTS
rgui_list_push(rgui->selection_buf, "GPU Screenshots", RGUI_SETTINGS_GPU_SCREENSHOT, 0);
#endif
rgui_list_push(rgui->selection_buf, "Config Save On Exit", RGUI_SETTINGS_CONFIG_SAVE_ON_EXIT, 0);
#if defined(HAVE_THREADS) && !defined(RARCH_CONSOLE)
rgui_list_push(rgui->selection_buf, "SRAM Autosave", RGUI_SETTINGS_SRAM_AUTOSAVE, 0);

View File

@ -991,6 +991,7 @@ bool config_save_file(const char *path)
config_set_int(conf, "video_hard_sync_frames", g_settings.video.hard_sync_frames);
config_set_bool(conf, "video_black_frame_insertion", g_settings.video.black_frame_insertion);
config_set_int(conf, "video_swap_interval", g_settings.video.swap_interval);
config_set_bool(conf, "video_gpu_screenshot", g_settings.video.gpu_screenshot);
config_set_int(conf, "aspect_ratio_index", g_settings.video.aspect_ratio_idx);
config_set_string(conf, "audio_device", g_settings.audio.device);
config_set_bool(conf, "audio_rate_control", g_settings.audio.rate_control);