summaryrefslogtreecommitdiff
path: root/src/yuzu/bootmanager.cpp
diff options
context:
space:
mode:
authorMai M <mathew1800@gmail.com>2021-11-21 23:17:07 -0500
committerGitHub <noreply@github.com>2021-11-21 23:17:07 -0500
commitee76b546d43e1f24d65bcb86083a725da65f5295 (patch)
tree17c3448cf8efbe369e9740064dcca25de12e7544 /src/yuzu/bootmanager.cpp
parentbe238fb26a705c6ba0cc9380ce4c139d5ded2b9b (diff)
parent097de2febcf97da38c55235073eff834c529acac (diff)
Merge pull request #7406 from heinermann/tas_menu
Added TAS controls to the menu under Tools
Diffstat (limited to 'src/yuzu/bootmanager.cpp')
-rw-r--r--src/yuzu/bootmanager.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/yuzu/bootmanager.cpp b/src/yuzu/bootmanager.cpp
index 822ba1a34..fd0a130a3 100644
--- a/src/yuzu/bootmanager.cpp
+++ b/src/yuzu/bootmanager.cpp
@@ -303,6 +303,7 @@ GRenderWindow::GRenderWindow(GMainWindow* parent, EmuThread* emu_thread_,
connect(this, &GRenderWindow::ExecuteProgramSignal, parent, &GMainWindow::OnExecuteProgram,
Qt::QueuedConnection);
connect(this, &GRenderWindow::ExitSignal, parent, &GMainWindow::OnExit, Qt::QueuedConnection);
+ connect(this, &GRenderWindow::TasPlaybackStateChanged, parent, &GMainWindow::OnTasStateChanged);
}
void GRenderWindow::ExecuteProgram(std::size_t program_index) {
@@ -319,10 +320,18 @@ GRenderWindow::~GRenderWindow() {
void GRenderWindow::OnFrameDisplayed() {
input_subsystem->GetTas()->UpdateThread();
+ const TasInput::TasState new_tas_state = std::get<0>(input_subsystem->GetTas()->GetStatus());
+
if (!first_frame) {
+ last_tas_state = new_tas_state;
first_frame = true;
emit FirstFrameDisplayed();
}
+
+ if (new_tas_state != last_tas_state) {
+ last_tas_state = new_tas_state;
+ emit TasPlaybackStateChanged();
+ }
}
bool GRenderWindow::IsShown() const {