mirror of
https://github.com/libretro/RetroArch
synced 2025-03-29 22:20:21 +00:00
video_driver_supports_viewport_read should only check if
taking screenshots with the GPU backbuffer is supported, move outside settings check to callee
This commit is contained in:
parent
43d27006ce
commit
280cec702b
@ -1534,10 +1534,7 @@ bool video_driver_supports_recording(void)
|
||||
|
||||
bool video_driver_supports_viewport_read(void)
|
||||
{
|
||||
settings_t *settings = config_get_ptr();
|
||||
return (settings->bools.video_gpu_screenshot ||
|
||||
(video_driver_is_hw_context() && !current_video->read_frame_raw))
|
||||
&& current_video->read_viewport && current_video->viewport_info;
|
||||
return current_video->read_viewport && current_video->viewport_info;
|
||||
}
|
||||
|
||||
bool video_driver_supports_read_frame_raw(void)
|
||||
|
@ -417,7 +417,7 @@ static bool load_content_from_compressed_archive(
|
||||
if (!string_is_empty(content_ctx->directory_cache))
|
||||
strlcpy(new_basedir, content_ctx->directory_cache, new_basedir_size);
|
||||
|
||||
if (string_is_empty(new_basedir) || !path_is_directory(new_basedir))
|
||||
if (!path_is_directory(new_basedir))
|
||||
{
|
||||
RARCH_WARN("Tried extracting to cache directory, but "
|
||||
"cache directory was not set or found. "
|
||||
|
@ -498,6 +498,7 @@ bool take_screenshot(
|
||||
bool silence, bool has_valid_framebuffer,
|
||||
bool fullpath, bool use_thread)
|
||||
{
|
||||
settings_t *settings = config_get_ptr();
|
||||
bool is_paused = false;
|
||||
bool is_idle = false;
|
||||
bool is_slowmotion = false;
|
||||
@ -515,7 +516,8 @@ bool take_screenshot(
|
||||
screenshot_dir,
|
||||
name_base, silence, is_paused, is_idle,
|
||||
has_valid_framebuffer, fullpath, use_thread,
|
||||
video_driver_supports_viewport_read(),
|
||||
video_driver_supports_viewport_read()
|
||||
&& settings->bools.video_gpu_screenshot,
|
||||
video_driver_supports_read_frame_raw(),
|
||||
video_driver_get_pixel_format()
|
||||
);
|
||||
|
Loading…
x
Reference in New Issue
Block a user