DolphinQt: Make input mapping and output testing non-blocking.

This commit is contained in:
Jordan Woyak
2024-11-02 02:52:18 -05:00
parent bc95c001c8
commit f12846a0e9
12 changed files with 339 additions and 183 deletions

View File

@ -12,11 +12,10 @@
#include <QString>
#include <QSyntaxHighlighter>
#include "Common/Flag.h"
#include "InputCommon/ControllerInterface/CoreDevice.h"
class ControlReference;
class MappingWidget;
class MappingWindow;
class QAbstractButton;
class QDialogButtonBox;
class QLineEdit;
@ -66,9 +65,13 @@ public:
Output
};
explicit IOWindow(MappingWidget* parent, ControllerEmu::EmulatedController* m_controller,
explicit IOWindow(MappingWindow* window, ControllerEmu::EmulatedController* m_controller,
ControlReference* ref, Type type);
signals:
void DetectInputComplete();
void TestOutputComplete();
private:
std::shared_ptr<ciface::Core::Device> GetSelectedDevice() const;
@ -79,8 +82,6 @@ private:
void OnDialogButtonPressed(QAbstractButton* button);
void OnDeviceChanged();
void OnDetectButtonPressed();
void OnTestButtonPressed();
void OnRangeChanged(int range);
void AppendSelectedOption();
@ -115,10 +116,12 @@ private:
// Input actions
QPushButton* m_detect_button;
std::unique_ptr<ciface::Core::InputDetector> m_input_detector;
QComboBox* m_functions_combo;
// Output actions
QPushButton* m_test_button;
QTimer* m_output_test_timer;
// Textarea
QPlainTextEdit* m_expression_text;