DolphinQt: Rework TAS input threading, part 2 (analog inputs)

This commit is contained in:
JosJuice
2023-03-07 19:22:09 +01:00
parent 11e4d46927
commit 0300b44d23
8 changed files with 101 additions and 56 deletions

View File

@ -0,0 +1,29 @@
// Copyright 2023 Dolphin Emulator Project
// SPDX-License-Identifier: GPL-2.0-or-later
#pragma once
#include <QSpinBox>
#include "DolphinQt/TAS/TASControlState.h"
class TASInputWindow;
class TASSpinBox : public QSpinBox
{
Q_OBJECT
public:
explicit TASSpinBox(QWidget* parent = nullptr);
// Can be called from the CPU thread
int GetValue() const;
// Must be called from the CPU thread
void OnControllerValueChanged(int new_value);
private slots:
void OnUIValueChanged(int new_value);
void ApplyControllerValueChange();
private:
TASControlState m_state;
};