summaryrefslogtreecommitdiff
path: root/Source/Core/DolphinQt2/Config/GameConfigWidget.cpp
diff options
context:
space:
mode:
authorJosJuice <josjuice@gmail.com>2017-12-31 20:33:36 +0100
committerJosJuice <josjuice@gmail.com>2018-03-09 13:08:38 +0100
commit1f1dae367d8aeb525df5558ce648d6f287983008 (patch)
tree7933d673aad8869eef5fb3e74e1260274323e673 /Source/Core/DolphinQt2/Config/GameConfigWidget.cpp
parent1add238a284ab4baf5d5550d5f1af525226172c7 (diff)
Unify ISOFile (wx) with GameFile (Qt) and put it in UICommon
The original reason I wanted to do this was so that we can replace the Android-specific code with this in the future, but of course, just deduplicating between DolphinWX and DolphinQt2 is nice too. Fixes: - DolphinQt2 showing the wrong size for split WBFS disc images. - DolphinQt2 being case sensitive when checking if a file is a DOL/ELF. - DolphinQt2 not detecting when a Wii banner has become available after the game list cache was created. Removes: - DolphinWX's ability to load PNGs as custom banners. But it was already rather broken (see https://bugs.dolphin-emu.org/issues/10365 and https://bugs.dolphin-emu.org/issues/10366). The reason I removed this was because PNG decoding relied on wx code and we don't have any good non-wx/Qt code for loading PNG files right now (let's not use SOIL), but we should be able to use libpng directly to implement PNG loading in the future. - DolphinQt2's ability to ignore a cached game if the last modified time differs. We currently don't have a non-wx/Qt way to get the time.
Diffstat (limited to 'Source/Core/DolphinQt2/Config/GameConfigWidget.cpp')
-rw-r--r--Source/Core/DolphinQt2/Config/GameConfigWidget.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/Source/Core/DolphinQt2/Config/GameConfigWidget.cpp b/Source/Core/DolphinQt2/Config/GameConfigWidget.cpp
index 2421d056f9..ca0a64f068 100644
--- a/Source/Core/DolphinQt2/Config/GameConfigWidget.cpp
+++ b/Source/Core/DolphinQt2/Config/GameConfigWidget.cpp
@@ -23,7 +23,7 @@
#include "Core/ConfigLoaders/GameConfigLoader.h"
#include "Core/ConfigManager.h"
#include "DolphinQt2/Config/Graphics/GraphicsSlider.h"
-#include "DolphinQt2/GameList/GameFile.h"
+#include "UICommon/GameFile.h"
constexpr int DETERMINISM_NOT_SET_INDEX = 0;
constexpr int DETERMINISM_AUTO_INDEX = 1;
@@ -35,9 +35,9 @@ constexpr const char* DETERMINISM_AUTO_STRING = "auto";
constexpr const char* DETERMINISM_NONE_STRING = "none";
constexpr const char* DETERMINISM_FAKE_COMPLETION_STRING = "fake-completion";
-GameConfigWidget::GameConfigWidget(const GameFile& game) : m_game(game)
+GameConfigWidget::GameConfigWidget(const UICommon::GameFile& game) : m_game(game)
{
- m_game_id = m_game.GetGameID().toStdString();
+ m_game_id = m_game.GetGameID();
m_gameini_local_path =
QString::fromStdString(File::GetUserPath(D_GAMESETTINGS_IDX) + m_game_id + ".ini");
m_gameini_local = SConfig::LoadLocalGameIni(m_game_id, m_game.GetRevision());
@@ -241,8 +241,8 @@ void GameConfigWidget::SaveCheckBox(QCheckBox* checkbox, const std::string& sect
void GameConfigWidget::LoadSettings()
{
// Load state information
- m_state_combo->setCurrentIndex(m_game.GetRating());
- m_state_comment_edit->setText(m_game.GetIssues());
+ m_state_combo->setCurrentIndex(m_game.GetEmuState());
+ m_state_comment_edit->setText(QString::fromStdString(m_game.GetIssues()));
// Load game-specific settings
@@ -301,10 +301,10 @@ void GameConfigWidget::SaveSettings()
QString comment = m_state_comment_edit->text();
int state = m_state_combo->currentIndex();
- if (comment != m_game.GetIssues())
+ if (comment != QString::fromStdString(m_game.GetIssues()))
m_gameini_local.GetOrCreateSection("EmuState")->Set("EmulationIssues", comment.toStdString());
- if (state != m_game.GetRating())
+ if (state != m_game.GetEmuState())
m_gameini_local.GetOrCreateSection("EmuState")->Set("EmulationStateId", state);
// Save game-specific settings