Add possibility to avoid screenshoting viewport.

This commit is contained in:
Themaister 2012-08-26 21:18:00 +02:00
parent 9d3f27510b
commit d68f5424dc
5 changed files with 13 additions and 1 deletions

View File

@ -203,6 +203,9 @@ static const bool h264_record = true;
// Record post-filtered (CPU filter) video rather than raw game output.
static const bool post_filter_record = false;
// Screenshots post-shaded GPU output if available.
static const bool gpu_screenshot = true;
// Record post-shaded GPU output instead of raw game footage if available.
static const bool gpu_record = false;

View File

@ -128,6 +128,7 @@ struct settings
bool h264_record;
bool post_filter_record;
bool gpu_record;
bool gpu_screenshot;
bool allow_rotate;
char external_driver[PATH_MAX];

View File

@ -141,7 +141,7 @@ static void take_screenshot(void)
bool ret = false;
if (driver.video->read_viewport && driver.video->viewport_size)
if (g_settings.video.gpu_screenshot && driver.video->read_viewport && driver.video->viewport_size)
ret = take_screenshot_viewport();
else if (g_extern.frame_cache.data)
ret = take_screenshot_raw();

View File

@ -367,6 +367,12 @@
# Records video after CPU video filter.
# video_post_filter_record = false
# Records output of GPU shaded material if available.
# video_gpu_record = false
# Screenshots output of GPU shaded material if available.
# video_gpu_screenshot = true
# Block SRAM from being overwritten when loading save states.
# Might potentially lead to buggy games.
# block_sram_overwrite = false

View File

@ -179,6 +179,7 @@ void config_set_defaults(void)
g_settings.video.h264_record = h264_record;
g_settings.video.post_filter_record = post_filter_record;
g_settings.video.gpu_record = gpu_record;
g_settings.video.gpu_screenshot = gpu_screenshot;
g_settings.audio.enable = audio_enable;
g_settings.audio.out_rate = out_rate;
@ -392,6 +393,7 @@ bool config_load_file(const char *path)
CONFIG_GET_BOOL(video.h264_record, "video_h264_record");
CONFIG_GET_BOOL(video.post_filter_record, "video_post_filter_record");
CONFIG_GET_BOOL(video.gpu_record, "video_gpu_record");
CONFIG_GET_BOOL(video.gpu_screenshot, "video_gpu_screenshot");
#ifdef HAVE_DYLIB
CONFIG_GET_STRING(video.filter_path, "video_filter");