mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2024-11-14 21:37:52 -07:00
ARCodeWidget: Take game ID and revision directly instead of through GameFile.
This commit is contained in:
parent
684d09b342
commit
1fbe56210a
@ -193,7 +193,7 @@ void CheatsManager::OnStateChanged(Core::State state)
|
||||
if (m_ar_code)
|
||||
m_ar_code->deleteLater();
|
||||
|
||||
m_ar_code = new ARCodeWidget(*m_game_file, false);
|
||||
m_ar_code = new ARCodeWidget(m_game_file->GetGameID(), m_game_file->GetRevision(), false);
|
||||
m_tab_widget->insertTab(0, m_ar_code, tr("AR Code"));
|
||||
m_tab_widget->insertTab(1, new GeckoCodeWidget(*m_game_file, false), tr("Gecko Codes"));
|
||||
}
|
||||
|
@ -4,6 +4,8 @@
|
||||
|
||||
#include "DolphinQt/Config/ARCodeWidget.h"
|
||||
|
||||
#include <utility>
|
||||
|
||||
#include <QButtonGroup>
|
||||
#include <QCursor>
|
||||
#include <QHBoxLayout>
|
||||
@ -23,8 +25,8 @@
|
||||
|
||||
#include "UICommon/GameFile.h"
|
||||
|
||||
ARCodeWidget::ARCodeWidget(const UICommon::GameFile& game, bool restart_required)
|
||||
: m_game(game), m_game_id(game.GetGameID()), m_game_revision(game.GetRevision()),
|
||||
ARCodeWidget::ARCodeWidget(std::string game_id, u16 game_revision, bool restart_required)
|
||||
: m_game_id(std::move(game_id)), m_game_revision(game_revision),
|
||||
m_restart_required(restart_required)
|
||||
{
|
||||
CreateWidgets();
|
||||
|
@ -16,11 +16,6 @@ namespace ActionReplay
|
||||
struct ARCode;
|
||||
}
|
||||
|
||||
namespace UICommon
|
||||
{
|
||||
class GameFile;
|
||||
}
|
||||
|
||||
class CheatWarningWidget;
|
||||
class QLabel;
|
||||
class QListWidget;
|
||||
@ -31,7 +26,7 @@ class ARCodeWidget : public QWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
explicit ARCodeWidget(const UICommon::GameFile& game, bool restart_required = true);
|
||||
explicit ARCodeWidget(std::string game_id, u16 game_revision, bool restart_required = true);
|
||||
~ARCodeWidget() override;
|
||||
|
||||
void AddCode(ActionReplay::ARCode code);
|
||||
@ -56,7 +51,6 @@ private:
|
||||
|
||||
void OnListReordered();
|
||||
|
||||
const UICommon::GameFile& m_game;
|
||||
std::string m_game_id;
|
||||
u16 m_game_revision;
|
||||
|
||||
|
@ -38,7 +38,7 @@ PropertiesDialog::PropertiesDialog(QWidget* parent, const UICommon::GameFile& ga
|
||||
QTabWidget* tab_widget = new QTabWidget(this);
|
||||
InfoWidget* info = new InfoWidget(game);
|
||||
|
||||
ARCodeWidget* ar = new ARCodeWidget(game);
|
||||
ARCodeWidget* ar = new ARCodeWidget(game.GetGameID(), game.GetRevision());
|
||||
GeckoCodeWidget* gecko = new GeckoCodeWidget(game);
|
||||
PatchesWidget* patches = new PatchesWidget(game);
|
||||
GameConfigWidget* game_config = new GameConfigWidget(game);
|
||||
|
Loading…
Reference in New Issue
Block a user