CheatsManager/CheatSearchWidget: Avoid Global System Accessor

OnResetClicked and GenerateARCode appear to have been using the CPUThreadGuard in error.
This commit is contained in:
mitaclaw
2024-03-01 08:07:13 -08:00
parent 551dcec0b1
commit c377c1e21e
5 changed files with 28 additions and 19 deletions

View File

@ -26,13 +26,14 @@ class PartiallyClosableTabWidget;
namespace Core
{
enum class State;
}
class System;
} // namespace Core
class CheatsManager : public QDialog
{
Q_OBJECT
public:
explicit CheatsManager(QWidget* parent = nullptr);
explicit CheatsManager(Core::System& system, QWidget* parent = nullptr);
~CheatsManager();
signals:
@ -64,6 +65,8 @@ private:
std::string m_game_tdb_id;
u16 m_revision = 0;
Core::System& m_system;
QDialogButtonBox* m_button_box;
PartiallyClosableTabWidget* m_tab_widget = nullptr;