mirror of
https://github.com/RPCS3/rpcs3.git
synced 2024-11-23 03:02:53 +01:00
Merge pull request #895 from raven02/patch-12
Better fit the gameviewer and icon path fix for blu-ray disc
This commit is contained in:
commit
7a4d851201
@ -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();
|
||||
@ -148,8 +148,11 @@ 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.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 +163,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 = local_path + "/" + m_games[i] + "/ICON0.PNG";
|
||||
}
|
||||
else if (game.category.substr(0, 2) == "DG")
|
||||
{
|
||||
game.category = "Disc Game";
|
||||
game.icon_path = local_path + "/" + m_games[i] + "/PS3_GAME/ICON0.PNG";
|
||||
}
|
||||
|
||||
m_game_data.push_back(game);
|
||||
}
|
||||
|
@ -84,15 +84,15 @@ public:
|
||||
|
||||
void Init()
|
||||
{
|
||||
m_img_list = new wxImageList(80, 44);
|
||||
m_img_list = new wxImageList(58, 32);
|
||||
|
||||
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(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(80, 44);
|
||||
game_icon.Rescale(58, 32);
|
||||
}
|
||||
|
||||
m_icon_indexes.push_back(m_img_list->Add(game_icon));
|
||||
|
@ -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)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user