Merge pull request #3880 from wwylele/title-fix

citra_qt: only update title from game after ensuring loaded successfully
This commit is contained in:
Weiyi Wang 2018-06-26 13:31:36 +03:00 committed by GitHub
commit 0a34054a16
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -606,10 +606,6 @@ bool GMainWindow::LoadROM(const QString& filename) {
Core::System& system{Core::System::GetInstance()};
const Core::System::ResultStatus result{system.Load(render_window, filename.toStdString())};
std::string title;
system.GetAppLoader().ReadTitle(title);
game_title = QString::fromStdString(title);
SetupUIStrings();
if (result != Core::System::ResultStatus::Success) {
switch (result) {
@ -666,6 +662,11 @@ bool GMainWindow::LoadROM(const QString& filename) {
return false;
}
std::string title;
system.GetAppLoader().ReadTitle(title);
game_title = QString::fromStdString(title);
SetupUIStrings();
Core::Telemetry().AddField(Telemetry::FieldType::App, "Frontend", "Qt");
return true;
}