Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GameListCtrl: Improvements for reading custom game titles #2242

Merged
merged 3 commits into from Sep 13, 2015

Conversation

Stevoisiak
Copy link
Contributor

This PR brings 2 improvements.

  • Read from gametdb.txt if titles.txt doesn't exist
  • Fix reading custom titles for WAD files

// TODO: Create function in volume class to fetch Game ID without the publisher code
else if (rISOFile.GetPlatform() == GameListItem::WII_WAD
&& line.substr(0, rISOFile.GetUniqueID().size() - 2) == (rISOFile.GetUniqueID()).substr(0, rISOFile.GetUniqueID().size() - 2) )
{

This comment was marked as off-topic.

@Stevoisiak
Copy link
Contributor Author

Found an annoying issue I'm not sure how to fix.

There are certain Wii Game Channels that share the same ID as their retail counterparts. For example, Both Mario Kart Wii and the Mario Kart Channel have the ID RMCE01. GameTDB gets around this issue by using 4 digits for WADS.

Unfortunately, doing a 4 digit ID comparison means that the game channel IDs are matching with the retail Game IDs, causing the Mario Kart Channel to be labeled as Mario Kart Wii.

Edit: Disregard that. All fixed. This should be ready to go, assuming nobody finds any issues with it.

@Stevoisiak Stevoisiak changed the title GameListCtrl: Improvements for reading custom game titles [WIP] GameListCtrl: Improvements for reading custom game titles Mar 22, 2015
@Stevoisiak Stevoisiak changed the title [WIP] GameListCtrl: Improvements for reading custom game titles GameListCtrl: Improvements for reading custom game titles Mar 22, 2015
if (rISOFile.GetPlatform() == GameListItem::WII_WAD)
game_id.erase(game_id.size() - 2);


This comment was marked as off-topic.

@JosJuice
Copy link
Member

I don't like that this code enforces particular whitespace around the = characters, but that's been there for a while, so I don't think it should be a concern for this PR. LGTM.

if (rISOFile.GetPlatform() == GameListItem::WII_WAD)
game_id.erase(game_id.size() - 2);

if (line.substr(0, line.find("=") - 1) == game_id)

This comment was marked as off-topic.

@lioncash
Copy link
Member

Can you append to the commit message of your second commit the reasons why it's an improvement?

@Stevoisiak
Copy link
Contributor Author

Should be ready to go now.

@RachelBryk
Copy link
Member

Wad files should probably check for 6 character id first, then for 4 if it's not found. GameTDB not including the publisher id is silly, and we should not enforce that (but supporting it too is okay).

@JosJuice
Copy link
Member

That would reintroduce the Mario Kart Channel issue that Stevosiak mentioned before. I agree that not supporting 6-character IDs for WADs is a bit odd, though.

@Stevoisiak
Copy link
Contributor Author

Actually, Dolphin is the odd one out in using 6 digit IDs for WADs. 4 digit IDs are used by GameTDB, Wiibrew.org, USB Loader GX, and many other places.

This is because, for WADs, the publisher ID is stored seperately from the game ID, where as for disc based games, they are stored together in the same location.

@Stevoisiak
Copy link
Contributor Author

Can this be reviewed? I believe it is ready to be merged.

@lioncash
Copy link
Member

lioncash commented Apr 9, 2015

You still haven't addressed what I posted.

@Stevoisiak
Copy link
Contributor Author

I did amend the commit with a description

@lioncash
Copy link
Member

lioncash commented Apr 9, 2015

#2242 (comment)

@Stevoisiak
Copy link
Contributor Author

My bad. Should be fixed now.

@Stevoisiak
Copy link
Contributor Author

Any other issues preventing this from being merged?

@Stevoisiak Stevoisiak force-pushed the Titles.txt branch 2 times, most recently from 30f3f30 to ce2b578 Compare June 29, 2015 18:00
@Stevoisiak
Copy link
Contributor Author

Updated to fix merge conflicts.

{
name = StrToWxStr(line.substr(rISOFile.GetUniqueID().size() + 3));
name = StrToWxStr(line.substr(equals_index + 2));

This comment was marked as off-topic.

This comment was marked as off-topic.

This comment was marked as off-topic.

This comment was marked as off-topic.

@waddlesplash
Copy link
Contributor

LGTM

phire added a commit that referenced this pull request Sep 13, 2015
GameListCtrl: Improvements for reading custom game titles
@phire phire merged commit 45c1cfa into dolphin-emu:master Sep 13, 2015
@Stevoisiak Stevoisiak deleted the Titles.txt branch April 10, 2018 14:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
8 participants