diff --git a/Source/Core/DolphinQt/GameList/GameFile.cpp b/Source/Core/DolphinQt/GameList/GameFile.cpp index 70cd91b64c..4cfe616e18 100644 --- a/Source/Core/DolphinQt/GameList/GameFile.cpp +++ b/Source/Core/DolphinQt/GameList/GameFile.cpp @@ -225,9 +225,9 @@ QString GameFile::CreateCacheFilename() // Filename.extension_HashOfFolderPath_Size.cache // Append hash to prevent ISO name-clashing in different folders. - filename.append(StringFromFormat("%s_%x_%lx.qcache", + filename.append(StringFromFormat("%s_%x_%llx.qcache", extension.c_str(), HashFletcher((const u8*)pathname.c_str(), pathname.size()), - File::GetSize(m_file_name.toStdString()))); + (unsigned long long)File::GetSize(m_file_name.toStdString()))); QString fullname = QString::fromStdString(File::GetUserPath(D_CACHE_IDX)); fullname += QString::fromStdString(filename); diff --git a/Source/Core/DolphinQt/GameList/GameGrid.ui b/Source/Core/DolphinQt/GameList/GameGrid.ui index 742435b22a..cc910ee63b 100644 --- a/Source/Core/DolphinQt/GameList/GameGrid.ui +++ b/Source/Core/DolphinQt/GameList/GameGrid.ui @@ -6,8 +6,8 @@ 0 0 - 256 - 192 + 254 + 190 @@ -16,6 +16,9 @@ QListView::Adjust + + true + diff --git a/Source/Core/DolphinQt/GameList/GameTree.cpp b/Source/Core/DolphinQt/GameList/GameTree.cpp index fa3d5babe4..7cf0c874ca 100644 --- a/Source/Core/DolphinQt/GameList/GameTree.cpp +++ b/Source/Core/DolphinQt/GameList/GameTree.cpp @@ -114,6 +114,7 @@ void DGameTree::AddGame(GameFile* item) i->setText(COL_DESCRIPTION, item->GetDescription()); i->setIcon(COL_REGION, QIcon(Resources::GetRegionPixmap(item->GetCountry()))); i->setText(COL_SIZE, NiceSizeFormat(item->GetFileSize())); + i->setIcon(COL_STATE, QIcon(Resources::GetRatingPixmap(item->GetEmuState()))); if (item->IsCompressed()) { for (int col = 0; col < columnCount(); col++) diff --git a/Source/Core/DolphinQt/MainWindow.cpp b/Source/Core/DolphinQt/MainWindow.cpp index 4bb13e29e2..bd3b0e103b 100644 --- a/Source/Core/DolphinQt/MainWindow.cpp +++ b/Source/Core/DolphinQt/MainWindow.cpp @@ -261,16 +261,6 @@ void DMainWindow::OnCoreStateChanged(Core::EState state) m_game_tracker->setEnabled(is_not_initialized); } -bool DMainWindow::RenderWidgetHasFocus() -{ - if (SConfig::GetInstance().m_LocalCoreStartupParameter.bRenderToMain) - return isActiveWindow(); - else if (m_render_widget != nullptr) - return m_render_widget->isActiveWindow(); - else - return false; -} - // Update all the icons used in DMainWindow with fresh ones from // "Resources". Call this function after changing the icon theme. void DMainWindow::UpdateIcons() diff --git a/Source/Core/DolphinQt/MainWindow.h b/Source/Core/DolphinQt/MainWindow.h index e8fa97c8ba..cee7743adb 100644 --- a/Source/Core/DolphinQt/MainWindow.h +++ b/Source/Core/DolphinQt/MainWindow.h @@ -27,7 +27,7 @@ public: ~DMainWindow(); // DRenderWidget - bool RenderWidgetHasFocus(); + bool RenderWidgetHasFocus() const { return m_render_widget->isActiveWindow(); } DRenderWidget* GetRenderWidget() { return m_render_widget.get(); } signals: @@ -65,7 +65,7 @@ private: QString ShowFileDialog(); void DoStartPause(); - std::unique_ptr m_render_widget; // TODO: just create this once and reuse it + std::unique_ptr m_render_widget; bool m_isStopping = false; }; diff --git a/Source/Core/DolphinQt/MainWindow.ui b/Source/Core/DolphinQt/MainWindow.ui index f0b65dee2e..3fee16ffe0 100644 --- a/Source/Core/DolphinQt/MainWindow.ui +++ b/Source/Core/DolphinQt/MainWindow.ui @@ -6,8 +6,8 @@ 0 0 - 992 - 592 + 990 + 590 @@ -31,8 +31,8 @@ 0 0 - 992 - 21 + 990 + 24 @@ -60,16 +60,16 @@ &View - + - Gamelist view style + &List style - + @@ -161,7 +161,7 @@ - About Qt + About &Qt QAction::AboutQtRole @@ -172,7 +172,7 @@ true - List view + &List view @@ -180,7 +180,7 @@ true - Tree view + &Tree view @@ -188,7 +188,7 @@ true - Grid view + &Grid view @@ -196,7 +196,7 @@ true - Icon view + &Icon view diff --git a/Source/Core/DolphinQt/SystemInfo.cpp b/Source/Core/DolphinQt/SystemInfo.cpp index 5494886706..28445eded3 100644 --- a/Source/Core/DolphinQt/SystemInfo.cpp +++ b/Source/Core/DolphinQt/SystemInfo.cpp @@ -27,14 +27,14 @@ DSystemInfo::DSystemInfo(QWidget* parent_widget) : UpdateSystemInfo(); QPushButton* btn = m_ui->buttonBox->addButton(tr("Copy"), QDialogButtonBox::ActionRole); - connect(btn, SIGNAL(pressed()), this, SLOT(btnCopy_pressed())); + connect(btn, SIGNAL(pressed()), this, SLOT(CopyPressed())); } DSystemInfo::~DSystemInfo() { } -void DSystemInfo::btnCopy_pressed() +void DSystemInfo::CopyPressed() { QClipboard* clipboard = QApplication::clipboard(); clipboard->setText(m_ui->txtSysInfo->toPlainText()); @@ -75,8 +75,6 @@ QString DSystemInfo::GetOS() const #elif defined(Q_OS_MAC) ret += SL("Mac OS X "); switch (QSysInfo::MacintoshVersion) { - case QSysInfo::MV_10_7: ret += SL("10.7"); break; - case QSysInfo::MV_10_8: ret += SL("10.8"); break; case QSysInfo::MV_10_9: ret += SL("10.9"); break; default: ret += SL("(unknown)"); break; } diff --git a/Source/Core/DolphinQt/SystemInfo.h b/Source/Core/DolphinQt/SystemInfo.h index cdc1a93ce9..028d258eb5 100644 --- a/Source/Core/DolphinQt/SystemInfo.h +++ b/Source/Core/DolphinQt/SystemInfo.h @@ -21,7 +21,7 @@ public: ~DSystemInfo(); private slots: - void btnCopy_pressed(); + void CopyPressed(); private: std::unique_ptr m_ui; diff --git a/Source/Core/DolphinQt/Utils/Resources.cpp b/Source/Core/DolphinQt/Utils/Resources.cpp index d730a788b6..04875f9f1e 100644 --- a/Source/Core/DolphinQt/Utils/Resources.cpp +++ b/Source/Core/DolphinQt/Utils/Resources.cpp @@ -16,48 +16,48 @@ QVector Resources::m_regions; QVector Resources::m_ratings; QVector Resources::m_pixmaps; +// Wrapper for GetImageFilename() so you don't have to to call it directly +#define GIFN(file) GetImageFilename(SL(file), dir) + void Resources::Init() { QString dir = QString::fromStdString(File::GetSysDirectory() + "Resources/"); m_regions.resize(DiscIO::IVolume::NUMBER_OF_COUNTRIES); - m_regions[DiscIO::IVolume::COUNTRY_JAPAN].load(dir + SL("Flag_Japan.png")); - m_regions[DiscIO::IVolume::COUNTRY_EUROPE].load(dir + SL("Flag_Europe.png")); - m_regions[DiscIO::IVolume::COUNTRY_USA].load(dir + SL("Flag_USA.png")); + m_regions[DiscIO::IVolume::COUNTRY_JAPAN].load(GIFN("Flag_Japan")); + m_regions[DiscIO::IVolume::COUNTRY_EUROPE].load(GIFN("Flag_Europe")); + m_regions[DiscIO::IVolume::COUNTRY_USA].load(GIFN("Flag_USA")); - m_regions[DiscIO::IVolume::COUNTRY_AUSTRALIA].load(dir + SL("Flag_Australia.png")); - m_regions[DiscIO::IVolume::COUNTRY_FRANCE].load(dir + SL("Flag_France.png")); - m_regions[DiscIO::IVolume::COUNTRY_GERMANY].load(dir + SL("Flag_Germany.png")); - m_regions[DiscIO::IVolume::COUNTRY_INTERNATIONAL].load(dir + SL("Flag_Europe.png")); // Uses European flag as a placeholder - m_regions[DiscIO::IVolume::COUNTRY_ITALY].load(dir + SL("Flag_Italy.png")); - m_regions[DiscIO::IVolume::COUNTRY_KOREA].load(dir + SL("Flag_Korea.png")); - m_regions[DiscIO::IVolume::COUNTRY_NETHERLANDS].load(dir + SL("Flag_Netherlands.png")); - m_regions[DiscIO::IVolume::COUNTRY_RUSSIA].load(dir + SL("Flag_Russia.png")); - m_regions[DiscIO::IVolume::COUNTRY_SPAIN].load(dir + SL("Flag_Spain.png")); - m_regions[DiscIO::IVolume::COUNTRY_TAIWAN].load(dir + SL("Flag_Taiwan.png")); - m_regions[DiscIO::IVolume::COUNTRY_UNKNOWN].load(dir + SL("Flag_Unknown.png")); + m_regions[DiscIO::IVolume::COUNTRY_AUSTRALIA].load(GIFN("Flag_Australia")); + m_regions[DiscIO::IVolume::COUNTRY_FRANCE].load(GIFN("Flag_France")); + m_regions[DiscIO::IVolume::COUNTRY_GERMANY].load(GIFN("Flag_Germany")); + m_regions[DiscIO::IVolume::COUNTRY_INTERNATIONAL].load(GIFN("Flag_Europe")); // Uses European flag as a placeholder + m_regions[DiscIO::IVolume::COUNTRY_ITALY].load(GIFN("Flag_Italy")); + m_regions[DiscIO::IVolume::COUNTRY_KOREA].load(GIFN("Flag_Korea")); + m_regions[DiscIO::IVolume::COUNTRY_NETHERLANDS].load(GIFN("Flag_Netherlands")); + m_regions[DiscIO::IVolume::COUNTRY_RUSSIA].load(GIFN("Flag_Russia")); + m_regions[DiscIO::IVolume::COUNTRY_SPAIN].load(GIFN("Flag_Spain")); + m_regions[DiscIO::IVolume::COUNTRY_TAIWAN].load(GIFN("Flag_Taiwan")); + m_regions[DiscIO::IVolume::COUNTRY_UNKNOWN].load(GIFN("Flag_Unknown")); m_platforms.resize(3); - m_platforms[0].load(dir + SL("Platform_Gamecube.png")); - m_platforms[1].load(dir + SL("Platform_Wii.png")); - m_platforms[2].load(dir + SL("Platform_Wad.png")); + m_platforms[0].load(GIFN("Platform_Gamecube")); + m_platforms[1].load(GIFN("Platform_Wii")); + m_platforms[2].load(GIFN("Platform_Wad")); m_ratings.resize(6); - m_ratings[0].load(dir + SL("rating0.png")); - m_ratings[1].load(dir + SL("rating1.png")); - m_ratings[2].load(dir + SL("rating2.png")); - m_ratings[3].load(dir + SL("rating3.png")); - m_ratings[4].load(dir + SL("rating4.png")); - m_ratings[5].load(dir + SL("rating5.png")); + m_ratings[0].load(GIFN("rating0")); + m_ratings[1].load(GIFN("rating1")); + m_ratings[2].load(GIFN("rating2")); + m_ratings[3].load(GIFN("rating3")); + m_ratings[4].load(GIFN("rating4")); + m_ratings[5].load(GIFN("rating5")); m_pixmaps.resize(NUM_ICONS); - m_pixmaps[DOLPHIN_LOGO].load(dir + SL("Dolphin.png")); + m_pixmaps[DOLPHIN_LOGO].load(GIFN("Dolphin")); UpdatePixmaps(); } -// Wrapper for GetImageFilename() so you don't have to to call it directly -#define GIFN(file) GetImageFilename(SL(file), dir) - void Resources::UpdatePixmaps() { QString dir = QString::fromStdString(File::GetThemeDir(SConfig::GetInstance().m_LocalCoreStartupParameter.theme_name)); @@ -84,7 +84,8 @@ QString Resources::GetImageFilename(QString name, QString dir) { if (qApp->devicePixelRatio() >= 2) { - QString fileName = name.prepend(dir).append(SL("@2x.png")); + QString fileName = name; + fileName.prepend(dir).append(SL("@2x.png")); if (QFile::exists(fileName)) return fileName; }