mirror of
https://github.com/libretro/scummvm.git
synced 2025-03-04 09:18:38 +00:00
cleanup
svn-id: r25452
This commit is contained in:
parent
81ec51b8f7
commit
16a2940808
@ -163,9 +163,7 @@ static GameDescriptor toGameDescriptor(const ADGameDescription &g, const PlainGa
|
|||||||
* Makes gameid in form of
|
* Makes gameid in form of
|
||||||
* gameid-plaform-lang
|
* gameid-plaform-lang
|
||||||
*/
|
*/
|
||||||
static String generateComplexID(const String id, int listPos, const Common::ADParams ¶ms) {
|
static String generateComplexID(const String &id, const ADGameDescription *desc) {
|
||||||
const ADGameDescription *desc = (const ADGameDescription *)(params.descs + listPos * params.descItemSize);
|
|
||||||
|
|
||||||
String res(id);
|
String res(id);
|
||||||
|
|
||||||
if (desc->platform != kPlatformPC && desc->platform != kPlatformUnknown) {
|
if (desc->platform != kPlatformPC && desc->platform != kPlatformUnknown) {
|
||||||
@ -187,7 +185,8 @@ GameList detectAllGames(
|
|||||||
|
|
||||||
GameList detectedGames;
|
GameList detectedGames;
|
||||||
for (uint i = 0; i < matches.size(); i++) {
|
for (uint i = 0; i < matches.size(); i++) {
|
||||||
GameDescriptor desc(toGameDescriptor(*(const ADGameDescription *)(params.descs + matches[i] * params.descItemSize), params.list));
|
const ADGameDescription *adgDesc = (const ADGameDescription *)(params.descs + matches[i] * params.descItemSize);
|
||||||
|
GameDescriptor desc(toGameDescriptor(*adgDesc, params.list));
|
||||||
|
|
||||||
if (params.singleid != NULL) {
|
if (params.singleid != NULL) {
|
||||||
desc["preferredtarget"] = desc["gameid"];
|
desc["preferredtarget"] = desc["gameid"];
|
||||||
@ -198,7 +197,7 @@ GameList detectAllGames(
|
|||||||
if (!desc.contains("preferredtarget"))
|
if (!desc.contains("preferredtarget"))
|
||||||
desc["preferredtarget"] = desc["gameid"];
|
desc["preferredtarget"] = desc["gameid"];
|
||||||
|
|
||||||
desc["preferredtarget"] = generateComplexID(desc["preferredtarget"], matches[i], params);
|
desc["preferredtarget"] = generateComplexID(desc["preferredtarget"], adgDesc);
|
||||||
}
|
}
|
||||||
|
|
||||||
detectedGames.push_back(desc);
|
detectedGames.push_back(desc);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user