HostInterface: Move running title info to System

This commit is contained in:
Connor McLaughlin
2020-01-24 14:51:05 +10:00
parent b3db3a1cc0
commit 77b282862f
6 changed files with 65 additions and 40 deletions

View File

@ -247,11 +247,20 @@ void QtHostInterface::OnPerformanceCountersUpdated()
emit performanceCountersUpdated(m_speed, m_fps, m_vps, m_average_frame_time, m_worst_frame_time);
}
void QtHostInterface::OnRunningGameChanged(const char* path, const char* game_code, const char* game_title)
void QtHostInterface::OnRunningGameChanged()
{
HostInterface::OnRunningGameChanged(path, game_code, game_title);
HostInterface::OnRunningGameChanged();
emit runningGameChanged(QString::fromUtf8(path), QString::fromUtf8(game_code), QString::fromUtf8(game_title));
if (m_system)
{
emit runningGameChanged(QString::fromStdString(m_system->GetRunningPath()),
QString::fromStdString(m_system->GetRunningCode()),
QString::fromStdString(m_system->GetRunningTitle()));
}
else
{
emit runningGameChanged(QString(), QString(), QString());
}
}
void QtHostInterface::updateInputMap()

View File

@ -88,7 +88,7 @@ private Q_SLOTS:
protected:
void OnPerformanceCountersUpdated() override;
void OnRunningGameChanged(const char* path, const char* game_code, const char* game_title) override;
void OnRunningGameChanged() override;
private:
using InputButtonHandler = std::function<void(bool)>;