aboutsummaryrefslogtreecommitdiff
path: root/src/yuzu/bootmanager.cpp
diff options
context:
space:
mode:
authorAdam Heinermann <aheinerm@gmail.com>2021-11-21 17:28:47 -0800
committerAdam Heinermann <aheinerm@gmail.com>2021-11-21 17:28:47 -0800
commitf90d9808378092e208b431f467c54feb6952e91d (patch)
tree12f5c7bb51e1d3fb4fb755802c23c18b5a1a9367 /src/yuzu/bootmanager.cpp
parentd20f91da11fe7c5d5f1bd4f63cc3b4d221be67a4 (diff)
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 822ba1a349..105f36d33f 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();
+ 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 {