Merge pull request #7411 from fr500/presets

fix auto shader preset loading in d3d10, d3d11, d3d12
This commit is contained in:
Twinaphex 2018-10-11 02:34:12 +02:00 committed by GitHub
commit 77f508dccb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 10 additions and 6 deletions

View File

@ -23,6 +23,8 @@
#include "../../driver.h"
#include "../../verbosity.h"
#include "../../configuration.h"
#include "../../retroarch.h"
#include "../video_driver.h"
#include "../font_driver.h"
#include "../common/win32_common.h"
@ -909,10 +911,10 @@ d3d10_gfx_init(const video_info_t* video,
if (settings->bools.video_shader_enable)
{
const char* ext = path_get_extension(settings->paths.path_shader);
const char* ext = path_get_extension(retroarch_get_shader_preset());
if (ext && !strncmp(ext, "slang", 5))
d3d10_gfx_set_shader(d3d10, RARCH_SHADER_SLANG, settings->paths.path_shader);
d3d10_gfx_set_shader(d3d10, RARCH_SHADER_SLANG, retroarch_get_shader_preset());
}
#if 0

View File

@ -25,6 +25,7 @@
#include "../../driver.h"
#include "../../verbosity.h"
#include "../configuration.h"
#include "../../retroarch.h"
#include "../video_driver.h"
#include "../font_driver.h"
#include "../common/win32_common.h"
@ -954,10 +955,10 @@ d3d11_gfx_init(const video_info_t* video, const input_driver_t** input, void** i
if (settings->bools.video_shader_enable)
{
const char* ext = path_get_extension(settings->paths.path_shader);
const char* ext = path_get_extension(retroarch_get_shader_preset());
if (ext && !strncmp(ext, "slang", 5))
d3d11_gfx_set_shader(d3d11, RARCH_SHADER_SLANG, settings->paths.path_shader);
d3d11_gfx_set_shader(d3d11, RARCH_SHADER_SLANG, retroarch_get_shader_preset());
}
if (video_driver_get_hw_context()->context_type == RETRO_HW_CONTEXT_DIRECT3D &&

View File

@ -31,6 +31,7 @@
#include "../../driver.h"
#include "../../verbosity.h"
#include "../../configuration.h"
#include "../../retroarch.h"
#include "wiiu/wiiu_dbg.h"
@ -971,10 +972,10 @@ d3d12_gfx_init(const video_info_t* video, const input_driver_t** input, void** i
if (settings->bools.video_shader_enable)
{
const char* ext = path_get_extension(settings->paths.path_shader);
const char* ext = path_get_extension(retroarch_get_shader_preset());
if (ext && string_is_equal(ext, "slangp"))
d3d12_gfx_set_shader(d3d12, RARCH_SHADER_SLANG, settings->paths.path_shader);
d3d12_gfx_set_shader(d3d12, RARCH_SHADER_SLANG, retroarch_get_shader_preset());
}
return d3d12;