summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorgerman77 <juangerman-13@hotmail.com>2021-07-10 06:30:58 +0200
committerMonsterDruide1 <5958456@gmail.com>2021-09-18 23:22:57 +0200
commit5401cf6eb583092ed144d0f30fb6221a0ab25fed (patch)
treef4f44714d993387dffc4afbc8346b0cfb9b46b7e
parentinput_common/tas: Document the main class (diff)
downloadyuzu-5401cf6eb583092ed144d0f30fb6221a0ab25fed.tar
yuzu-5401cf6eb583092ed144d0f30fb6221a0ab25fed.tar.gz
yuzu-5401cf6eb583092ed144d0f30fb6221a0ab25fed.tar.bz2
yuzu-5401cf6eb583092ed144d0f30fb6221a0ab25fed.tar.lz
yuzu-5401cf6eb583092ed144d0f30fb6221a0ab25fed.tar.xz
yuzu-5401cf6eb583092ed144d0f30fb6221a0ab25fed.tar.zst
yuzu-5401cf6eb583092ed144d0f30fb6221a0ab25fed.zip
-rw-r--r--src/yuzu/bootmanager.cpp2
-rw-r--r--src/yuzu/configuration/configure_input_player_widget.cpp4
-rw-r--r--src/yuzu/debugger/controller.cpp10
-rw-r--r--src/yuzu/debugger/controller.h2
-rw-r--r--src/yuzu/main.cpp3
5 files changed, 4 insertions, 17 deletions
diff --git a/src/yuzu/bootmanager.cpp b/src/yuzu/bootmanager.cpp
index 2e0ade815..1519a46ed 100644
--- a/src/yuzu/bootmanager.cpp
+++ b/src/yuzu/bootmanager.cpp
@@ -36,6 +36,7 @@
#include "input_common/keyboard.h"
#include "input_common/main.h"
#include "input_common/mouse/mouse_input.h"
+#include "input_common/tas/tas_input.h"
#include "video_core/renderer_base.h"
#include "video_core/video_core.h"
#include "yuzu/bootmanager.h"
@@ -312,6 +313,7 @@ GRenderWindow::~GRenderWindow() {
}
void GRenderWindow::OnFrameDisplayed() {
+ input_subsystem->GetTas()->UpdateThread();
if (!first_frame) {
first_frame = true;
emit FirstFrameDisplayed();
diff --git a/src/yuzu/configuration/configure_input_player_widget.cpp b/src/yuzu/configuration/configure_input_player_widget.cpp
index 38c59263c..da328d904 100644
--- a/src/yuzu/configuration/configure_input_player_widget.cpp
+++ b/src/yuzu/configuration/configure_input_player_widget.cpp
@@ -237,10 +237,6 @@ void PlayerControlPreview::UpdateInput() {
}
}
- if (controller_callback.update != nullptr) {
- controller_callback.update(true);
- }
-
if (mapping_active) {
blink_counter = (blink_counter + 1) % 50;
}
diff --git a/src/yuzu/debugger/controller.cpp b/src/yuzu/debugger/controller.cpp
index a745699bf..296000ed5 100644
--- a/src/yuzu/debugger/controller.cpp
+++ b/src/yuzu/debugger/controller.cpp
@@ -41,8 +41,7 @@ void ControllerDialog::refreshConfiguration() {
constexpr std::size_t player = 0;
widget->SetPlayerInputRaw(player, players[player].buttons, players[player].analogs);
widget->SetControllerType(players[player].controller_type);
- ControllerCallback callback{[this](ControllerInput input) { InputController(input); },
- [this](bool update) { UpdateController(update); }};
+ ControllerCallback callback{[this](ControllerInput input) { InputController(input); }};
widget->SetCallBack(callback);
widget->repaint();
widget->SetConnectedStatus(players[player].connected);
@@ -84,10 +83,3 @@ void ControllerDialog::InputController(ControllerInput input) {
}
input_subsystem->GetTas()->RecordInput(buttons, input.axis_values);
}
-
-void ControllerDialog::UpdateController(bool update) {
- if (!update) {
- return;
- }
- input_subsystem->GetTas()->UpdateThread();
-}
diff --git a/src/yuzu/debugger/controller.h b/src/yuzu/debugger/controller.h
index 448d24b67..7742db58b 100644
--- a/src/yuzu/debugger/controller.h
+++ b/src/yuzu/debugger/controller.h
@@ -25,7 +25,6 @@ struct ControllerInput {
struct ControllerCallback {
std::function<void(ControllerInput)> input;
- std::function<void(bool)> update;
};
class ControllerDialog : public QWidget {
@@ -45,7 +44,6 @@ protected:
private:
void InputController(ControllerInput input);
- void UpdateController(bool update);
QAction* toggle_view_action = nullptr;
QFileSystemWatcher* watcher = nullptr;
PlayerControlPreview* widget;
diff --git a/src/yuzu/main.cpp b/src/yuzu/main.cpp
index 7d12fcca7..ea77caad5 100644
--- a/src/yuzu/main.cpp
+++ b/src/yuzu/main.cpp
@@ -31,8 +31,6 @@
#include "core/hle/service/am/applet_oe.h"
#include "core/hle/service/am/applets/applets.h"
-#include "input_common/tas/tas_input.h"
-
// These are wrappers to avoid the calls to CreateDirectory and CreateFile because of the Windows
// defines.
static FileSys::VirtualDir VfsFilesystemCreateDirectoryWrapper(
@@ -105,6 +103,7 @@ static FileSys::VirtualFile VfsDirectoryCreateFileWrapper(const FileSys::Virtual
#include "core/perf_stats.h"
#include "core/telemetry_session.h"
#include "input_common/main.h"
+#include "input_common/tas/tas_input.h"
#include "util/overlay_dialog.h"
#include "video_core/gpu.h"
#include "video_core/renderer_base.h"