mirror of
https://github.com/Lime3DS/Lime3DS
synced 2024-12-25 16:42:39 -06:00
Update qt window title to use the long game title rather than short game title.
This commit is contained in:
parent
5873e292e7
commit
1e22b780ae
2 changed files with 8 additions and 4 deletions
|
@ -1238,8 +1238,11 @@ bool GMainWindow::LoadROM(const QString& filename) {
|
|||
}
|
||||
|
||||
std::string title;
|
||||
std::string title_long;
|
||||
system.GetAppLoader().ReadTitle(title);
|
||||
system.GetAppLoader().ReadTitleLong(title_long);
|
||||
game_title = QString::fromStdString(title);
|
||||
game_title_long = QString::fromStdString(title_long);
|
||||
UpdateWindowTitle();
|
||||
|
||||
game_path = filename;
|
||||
|
@ -3054,14 +3057,14 @@ void GMainWindow::OnMoviePlaybackCompleted() {
|
|||
void GMainWindow::UpdateWindowTitle() {
|
||||
const QString full_name = QString::fromUtf8(Common::g_build_fullname);
|
||||
|
||||
if (game_title.isEmpty()) {
|
||||
if (game_title_long.isEmpty()) {
|
||||
setWindowTitle(QStringLiteral("Lime %1").arg(full_name));
|
||||
} else {
|
||||
setWindowTitle(QStringLiteral("Lime %1 | %2").arg(full_name, game_title));
|
||||
setWindowTitle(QStringLiteral("Lime %1 | %2").arg(full_name, game_title_long));
|
||||
render_window->setWindowTitle(
|
||||
QStringLiteral("Lime %1 | %2 | %3").arg(full_name, game_title, tr("Primary Window")));
|
||||
QStringLiteral("Lime %1 | %2 | %3").arg(full_name, game_title_long, tr("Primary Window")));
|
||||
secondary_window->setWindowTitle(
|
||||
QStringLiteral("Lime %1 | %2 | %3").arg(full_name, game_title, tr("Secondary Window")));
|
||||
QStringLiteral("Lime %1 | %2 | %3").arg(full_name, game_title_long, tr("Secondary Window")));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -321,6 +321,7 @@ private:
|
|||
std::unique_ptr<EmuThread> emu_thread;
|
||||
// The title of the game currently running
|
||||
QString game_title;
|
||||
QString game_title_long;
|
||||
// The path to the game currently running
|
||||
QString game_path;
|
||||
|
||||
|
|
Loading…
Reference in a new issue