mirror of
https://github.com/Lime3DS/Lime3DS.git
synced 2024-11-01 16:05:07 +01: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
@ -1238,8 +1238,11 @@ bool GMainWindow::LoadROM(const QString& filename) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
std::string title;
|
std::string title;
|
||||||
|
std::string title_long;
|
||||||
system.GetAppLoader().ReadTitle(title);
|
system.GetAppLoader().ReadTitle(title);
|
||||||
|
system.GetAppLoader().ReadTitleLong(title_long);
|
||||||
game_title = QString::fromStdString(title);
|
game_title = QString::fromStdString(title);
|
||||||
|
game_title_long = QString::fromStdString(title_long);
|
||||||
UpdateWindowTitle();
|
UpdateWindowTitle();
|
||||||
|
|
||||||
game_path = filename;
|
game_path = filename;
|
||||||
@ -3054,14 +3057,14 @@ void GMainWindow::OnMoviePlaybackCompleted() {
|
|||||||
void GMainWindow::UpdateWindowTitle() {
|
void GMainWindow::UpdateWindowTitle() {
|
||||||
const QString full_name = QString::fromUtf8(Common::g_build_fullname);
|
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));
|
setWindowTitle(QStringLiteral("Lime %1").arg(full_name));
|
||||||
} else {
|
} 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(
|
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(
|
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;
|
std::unique_ptr<EmuThread> emu_thread;
|
||||||
// The title of the game currently running
|
// The title of the game currently running
|
||||||
QString game_title;
|
QString game_title;
|
||||||
|
QString game_title_long;
|
||||||
// The path to the game currently running
|
// The path to the game currently running
|
||||||
QString game_path;
|
QString game_path;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user