mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-30 20:58:54 +00:00
update Cheat files
This commit is contained in:
parent
9ab8c1e433
commit
cbfd634a4b
217 changed files with 2263 additions and 1880 deletions
|
@ -33,13 +33,14 @@ ARCodeWidget::ARCodeWidget(std::string game_id, u16 game_revision, bool restart_
|
|||
|
||||
if (!m_game_id.empty())
|
||||
{
|
||||
IniFile game_ini_local;
|
||||
Common::IniFile game_ini_local;
|
||||
|
||||
// We don't use LoadLocalGameIni() here because user cheat codes that are installed via the UI
|
||||
// will always be stored in GS/${GAMEID}.ini
|
||||
game_ini_local.Load(File::GetUserPath(D_GAMESETTINGS_IDX) + m_game_id + ".ini");
|
||||
|
||||
const IniFile game_ini_default = SConfig::LoadDefaultGameIni(m_game_id, m_game_revision);
|
||||
const Common::IniFile game_ini_default =
|
||||
SConfig::LoadDefaultGameIni(m_game_id, m_game_revision);
|
||||
m_ar_codes = ActionReplay::LoadCodes(game_ini_default, game_ini_local);
|
||||
}
|
||||
|
||||
|
@ -185,7 +186,7 @@ void ARCodeWidget::SaveCodes()
|
|||
const auto ini_path =
|
||||
std::string(File::GetUserPath(D_GAMESETTINGS_IDX)).append(m_game_id).append(".ini");
|
||||
|
||||
IniFile game_ini_local;
|
||||
Common::IniFile game_ini_local;
|
||||
game_ini_local.Load(ini_path);
|
||||
ActionReplay::SaveCodes(&game_ini_local, m_ar_codes);
|
||||
game_ini_local.Save(ini_path);
|
||||
|
|
|
@ -63,6 +63,6 @@ private:
|
|||
const UICommon::GameFile& m_game;
|
||||
std::string m_game_id;
|
||||
|
||||
IniFile m_gameini_local;
|
||||
IniFile m_gameini_default;
|
||||
Common::IniFile m_gameini_local;
|
||||
Common::IniFile m_gameini_default;
|
||||
};
|
||||
|
|
|
@ -40,13 +40,14 @@ GeckoCodeWidget::GeckoCodeWidget(std::string game_id, std::string gametdb_id, u1
|
|||
|
||||
if (!m_game_id.empty())
|
||||
{
|
||||
IniFile game_ini_local;
|
||||
Common::IniFile game_ini_local;
|
||||
|
||||
// We don't use LoadLocalGameIni() here because user cheat codes that are installed via the UI
|
||||
// will always be stored in GS/${GAMEID}.ini
|
||||
game_ini_local.Load(File::GetUserPath(D_GAMESETTINGS_IDX) + m_game_id + ".ini");
|
||||
|
||||
const IniFile game_ini_default = SConfig::LoadDefaultGameIni(m_game_id, m_game_revision);
|
||||
const Common::IniFile game_ini_default =
|
||||
SConfig::LoadDefaultGameIni(m_game_id, m_game_revision);
|
||||
m_gecko_codes = Gecko::LoadCodes(game_ini_default, game_ini_local);
|
||||
}
|
||||
|
||||
|
@ -245,7 +246,7 @@ void GeckoCodeWidget::SaveCodes()
|
|||
const auto ini_path =
|
||||
std::string(File::GetUserPath(D_GAMESETTINGS_IDX)).append(m_game_id).append(".ini");
|
||||
|
||||
IniFile game_ini_local;
|
||||
Common::IniFile game_ini_local;
|
||||
game_ini_local.Load(ini_path);
|
||||
Gecko::SaveCodes(game_ini_local, m_gecko_codes);
|
||||
game_ini_local.Save(ini_path);
|
||||
|
|
|
@ -9,7 +9,6 @@
|
|||
|
||||
#include "Common/Config/Config.h"
|
||||
|
||||
#include "DolphinQt/Config/Graphics/BalloonTip.h"
|
||||
#include "DolphinQt/Settings.h"
|
||||
|
||||
GraphicsBool::GraphicsBool(const QString& label, const Config::Info<bool>& setting, bool reverse)
|
||||
|
@ -32,23 +31,3 @@ void GraphicsBool::Update()
|
|||
{
|
||||
Config::SetBaseOrCurrent(m_setting, static_cast<bool>(isChecked() ^ m_reverse));
|
||||
}
|
||||
|
||||
GraphicsBoolEx::GraphicsBoolEx(const QString& label, const Config::Info<bool>& setting,
|
||||
bool reverse)
|
||||
: ToolTipRadioButton(label), m_setting(setting), m_reverse(reverse)
|
||||
{
|
||||
connect(this, &QCheckBox::toggled, this, &GraphicsBoolEx::Update);
|
||||
setChecked(Config::Get(m_setting) ^ reverse);
|
||||
|
||||
if (Config::GetActiveLayerForConfig(m_setting) != Config::LayerType::Base)
|
||||
{
|
||||
QFont bf = font();
|
||||
bf.setBold(true);
|
||||
setFont(bf);
|
||||
}
|
||||
}
|
||||
|
||||
void GraphicsBoolEx::Update()
|
||||
{
|
||||
Config::SetBaseOrCurrent(m_setting, static_cast<bool>(isChecked() ^ m_reverse));
|
||||
}
|
||||
|
|
|
@ -4,7 +4,6 @@
|
|||
#pragma once
|
||||
|
||||
#include "DolphinQt/Config/ToolTipControls/ToolTipCheckBox.h"
|
||||
#include "DolphinQt/Config/ToolTipControls/ToolTipRadioButton.h"
|
||||
|
||||
namespace Config
|
||||
{
|
||||
|
@ -24,16 +23,3 @@ private:
|
|||
const Config::Info<bool>& m_setting;
|
||||
bool m_reverse;
|
||||
};
|
||||
|
||||
class GraphicsBoolEx : public ToolTipRadioButton
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
GraphicsBoolEx(const QString& label, const Config::Info<bool>& setting, bool reverse = false);
|
||||
|
||||
private:
|
||||
void Update();
|
||||
|
||||
const Config::Info<bool>& m_setting;
|
||||
bool m_reverse;
|
||||
};
|
||||
|
|
|
@ -299,7 +299,7 @@ void MappingWindow::OnLoadProfilePressed()
|
|||
|
||||
const QString profile_path = m_profiles_combo->currentData().toString();
|
||||
|
||||
IniFile ini;
|
||||
Common::IniFile ini;
|
||||
ini.Load(profile_path.toStdString());
|
||||
|
||||
m_controller->LoadConfig(ini.GetOrCreateSection("Profile"));
|
||||
|
@ -322,7 +322,7 @@ void MappingWindow::OnSaveProfilePressed()
|
|||
|
||||
File::CreateFullPath(profile_path);
|
||||
|
||||
IniFile ini;
|
||||
Common::IniFile ini;
|
||||
|
||||
m_controller->SaveConfig(ini.GetOrCreateSection("Profile"));
|
||||
ini.Save(profile_path);
|
||||
|
@ -542,7 +542,7 @@ void MappingWindow::OnDefaultFieldsPressed()
|
|||
void MappingWindow::OnClearFieldsPressed()
|
||||
{
|
||||
// Loading an empty inifile section clears everything.
|
||||
IniFile::Section sec;
|
||||
Common::IniFile::Section sec;
|
||||
|
||||
// Keep the currently selected device.
|
||||
const auto default_device = m_controller->GetDefaultDevice();
|
||||
|
|
|
@ -21,10 +21,11 @@
|
|||
PatchesWidget::PatchesWidget(const UICommon::GameFile& game)
|
||||
: m_game_id(game.GetGameID()), m_game_revision(game.GetRevision())
|
||||
{
|
||||
IniFile game_ini_local;
|
||||
Common::IniFile game_ini_local;
|
||||
game_ini_local.Load(File::GetUserPath(D_GAMESETTINGS_IDX) + m_game_id + ".ini");
|
||||
|
||||
IniFile game_ini_default = SConfig::GetInstance().LoadDefaultGameIni(m_game_id, m_game_revision);
|
||||
Common::IniFile game_ini_default =
|
||||
SConfig::GetInstance().LoadDefaultGameIni(m_game_id, m_game_revision);
|
||||
|
||||
PatchEngine::LoadPatchSection("OnFrame", &m_patches, game_ini_default, game_ini_local);
|
||||
|
||||
|
@ -128,7 +129,7 @@ void PatchesWidget::SavePatches()
|
|||
{
|
||||
const std::string ini_path = File::GetUserPath(D_GAMESETTINGS_IDX) + m_game_id + ".ini";
|
||||
|
||||
IniFile game_ini_local;
|
||||
Common::IniFile game_ini_local;
|
||||
game_ini_local.Load(ini_path);
|
||||
PatchEngine::SavePatchSection(&game_ini_local, m_patches);
|
||||
game_ini_local.Save(ini_path);
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
// Copyright 2020 Dolphin Emulator Project
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
#include "DolphinQt/Config/Graphics/BalloonTip.h"
|
||||
#include "DolphinQt/Config/ToolTipControls/BalloonTip.h"
|
||||
|
||||
#include <memory>
|
||||
|
|
@ -7,7 +7,7 @@
|
|||
|
||||
#include <QString>
|
||||
|
||||
#include "DolphinQt/Config/Graphics/BalloonTip.h"
|
||||
#include "DolphinQt/Config/ToolTipControls/BalloonTip.h"
|
||||
|
||||
constexpr int TOOLTIP_DELAY = 300;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue