mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-31 01:59:52 -06:00
DolphinQt: Use input override system for TAS input windows
This lets the TAS input code use a higher-level interface for overriding inputs instead of having to fiddle with raw bits. WiiTASInputWindow in particular was messy with how much controller code it had to re-implement.
This commit is contained in:
@ -36,62 +36,47 @@ static const u16 trigger_bitmasks[] = {
|
||||
static const u16 dpad_bitmasks[] = {PAD_BUTTON_UP, PAD_BUTTON_DOWN, PAD_BUTTON_LEFT,
|
||||
PAD_BUTTON_RIGHT};
|
||||
|
||||
static const char* const named_buttons[] = {"A", "B", "X", "Y", "Z", "Start"};
|
||||
|
||||
static const char* const named_triggers[] = {
|
||||
// i18n: The left trigger button (labeled L on real controllers)
|
||||
_trans("L"),
|
||||
// i18n: The right trigger button (labeled R on real controllers)
|
||||
_trans("R"),
|
||||
// i18n: The left trigger button (labeled L on real controllers) used as an analog input
|
||||
_trans("L-Analog"),
|
||||
// i18n: The right trigger button (labeled R on real controllers) used as an analog input
|
||||
_trans("R-Analog")};
|
||||
|
||||
GCPad::GCPad(const unsigned int index) : m_index(index)
|
||||
{
|
||||
// buttons
|
||||
groups.emplace_back(m_buttons = new ControllerEmu::Buttons(_trans("Buttons")));
|
||||
for (const char* named_button : named_buttons)
|
||||
groups.emplace_back(m_buttons = new ControllerEmu::Buttons(BUTTONS_GROUP));
|
||||
for (const char* named_button : {A_BUTTON, B_BUTTON, X_BUTTON, Y_BUTTON, Z_BUTTON})
|
||||
{
|
||||
const bool is_start = named_button == std::string("Start");
|
||||
const ControllerEmu::Translatability translate =
|
||||
is_start ? ControllerEmu::Translate : ControllerEmu::DoNotTranslate;
|
||||
// i18n: The START/PAUSE button on GameCube controllers
|
||||
std::string ui_name = is_start ? _trans("START") : named_button;
|
||||
m_buttons->AddInput(translate, named_button, std::move(ui_name));
|
||||
m_buttons->AddInput(ControllerEmu::DoNotTranslate, named_button);
|
||||
}
|
||||
// i18n: The START/PAUSE button on GameCube controllers
|
||||
m_buttons->AddInput(ControllerEmu::Translate, START_BUTTON, _trans("START"));
|
||||
|
||||
// sticks
|
||||
groups.emplace_back(m_main_stick = new ControllerEmu::OctagonAnalogStick(
|
||||
"Main Stick", _trans("Control Stick"), MAIN_STICK_GATE_RADIUS));
|
||||
MAIN_STICK_GROUP, _trans("Control Stick"), MAIN_STICK_GATE_RADIUS));
|
||||
groups.emplace_back(m_c_stick = new ControllerEmu::OctagonAnalogStick(
|
||||
"C-Stick", _trans("C Stick"), C_STICK_GATE_RADIUS));
|
||||
C_STICK_GROUP, _trans("C Stick"), C_STICK_GATE_RADIUS));
|
||||
|
||||
// triggers
|
||||
groups.emplace_back(m_triggers = new ControllerEmu::MixedTriggers(_trans("Triggers")));
|
||||
for (const char* named_trigger : named_triggers)
|
||||
groups.emplace_back(m_triggers = new ControllerEmu::MixedTriggers(TRIGGERS_GROUP));
|
||||
for (const char* named_trigger : {L_DIGITAL, R_DIGITAL, L_ANALOG, R_ANALOG})
|
||||
{
|
||||
m_triggers->AddInput(ControllerEmu::Translate, named_trigger);
|
||||
}
|
||||
|
||||
// rumble
|
||||
groups.emplace_back(m_rumble = new ControllerEmu::ControlGroup(_trans("Rumble")));
|
||||
groups.emplace_back(m_rumble = new ControllerEmu::ControlGroup(RUMBLE_GROUP));
|
||||
m_rumble->AddOutput(ControllerEmu::Translate, _trans("Motor"));
|
||||
|
||||
// Microphone
|
||||
groups.emplace_back(m_mic = new ControllerEmu::Buttons(_trans("Microphone")));
|
||||
groups.emplace_back(m_mic = new ControllerEmu::Buttons(MIC_GROUP));
|
||||
m_mic->AddInput(ControllerEmu::Translate, _trans("Button"));
|
||||
|
||||
// dpad
|
||||
groups.emplace_back(m_dpad = new ControllerEmu::Buttons(_trans("D-Pad")));
|
||||
groups.emplace_back(m_dpad = new ControllerEmu::Buttons(DPAD_GROUP));
|
||||
for (const char* named_direction : named_directions)
|
||||
{
|
||||
m_dpad->AddInput(ControllerEmu::Translate, named_direction);
|
||||
}
|
||||
|
||||
// options
|
||||
groups.emplace_back(m_options = new ControllerEmu::ControlGroup(_trans("Options")));
|
||||
groups.emplace_back(m_options = new ControllerEmu::ControlGroup(OPTIONS_GROUP));
|
||||
m_options->AddSetting(
|
||||
&m_always_connected_setting,
|
||||
// i18n: Treat a controller as always being connected regardless of what
|
||||
|
@ -5,6 +5,8 @@
|
||||
|
||||
#include <string>
|
||||
|
||||
#include "Common/Common.h"
|
||||
|
||||
#include "InputCommon/ControllerEmu/ControlGroup/ControlGroup.h"
|
||||
#include "InputCommon/ControllerEmu/ControllerEmu.h"
|
||||
#include "InputCommon/ControllerEmu/Setting/NumericSetting.h"
|
||||
@ -49,6 +51,31 @@ public:
|
||||
static constexpr ControlState MAIN_STICK_GATE_RADIUS = 0.7937125;
|
||||
static constexpr ControlState C_STICK_GATE_RADIUS = 0.7221375;
|
||||
|
||||
static constexpr const char* BUTTONS_GROUP = _trans("Buttons");
|
||||
static constexpr const char* MAIN_STICK_GROUP = "Main Stick";
|
||||
static constexpr const char* C_STICK_GROUP = "C-Stick";
|
||||
static constexpr const char* DPAD_GROUP = _trans("D-Pad");
|
||||
static constexpr const char* TRIGGERS_GROUP = _trans("Triggers");
|
||||
static constexpr const char* RUMBLE_GROUP = _trans("Rumble");
|
||||
static constexpr const char* MIC_GROUP = _trans("Microphone");
|
||||
static constexpr const char* OPTIONS_GROUP = _trans("Options");
|
||||
|
||||
static constexpr const char* A_BUTTON = "A";
|
||||
static constexpr const char* B_BUTTON = "B";
|
||||
static constexpr const char* X_BUTTON = "X";
|
||||
static constexpr const char* Y_BUTTON = "Y";
|
||||
static constexpr const char* Z_BUTTON = "Z";
|
||||
static constexpr const char* START_BUTTON = "Start";
|
||||
|
||||
// i18n: The left trigger button (labeled L on real controllers)
|
||||
static constexpr const char* L_DIGITAL = _trans("L");
|
||||
// i18n: The right trigger button (labeled R on real controllers)
|
||||
static constexpr const char* R_DIGITAL = _trans("R");
|
||||
// i18n: The left trigger button (labeled L on real controllers) used as an analog input
|
||||
static constexpr const char* L_ANALOG = _trans("L-Analog");
|
||||
// i18n: The right trigger button (labeled R on real controllers) used as an analog input
|
||||
static constexpr const char* R_ANALOG = _trans("R-Analog");
|
||||
|
||||
private:
|
||||
ControllerEmu::Buttons* m_buttons;
|
||||
ControllerEmu::AnalogStick* m_main_stick;
|
||||
|
@ -119,8 +119,6 @@ int CSIDevice_GCController::RunBuffer(u8* buffer, int request_length)
|
||||
|
||||
void CSIDevice_GCController::HandleMoviePadStatus(int device_number, GCPadStatus* pad_status)
|
||||
{
|
||||
Movie::CallGCInputManip(pad_status, device_number);
|
||||
|
||||
Movie::SetPolledDevice();
|
||||
if (NetPlay_GetInput(device_number, pad_status))
|
||||
{
|
||||
|
@ -39,34 +39,11 @@ constexpr std::array<u16, 9> classic_button_bitmasks{{
|
||||
Classic::BUTTON_HOME,
|
||||
}};
|
||||
|
||||
constexpr std::array<std::string_view, 9> classic_button_names{{
|
||||
"A",
|
||||
"B",
|
||||
"X",
|
||||
"Y",
|
||||
"ZL",
|
||||
"ZR",
|
||||
"-",
|
||||
"+",
|
||||
"Home",
|
||||
}};
|
||||
|
||||
constexpr std::array<u16, 2> classic_trigger_bitmasks{{
|
||||
Classic::TRIGGER_L,
|
||||
Classic::TRIGGER_R,
|
||||
}};
|
||||
|
||||
constexpr std::array<const char*, 4> classic_trigger_names{{
|
||||
// i18n: The left trigger button (labeled L on real controllers)
|
||||
_trans("L"),
|
||||
// i18n: The right trigger button (labeled R on real controllers)
|
||||
_trans("R"),
|
||||
// i18n: The left trigger button (labeled L on real controllers) used as an analog input
|
||||
_trans("L-Analog"),
|
||||
// i18n: The right trigger button (labeled R on real controllers) used as an analog input
|
||||
_trans("R-Analog"),
|
||||
}};
|
||||
|
||||
constexpr std::array<u16, 4> classic_dpad_bitmasks{{
|
||||
Classic::PAD_UP,
|
||||
Classic::PAD_DOWN,
|
||||
@ -77,30 +54,30 @@ constexpr std::array<u16, 4> classic_dpad_bitmasks{{
|
||||
Classic::Classic() : Extension1stParty("Classic", _trans("Classic Controller"))
|
||||
{
|
||||
// buttons
|
||||
groups.emplace_back(m_buttons = new ControllerEmu::Buttons(_trans("Buttons")));
|
||||
for (auto& button_name : classic_button_names)
|
||||
groups.emplace_back(m_buttons = new ControllerEmu::Buttons(BUTTONS_GROUP));
|
||||
for (auto& button_name :
|
||||
{A_BUTTON, B_BUTTON, X_BUTTON, Y_BUTTON, ZL_BUTTON, ZR_BUTTON, MINUS_BUTTON, PLUS_BUTTON})
|
||||
{
|
||||
std::string_view ui_name = (button_name == "Home") ? "HOME" : button_name;
|
||||
m_buttons->AddInput(ControllerEmu::DoNotTranslate, std::string(button_name),
|
||||
std::string(ui_name));
|
||||
m_buttons->AddInput(ControllerEmu::DoNotTranslate, button_name);
|
||||
}
|
||||
m_buttons->AddInput(ControllerEmu::DoNotTranslate, HOME_BUTTON, "HOME");
|
||||
|
||||
// sticks
|
||||
constexpr auto gate_radius = ControlState(STICK_GATE_RADIUS) / CAL_STICK_RADIUS;
|
||||
groups.emplace_back(m_left_stick =
|
||||
new ControllerEmu::OctagonAnalogStick(_trans("Left Stick"), gate_radius));
|
||||
groups.emplace_back(
|
||||
m_right_stick = new ControllerEmu::OctagonAnalogStick(_trans("Right Stick"), gate_radius));
|
||||
new ControllerEmu::OctagonAnalogStick(LEFT_STICK_GROUP, gate_radius));
|
||||
groups.emplace_back(m_right_stick =
|
||||
new ControllerEmu::OctagonAnalogStick(RIGHT_STICK_GROUP, gate_radius));
|
||||
|
||||
// triggers
|
||||
groups.emplace_back(m_triggers = new ControllerEmu::MixedTriggers(_trans("Triggers")));
|
||||
for (const char* trigger_name : classic_trigger_names)
|
||||
groups.emplace_back(m_triggers = new ControllerEmu::MixedTriggers(TRIGGERS_GROUP));
|
||||
for (const char* trigger_name : {L_DIGITAL, R_DIGITAL, L_ANALOG, R_ANALOG})
|
||||
{
|
||||
m_triggers->AddInput(ControllerEmu::Translate, trigger_name);
|
||||
}
|
||||
|
||||
// dpad
|
||||
groups.emplace_back(m_dpad = new ControllerEmu::Buttons(_trans("D-Pad")));
|
||||
groups.emplace_back(m_dpad = new ControllerEmu::Buttons(DPAD_GROUP));
|
||||
for (const char* named_direction : named_directions)
|
||||
{
|
||||
m_dpad->AddInput(ControllerEmu::Translate, named_direction);
|
||||
|
@ -216,6 +216,31 @@ public:
|
||||
|
||||
static constexpr u8 TRIGGER_RANGE = 0x1F;
|
||||
|
||||
static constexpr const char* BUTTONS_GROUP = _trans("Buttons");
|
||||
static constexpr const char* LEFT_STICK_GROUP = _trans("Left Stick");
|
||||
static constexpr const char* RIGHT_STICK_GROUP = _trans("Right Stick");
|
||||
static constexpr const char* TRIGGERS_GROUP = _trans("Triggers");
|
||||
static constexpr const char* DPAD_GROUP = _trans("D-Pad");
|
||||
|
||||
static constexpr const char* A_BUTTON = "A";
|
||||
static constexpr const char* B_BUTTON = "B";
|
||||
static constexpr const char* X_BUTTON = "X";
|
||||
static constexpr const char* Y_BUTTON = "Y";
|
||||
static constexpr const char* ZL_BUTTON = "ZL";
|
||||
static constexpr const char* ZR_BUTTON = "ZR";
|
||||
static constexpr const char* MINUS_BUTTON = "-";
|
||||
static constexpr const char* PLUS_BUTTON = "+";
|
||||
static constexpr const char* HOME_BUTTON = "Home";
|
||||
|
||||
// i18n: The left trigger button (labeled L on real controllers)
|
||||
static constexpr const char* L_DIGITAL = _trans("L");
|
||||
// i18n: The right trigger button (labeled R on real controllers)
|
||||
static constexpr const char* R_DIGITAL = _trans("R");
|
||||
// i18n: The left trigger button (labeled L on real controllers) used as an analog input
|
||||
static constexpr const char* L_ANALOG = _trans("L-Analog");
|
||||
// i18n: The right trigger button (labeled R on real controllers) used as an analog input
|
||||
static constexpr const char* R_ANALOG = _trans("R-Analog");
|
||||
|
||||
private:
|
||||
ControllerEmu::Buttons* m_buttons;
|
||||
ControllerEmu::MixedTriggers* m_triggers;
|
||||
|
@ -37,14 +37,13 @@ constexpr std::array<u8, 2> nunchuk_button_bitmasks{{
|
||||
Nunchuk::Nunchuk() : Extension1stParty(_trans("Nunchuk"))
|
||||
{
|
||||
// buttons
|
||||
groups.emplace_back(m_buttons = new ControllerEmu::Buttons(_trans("Buttons")));
|
||||
m_buttons->AddInput(ControllerEmu::DoNotTranslate, "C");
|
||||
m_buttons->AddInput(ControllerEmu::DoNotTranslate, "Z");
|
||||
groups.emplace_back(m_buttons = new ControllerEmu::Buttons(BUTTONS_GROUP));
|
||||
m_buttons->AddInput(ControllerEmu::DoNotTranslate, C_BUTTON);
|
||||
m_buttons->AddInput(ControllerEmu::DoNotTranslate, Z_BUTTON);
|
||||
|
||||
// stick
|
||||
constexpr auto gate_radius = ControlState(STICK_GATE_RADIUS) / STICK_RADIUS;
|
||||
groups.emplace_back(m_stick =
|
||||
new ControllerEmu::OctagonAnalogStick(_trans("Stick"), gate_radius));
|
||||
groups.emplace_back(m_stick = new ControllerEmu::OctagonAnalogStick(STICK_GROUP, gate_radius));
|
||||
|
||||
// swing
|
||||
groups.emplace_back(m_swing = new ControllerEmu::Force(_trans("Swing")));
|
||||
@ -59,7 +58,7 @@ Nunchuk::Nunchuk() : Extension1stParty(_trans("Nunchuk"))
|
||||
|
||||
// accelerometer
|
||||
groups.emplace_back(m_imu_accelerometer = new ControllerEmu::IMUAccelerometer(
|
||||
"IMUAccelerometer", _trans("Accelerometer")));
|
||||
ACCELEROMETER_GROUP, _trans("Accelerometer")));
|
||||
}
|
||||
|
||||
void Nunchuk::BuildDesiredExtensionState(DesiredExtensionState* target_state)
|
||||
|
@ -5,6 +5,8 @@
|
||||
|
||||
#include <array>
|
||||
|
||||
#include "Common/Common.h"
|
||||
|
||||
#include "Core/HW/WiimoteCommon/WiimoteReport.h"
|
||||
#include "Core/HW/WiimoteEmu/Dynamics.h"
|
||||
#include "Core/HW/WiimoteEmu/Extension/Extension.h"
|
||||
@ -156,6 +158,8 @@ public:
|
||||
|
||||
ControllerEmu::ControlGroup* GetGroup(NunchukGroup group);
|
||||
|
||||
void LoadDefaults(const ControllerInterface& ciface) override;
|
||||
|
||||
static constexpr u8 BUTTON_C = 0x02;
|
||||
static constexpr u8 BUTTON_Z = 0x01;
|
||||
|
||||
@ -168,7 +172,12 @@ public:
|
||||
static constexpr u8 STICK_RADIUS = 0x7F;
|
||||
static constexpr u8 STICK_RANGE = 0xFF;
|
||||
|
||||
void LoadDefaults(const ControllerInterface& ciface) override;
|
||||
static constexpr const char* BUTTONS_GROUP = _trans("Buttons");
|
||||
static constexpr const char* STICK_GROUP = _trans("Stick");
|
||||
static constexpr const char* ACCELEROMETER_GROUP = "IMUAccelerometer";
|
||||
|
||||
static constexpr const char* C_BUTTON = "C";
|
||||
static constexpr const char* Z_BUTTON = "Z";
|
||||
|
||||
private:
|
||||
ControllerEmu::Tilt* m_tilt;
|
||||
|
@ -11,6 +11,7 @@
|
||||
#include <fmt/format.h>
|
||||
|
||||
#include "Common/Assert.h"
|
||||
#include "Common/Common.h"
|
||||
#include "Common/CommonTypes.h"
|
||||
#include "Common/Config/Config.h"
|
||||
#include "Common/FileUtil.h"
|
||||
@ -64,10 +65,6 @@ static const u16 dpad_bitmasks[] = {Wiimote::PAD_UP, Wiimote::PAD_DOWN, Wiimote:
|
||||
static const u16 dpad_sideways_bitmasks[] = {Wiimote::PAD_RIGHT, Wiimote::PAD_LEFT, Wiimote::PAD_UP,
|
||||
Wiimote::PAD_DOWN};
|
||||
|
||||
constexpr std::array<std::string_view, 7> named_buttons{
|
||||
"A", "B", "1", "2", "-", "+", "Home",
|
||||
};
|
||||
|
||||
void Wiimote::Reset()
|
||||
{
|
||||
const bool want_determinism = Core::WantsDeterminism();
|
||||
@ -212,24 +209,23 @@ void Wiimote::Reset()
|
||||
Wiimote::Wiimote(const unsigned int index) : m_index(index), m_bt_device_index(index)
|
||||
{
|
||||
// Buttons
|
||||
groups.emplace_back(m_buttons = new ControllerEmu::Buttons(_trans("Buttons")));
|
||||
for (auto& named_button : named_buttons)
|
||||
groups.emplace_back(m_buttons = new ControllerEmu::Buttons(BUTTONS_GROUP));
|
||||
for (auto& named_button : {A_BUTTON, B_BUTTON, ONE_BUTTON, TWO_BUTTON, MINUS_BUTTON, PLUS_BUTTON})
|
||||
{
|
||||
std::string_view ui_name = (named_button == "Home") ? "HOME" : named_button;
|
||||
m_buttons->AddInput(ControllerEmu::DoNotTranslate, std::string(named_button),
|
||||
std::string(ui_name));
|
||||
m_buttons->AddInput(ControllerEmu::DoNotTranslate, named_button);
|
||||
}
|
||||
m_buttons->AddInput(ControllerEmu::DoNotTranslate, HOME_BUTTON, "HOME");
|
||||
|
||||
// Pointing (IR)
|
||||
// i18n: "Point" refers to the action of pointing a Wii Remote.
|
||||
groups.emplace_back(m_ir = new ControllerEmu::Cursor("IR", _trans("Point")));
|
||||
groups.emplace_back(m_ir = new ControllerEmu::Cursor(IR_GROUP, _trans("Point")));
|
||||
groups.emplace_back(m_swing = new ControllerEmu::Force(_trans("Swing")));
|
||||
groups.emplace_back(m_tilt = new ControllerEmu::Tilt(_trans("Tilt")));
|
||||
groups.emplace_back(m_shake = new ControllerEmu::Shake(_trans("Shake")));
|
||||
groups.emplace_back(m_imu_accelerometer = new ControllerEmu::IMUAccelerometer(
|
||||
"IMUAccelerometer", _trans("Accelerometer")));
|
||||
ACCELEROMETER_GROUP, _trans("Accelerometer")));
|
||||
groups.emplace_back(m_imu_gyroscope =
|
||||
new ControllerEmu::IMUGyroscope("IMUGyroscope", _trans("Gyroscope")));
|
||||
new ControllerEmu::IMUGyroscope(GYROSCOPE_GROUP, _trans("Gyroscope")));
|
||||
groups.emplace_back(m_imu_ir = new ControllerEmu::IMUCursor("IMUIR", _trans("Point")));
|
||||
|
||||
const auto fov_default =
|
||||
@ -273,7 +269,7 @@ Wiimote::Wiimote(const unsigned int index) : m_index(index), m_bt_device_index(i
|
||||
m_rumble->AddOutput(ControllerEmu::Translate, _trans("Motor"));
|
||||
|
||||
// D-Pad
|
||||
groups.emplace_back(m_dpad = new ControllerEmu::Buttons(_trans("D-Pad")));
|
||||
groups.emplace_back(m_dpad = new ControllerEmu::Buttons(DPAD_GROUP));
|
||||
for (const char* named_direction : named_directions)
|
||||
{
|
||||
m_dpad->AddInput(ControllerEmu::Translate, named_direction);
|
||||
|
@ -8,6 +8,8 @@
|
||||
#include <optional>
|
||||
#include <string>
|
||||
|
||||
#include "Common/Common.h"
|
||||
|
||||
#include "Core/HW/WiimoteCommon/WiimoteReport.h"
|
||||
|
||||
#include "Core/HW/WiimoteEmu/Camera.h"
|
||||
@ -113,6 +115,20 @@ public:
|
||||
static constexpr u16 BUTTON_MINUS = 0x1000;
|
||||
static constexpr u16 BUTTON_HOME = 0x8000;
|
||||
|
||||
static constexpr const char* BUTTONS_GROUP = _trans("Buttons");
|
||||
static constexpr const char* DPAD_GROUP = _trans("D-Pad");
|
||||
static constexpr const char* ACCELEROMETER_GROUP = "IMUAccelerometer";
|
||||
static constexpr const char* GYROSCOPE_GROUP = "IMUGyroscope";
|
||||
static constexpr const char* IR_GROUP = "IR";
|
||||
|
||||
static constexpr const char* A_BUTTON = "A";
|
||||
static constexpr const char* B_BUTTON = "B";
|
||||
static constexpr const char* ONE_BUTTON = "1";
|
||||
static constexpr const char* TWO_BUTTON = "2";
|
||||
static constexpr const char* MINUS_BUTTON = "-";
|
||||
static constexpr const char* PLUS_BUTTON = "+";
|
||||
static constexpr const char* HOME_BUTTON = "Home";
|
||||
|
||||
explicit Wiimote(unsigned int index);
|
||||
~Wiimote();
|
||||
|
||||
|
@ -122,9 +122,6 @@ static bool s_bPolled = false;
|
||||
static std::mutex s_input_display_lock;
|
||||
static std::string s_InputDisplay[8];
|
||||
|
||||
static GCManipFunction s_gc_manip_func;
|
||||
static WiiManipFunction s_wii_manip_func;
|
||||
|
||||
static std::string s_current_file_name;
|
||||
|
||||
static void GetSettings();
|
||||
@ -1426,28 +1423,6 @@ void SaveRecording(const std::string& filename)
|
||||
Core::DisplayMessage(fmt::format("Failed to save {}", filename), 2000);
|
||||
}
|
||||
|
||||
void SetGCInputManip(GCManipFunction func)
|
||||
{
|
||||
s_gc_manip_func = std::move(func);
|
||||
}
|
||||
void SetWiiInputManip(WiiManipFunction func)
|
||||
{
|
||||
s_wii_manip_func = std::move(func);
|
||||
}
|
||||
|
||||
// NOTE: CPU Thread
|
||||
void CallGCInputManip(GCPadStatus* PadStatus, int controllerID)
|
||||
{
|
||||
if (s_gc_manip_func)
|
||||
s_gc_manip_func(PadStatus, controllerID);
|
||||
}
|
||||
// NOTE: CPU Thread
|
||||
void CallWiiInputManip(DataReportBuilder& rpt, int controllerID, int ext, const EncryptionKey& key)
|
||||
{
|
||||
if (s_wii_manip_func)
|
||||
s_wii_manip_func(rpt, controllerID, ext, key);
|
||||
}
|
||||
|
||||
// NOTE: GPU Thread
|
||||
void SetGraphicsConfig()
|
||||
{
|
||||
|
@ -5,7 +5,6 @@
|
||||
|
||||
#include <array>
|
||||
#include <cstring>
|
||||
#include <functional>
|
||||
#include <optional>
|
||||
#include <string>
|
||||
#include <string_view>
|
||||
@ -200,14 +199,4 @@ std::string GetInputDisplay();
|
||||
std::string GetRTCDisplay();
|
||||
std::string GetRerecords();
|
||||
|
||||
// Done this way to avoid mixing of core and gui code
|
||||
using GCManipFunction = std::function<void(GCPadStatus*, int)>;
|
||||
using WiiManipFunction = std::function<void(WiimoteCommon::DataReportBuilder&, int, int,
|
||||
const WiimoteEmu::EncryptionKey&)>;
|
||||
|
||||
void SetGCInputManip(GCManipFunction);
|
||||
void SetWiiInputManip(WiiManipFunction);
|
||||
void CallGCInputManip(GCPadStatus* PadStatus, int controllerID);
|
||||
void CallWiiInputManip(WiimoteCommon::DataReportBuilder& rpt, int controllerID, int ext,
|
||||
const WiimoteEmu::EncryptionKey& key);
|
||||
} // namespace Movie
|
||||
|
Reference in New Issue
Block a user