summaryrefslogtreecommitdiff
path: root/src/yuzu/configuration/configure_general.h
diff options
context:
space:
mode:
authorlat9nq <22451773+lat9nq@users.noreply.github.com>2021-05-25 20:49:42 -0400
committerlat9nq <22451773+lat9nq@users.noreply.github.com>2021-06-01 17:22:04 -0400
commit4a3d57e469c5604631b5768c4fa917f199ce7854 (patch)
tree74460d14a44d52709970a9a8152f2dca93733973 /src/yuzu/configuration/configure_general.h
parent8aeb42566968053d1a74f50f8453930cfdf2c42c (diff)
yuzu: Add settings reset button to general configuration
Builds on german77's work to reset all settings back to their defaults. This include UISettings and Settings values structs, but does not affect save profiles, input profiles, and game directories. This works from a button input in configure_general. When activated, it calls a callback to close the whole configure dialog, then GMainWindow deletes the old configuration, both on disk and in memory, and reinitalizes a new one. It also resets a portion of the UI and calls the telemetry window prompt.
Diffstat (limited to 'src/yuzu/configuration/configure_general.h')
-rw-r--r--src/yuzu/configuration/configure_general.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/yuzu/configuration/configure_general.h b/src/yuzu/configuration/configure_general.h
index 3d8a1dae0..2a7741ad9 100644
--- a/src/yuzu/configuration/configure_general.h
+++ b/src/yuzu/configuration/configure_general.h
@@ -7,6 +7,8 @@
#include <memory>
#include <QWidget>
+class ConfigureDialog;
+
namespace ConfigurationShared {
enum class CheckState;
}
@@ -24,6 +26,7 @@ public:
explicit ConfigureGeneral(QWidget* parent = nullptr);
~ConfigureGeneral() override;
+ void SetResetCallback(void (*callback)(ConfigureDialog*), ConfigureDialog *param);
void ResetDefaults();
void ApplyConfiguration();
@@ -35,6 +38,9 @@ private:
void SetupPerGameUI();
+ void (*ResetCallback)(ConfigureDialog*);
+ ConfigureDialog *reset_callback_param;
+
std::unique_ptr<Ui::ConfigureGeneral> ui;
ConfigurationShared::CheckState use_frame_limit;