mirror of
https://git.eden-emu.dev/eden-emu/eden.git
synced 2026-09-06 20:24:02 +00:00
8d3c9567a2
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.
49 lines
1015 B
C++
49 lines
1015 B
C++
// Copyright 2016 Citra Emulator Project
|
|
// Licensed under GPLv2 or any later version
|
|
// Refer to the license.txt file included.
|
|
|
|
#pragma once
|
|
|
|
#include <memory>
|
|
#include <QWidget>
|
|
|
|
class ConfigureDialog;
|
|
|
|
namespace ConfigurationShared {
|
|
enum class CheckState;
|
|
}
|
|
|
|
class HotkeyRegistry;
|
|
|
|
namespace Ui {
|
|
class ConfigureGeneral;
|
|
}
|
|
|
|
class ConfigureGeneral : public QWidget {
|
|
Q_OBJECT
|
|
|
|
public:
|
|
explicit ConfigureGeneral(QWidget* parent = nullptr);
|
|
~ConfigureGeneral() override;
|
|
|
|
void SetResetCallback(void (*callback)(ConfigureDialog*), ConfigureDialog *param);
|
|
void ResetDefaults();
|
|
void ApplyConfiguration();
|
|
|
|
private:
|
|
void changeEvent(QEvent* event) override;
|
|
void RetranslateUI();
|
|
|
|
void SetConfiguration();
|
|
|
|
void SetupPerGameUI();
|
|
|
|
void (*ResetCallback)(ConfigureDialog*);
|
|
ConfigureDialog *reset_callback_param;
|
|
|
|
std::unique_ptr<Ui::ConfigureGeneral> ui;
|
|
|
|
ConfigurationShared::CheckState use_frame_limit;
|
|
ConfigurationShared::CheckState use_multi_core;
|
|
};
|