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

Qt: Show disc number #6751

Merged
merged 1 commit into from May 5, 2018
Merged

Qt: Show disc number #6751

merged 1 commit into from May 5, 2018

Conversation

spycrab
Copy link
Contributor

@spycrab spycrab commented May 4, 2018

No description provided.

@JosJuice
Copy link
Member

JosJuice commented May 4, 2018

I'd suggest that you only add the extra text if the name doesn't already contain the disc number, like in DolphinWX:

lower_name.find(StringFromFormat("disc %i", disc_number)) == std::string::npos &&
lower_name.find(StringFromFormat("disc%i", disc_number)) == std::string::npos)

@spycrab
Copy link
Contributor Author

spycrab commented May 4, 2018

@JosJuice Is this reliable though?

@JosJuice
Copy link
Member

JosJuice commented May 4, 2018

I don't know if it covers every single game in every single language, but it seems to have worked out well enough in DolphinWX.

@BhaaLseN
Copy link
Member

BhaaLseN commented May 4, 2018

Some braces would be nice too, but otherwise it seems to do just fine:
image

@spycrab spycrab force-pushed the qt_show_disc branch 3 times, most recently from 0635211 to f57d9bd Compare May 4, 2018 19:46
{
if (!name.contains(QRegExp(QStringLiteral("disc ?%1").arg(disc_nr), Qt::CaseInsensitive)))
{
name.append(game.GetDiscNumber() != 0 ? tr(" (Disc %1)").arg(disc_nr) :

This comment was marked as off-topic.

{
QString name = QString::fromStdString(game.GetName());
const int disc_nr = game.GetDiscNumber() + 1;
if (game.GetDiscNumber() != 0)

This comment was marked as off-topic.

@leoetlino leoetlino merged commit 6e6bf68 into dolphin-emu:master May 5, 2018
@spycrab spycrab deleted the qt_show_disc branch May 5, 2018 08:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
4 participants