From 012af7384495348c19bfaf143c431f1efad3a8c3 Mon Sep 17 00:00:00 2001 From: raven02 Date: Sun, 14 Dec 2014 14:47:06 +0800 Subject: [PATCH 1/6] Better fit the gameviewer --- rpcs3/Gui/GameViewer.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/rpcs3/Gui/GameViewer.h b/rpcs3/Gui/GameViewer.h index e34271d45b..a4e74de127 100644 --- a/rpcs3/Gui/GameViewer.h +++ b/rpcs3/Gui/GameViewer.h @@ -84,15 +84,15 @@ public: void Init() { - m_img_list = new wxImageList(80, 44); + m_img_list = new wxImageList(56, 31); m_columns.clear(); - m_columns.emplace_back(m_columns.size(), 100, "Icon"); + m_columns.emplace_back(m_columns.size(), 75, "Icon"); m_columns.emplace_back(m_columns.size(), 160, "Name"); m_columns.emplace_back(m_columns.size(), 85, "Serial"); m_columns.emplace_back(m_columns.size(), 55, "FW"); m_columns.emplace_back(m_columns.size(), 55, "App version"); - m_columns.emplace_back(m_columns.size(), 55, "Category"); + m_columns.emplace_back(m_columns.size(), 75, "Category"); m_columns.emplace_back(m_columns.size(), 160, "Path"); m_col_icon = &m_columns[0]; m_col_name = &m_columns[1]; @@ -130,11 +130,11 @@ public: // load icons for (const auto& path : m_col_icon->data) { - wxImage game_icon(80, 44); + wxImage game_icon(56, 31); { wxLogNull logNo; // temporary disable wx warnings ("iCCP: known incorrect sRGB profile" spamming) if (game_icon.LoadFile(fmt::FromUTF8(path), wxBITMAP_TYPE_PNG)) - game_icon.Rescale(80, 44); + game_icon.Rescale(56, 31); } m_icon_indexes.push_back(m_img_list->Add(game_icon)); From 47fc7f22b0a04b897669ba0a8ef7174544d61a5d Mon Sep 17 00:00:00 2001 From: raven02 Date: Sun, 14 Dec 2014 14:48:24 +0800 Subject: [PATCH 2/6] mainframe resize --- rpcs3/Gui/MainFrame.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rpcs3/Gui/MainFrame.cpp b/rpcs3/Gui/MainFrame.cpp index b42fd4be6f..6c096cda47 100644 --- a/rpcs3/Gui/MainFrame.cpp +++ b/rpcs3/Gui/MainFrame.cpp @@ -63,7 +63,7 @@ wxString GetPaneName() } MainFrame::MainFrame() - : FrameBase(nullptr, wxID_ANY, "", "MainFrame", wxSize(800, 600)) + : FrameBase(nullptr, wxID_ANY, "", "MainFrame", wxSize(900, 600)) , m_aui_mgr(this) , m_sys_menu_opened(false) { From 7e2fa38519b0df4bef8fc9d132f1052f05e2772e Mon Sep 17 00:00:00 2001 From: raven02 Date: Sun, 14 Dec 2014 14:54:26 +0800 Subject: [PATCH 3/6] sort name column by default --- rpcs3/Gui/GameViewer.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rpcs3/Gui/GameViewer.cpp b/rpcs3/Gui/GameViewer.cpp index e937e58bed..7b1bbdb8c5 100644 --- a/rpcs3/Gui/GameViewer.cpp +++ b/rpcs3/Gui/GameViewer.cpp @@ -67,7 +67,7 @@ GameViewer::GameViewer(wxWindow* parent) : wxListView(parent) LoadSettings(); m_columns.Show(this); - m_sortColumn = 0; + m_sortColumn = 1; m_sortAscending = true; m_path = "/dev_hdd0/game/"; m_popup = new wxMenu(); From 8b4de95919f867187c5d34698f25438beed1170e Mon Sep 17 00:00:00 2001 From: raven02 Date: Sun, 14 Dec 2014 15:04:29 +0800 Subject: [PATCH 4/6] fix icon loading for blu-ray disc --- rpcs3/Gui/GameViewer.cpp | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/rpcs3/Gui/GameViewer.cpp b/rpcs3/Gui/GameViewer.cpp index 7b1bbdb8c5..cfcf2a5faf 100644 --- a/rpcs3/Gui/GameViewer.cpp +++ b/rpcs3/Gui/GameViewer.cpp @@ -149,7 +149,6 @@ void GameViewer::LoadPSF() continue; GameInfo game; - game.icon_path = wxGetCwd() + m_path + m_games[i] + "/ICON0.PNG"; game.root = m_games[i]; game.serial = psf.GetString("TITLE_ID"); game.name = psf.GetString("TITLE"); @@ -160,13 +159,21 @@ void GameViewer::LoadPSF() game.resolution = psf.GetInteger("RESOLUTION"); game.sound_format = psf.GetInteger("SOUND_FORMAT"); - if(game.serial.length() == 9) + if (game.serial.length() == 9) + { game.serial = game.serial.substr(0, 4) + "-" + game.serial.substr(4, 5); + } if (game.category.substr(0, 2) == "HG") + { game.category = "HDD Game"; + game.icon_path = wxGetCwd() + m_path + m_games[i] + "/ICON0.PNG"; + } else if (game.category.substr(0, 2) == "DG") + { + game.icon_path = wxGetCwd() + m_path + m_games[i] + "/PS3_GAME/ICON0.PNG"; game.category = "Disc Game"; + } m_game_data.push_back(game); } From 6c571b30d20521f1af73adbcc8696e463bb7ac3c Mon Sep 17 00:00:00 2001 From: raven02 Date: Sun, 14 Dec 2014 16:21:38 +0800 Subject: [PATCH 5/6] icon sizing fix --- rpcs3/Gui/GameViewer.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/rpcs3/Gui/GameViewer.h b/rpcs3/Gui/GameViewer.h index a4e74de127..41399dbe9b 100644 --- a/rpcs3/Gui/GameViewer.h +++ b/rpcs3/Gui/GameViewer.h @@ -84,7 +84,7 @@ public: void Init() { - m_img_list = new wxImageList(56, 31); + m_img_list = new wxImageList(58, 32); m_columns.clear(); m_columns.emplace_back(m_columns.size(), 75, "Icon"); @@ -130,11 +130,11 @@ public: // load icons for (const auto& path : m_col_icon->data) { - wxImage game_icon(56, 31); + wxImage game_icon(58, 32); { wxLogNull logNo; // temporary disable wx warnings ("iCCP: known incorrect sRGB profile" spamming) if (game_icon.LoadFile(fmt::FromUTF8(path), wxBITMAP_TYPE_PNG)) - game_icon.Rescale(56, 31); + game_icon.Rescale(58, 32); } m_icon_indexes.push_back(m_img_list->Add(game_icon)); From cb52ca220ea67f351bdf14cb63aa520a04777676 Mon Sep 17 00:00:00 2001 From: raven02 Date: Sun, 14 Dec 2014 17:36:32 +0800 Subject: [PATCH 6/6] vfs path fix --- rpcs3/Gui/GameViewer.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/rpcs3/Gui/GameViewer.cpp b/rpcs3/Gui/GameViewer.cpp index cfcf2a5faf..28b3a039b3 100644 --- a/rpcs3/Gui/GameViewer.cpp +++ b/rpcs3/Gui/GameViewer.cpp @@ -148,6 +148,10 @@ void GameViewer::LoadPSF() if(!psf.Load(false)) continue; + // get local path from VFS... + std::string local_path; + Emu.GetVFS().GetDevice(m_path, local_path); + GameInfo game; game.root = m_games[i]; game.serial = psf.GetString("TITLE_ID"); @@ -167,12 +171,12 @@ void GameViewer::LoadPSF() if (game.category.substr(0, 2) == "HG") { game.category = "HDD Game"; - game.icon_path = wxGetCwd() + m_path + m_games[i] + "/ICON0.PNG"; + game.icon_path = local_path + "/" + m_games[i] + "/ICON0.PNG"; } else if (game.category.substr(0, 2) == "DG") { - game.icon_path = wxGetCwd() + m_path + m_games[i] + "/PS3_GAME/ICON0.PNG"; game.category = "Disc Game"; + game.icon_path = local_path + "/" + m_games[i] + "/PS3_GAME/ICON0.PNG"; } m_game_data.push_back(game);