mirror of
https://github.com/yuzu-emu/yuzu-mainline.git
synced 2024-12-12 21:44:18 +01:00
input_common/tas: new update method
This commit is contained in:
parent
33a1d790e8
commit
5401cf6eb5
@ -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();
|
||||
|
@ -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;
|
||||
}
|
||||
|
@ -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();
|
||||
}
|
||||
|
@ -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;
|
||||
|
@ -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"
|
||||
|
Loading…
Reference in New Issue
Block a user