fix icon loading for blu-ray disc

This commit is contained in:
raven02 2014-12-14 15:04:29 +08:00
parent 7e2fa38519
commit 8b4de95919

View File

@ -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);
}