From 2f1a7cbee1ffecdd25ebc206ceab55ef934b7256 Mon Sep 17 00:00:00 2001 From: Stenzek Date: Fri, 16 Mar 2018 23:10:22 +1000 Subject: Implement "Skip" ubershader mode Skip ubershader mode works the same as hybrid ubershaders in that the shaders are compiled asynchronously. However, instead of using the ubershader to draw the object, it skips it entirely until the specialized shader is made available. This mode will likely result in broken effects where a game creates an EFB copy, and does not redraw it every frame. Therefore, it is not a recommended option, however, it may result in better performance on low-end systems. --- .../DolphinQt2/Config/Graphics/GraphicsRadio.cpp | 24 ++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 Source/Core/DolphinQt2/Config/Graphics/GraphicsRadio.cpp (limited to 'Source/Core/DolphinQt2/Config/Graphics/GraphicsRadio.cpp') diff --git a/Source/Core/DolphinQt2/Config/Graphics/GraphicsRadio.cpp b/Source/Core/DolphinQt2/Config/Graphics/GraphicsRadio.cpp new file mode 100644 index 0000000000..c8f87a548b --- /dev/null +++ b/Source/Core/DolphinQt2/Config/Graphics/GraphicsRadio.cpp @@ -0,0 +1,24 @@ +// Copyright 2018 Dolphin Emulator Project +// Licensed under GPLv2+ +// Refer to the license.txt file included. + +#include "DolphinQt2/Config/Graphics/GraphicsRadio.h" + +#include "Common/Config/Config.h" +#include "DolphinQt2/Settings.h" + +GraphicsRadioInt::GraphicsRadioInt(const QString& label, const Config::ConfigInfo& setting, + int value) + : QRadioButton(label), m_setting(setting), m_value(value) +{ + setChecked(Config::Get(m_setting) == m_value); + connect(this, &QRadioButton::toggled, this, &GraphicsRadioInt::Update); +} + +void GraphicsRadioInt::Update() +{ + if (!isChecked()) + return; + + Config::SetBaseOrCurrent(m_setting, m_value); +} -- cgit v1.2.3