citra,citra_qt: load/save hardware shader settings

This commit is contained in:
wwylele 2018-05-13 10:45:59 +03:00
parent 97f9cfac70
commit f1cc8cfea9
3 changed files with 24 additions and 0 deletions

View file

@ -95,6 +95,11 @@ void Config::ReadValues() {
// Renderer
Settings::values.use_hw_renderer = sdl2_config->GetBoolean("Renderer", "use_hw_renderer", true);
Settings::values.use_hw_shader = sdl2_config->GetBoolean("Renderer", "use_hw_shader", true);
Settings::values.shaders_accurate_gs =
sdl2_config->GetBoolean("Renderer", "shaders_accurate_gs", true);
Settings::values.shaders_accurate_mul =
sdl2_config->GetBoolean("Renderer", "shaders_accurate_mul", false);
Settings::values.use_shader_jit = sdl2_config->GetBoolean("Renderer", "use_shader_jit", true);
Settings::values.resolution_factor =
static_cast<u16>(sdl2_config->GetInteger("Renderer", "resolution_factor", 1));

View file

@ -77,6 +77,18 @@ use_cpu_jit =
# 0: Software, 1 (default): Hardware
use_hw_renderer =
# Whether to use hardware shaders to emulate 3DS shaders
# 0: Software, 1 (default): Hardware
use_hw_shader =
# Whether to use accurate multiplication in hardware shaders
# 0: Off (Default. Faster, but causes issues in some games) 1: On (Slower, but correct)
shaders_accurate_mul =
# Whether to fallback to software for geometry shaders
# 0: Off (Faster, but causes issues in some games) 1: On (Default. Slower, but correct)
shaders_accurate_gs =
# Whether to use the Just-In-Time (JIT) compiler for shader emulation
# 0: Interpreter (slow), 1 (default): JIT (fast)
use_shader_jit =

View file

@ -83,6 +83,10 @@ void Config::ReadValues() {
qt_config->beginGroup("Renderer");
Settings::values.use_hw_renderer = qt_config->value("use_hw_renderer", true).toBool();
Settings::values.use_hw_shader = qt_config->value("use_hw_shader", true).toBool();
Settings::values.shaders_accurate_gs = qt_config->value("shaders_accurate_gs", true).toBool();
Settings::values.shaders_accurate_mul =
qt_config->value("shaders_accurate_mul", false).toBool();
Settings::values.use_shader_jit = qt_config->value("use_shader_jit", true).toBool();
Settings::values.resolution_factor =
static_cast<u16>(qt_config->value("resolution_factor", 1).toInt());
@ -272,6 +276,9 @@ void Config::SaveValues() {
qt_config->beginGroup("Renderer");
qt_config->setValue("use_hw_renderer", Settings::values.use_hw_renderer);
qt_config->setValue("use_hw_shader", Settings::values.use_hw_shader);
qt_config->setValue("shaders_accurate_gs", Settings::values.shaders_accurate_gs);
qt_config->setValue("shaders_accurate_mul", Settings::values.shaders_accurate_mul);
qt_config->setValue("use_shader_jit", Settings::values.use_shader_jit);
qt_config->setValue("resolution_factor", Settings::values.resolution_factor);
qt_config->setValue("use_vsync", Settings::values.use_vsync);