early-access version 3315
This commit is contained in:
@@ -51,8 +51,6 @@ enum class PollingMode {
|
||||
NFC,
|
||||
// Enable infrared camera polling
|
||||
IR,
|
||||
// Enable ring controller polling
|
||||
Ring,
|
||||
};
|
||||
|
||||
enum class CameraFormat {
|
||||
@@ -64,22 +62,21 @@ enum class CameraFormat {
|
||||
None,
|
||||
};
|
||||
|
||||
// Different results that can happen from a device request
|
||||
enum class DriverResult {
|
||||
Success,
|
||||
WrongReply,
|
||||
Timeout,
|
||||
UnsupportedControllerType,
|
||||
HandleInUse,
|
||||
ErrorReadingData,
|
||||
ErrorWritingData,
|
||||
NoDeviceDetected,
|
||||
InvalidHandle,
|
||||
// Vibration reply from the controller
|
||||
enum class VibrationError {
|
||||
None,
|
||||
NotSupported,
|
||||
Disabled,
|
||||
Unknown,
|
||||
};
|
||||
|
||||
// Polling mode reply from the controller
|
||||
enum class PollingError {
|
||||
None,
|
||||
NotSupported,
|
||||
Unknown,
|
||||
};
|
||||
|
||||
// Nfc reply from the controller
|
||||
enum class NfcState {
|
||||
Success,
|
||||
@@ -93,6 +90,13 @@ enum class NfcState {
|
||||
Unknown,
|
||||
};
|
||||
|
||||
// Ir camera reply from the controller
|
||||
enum class CameraError {
|
||||
None,
|
||||
NotSupported,
|
||||
Unknown,
|
||||
};
|
||||
|
||||
// Hint for amplification curve to be used
|
||||
enum class VibrationAmplificationType {
|
||||
Linear,
|
||||
@@ -186,8 +190,6 @@ struct TouchStatus {
|
||||
struct BodyColorStatus {
|
||||
u32 body{};
|
||||
u32 buttons{};
|
||||
u32 left_grip{};
|
||||
u32 right_grip{};
|
||||
};
|
||||
|
||||
// HD rumble data
|
||||
@@ -226,31 +228,17 @@ enum class ButtonNames {
|
||||
Engine,
|
||||
// This will display the button by value instead of the button name
|
||||
Value,
|
||||
|
||||
// Joycon button names
|
||||
ButtonLeft,
|
||||
ButtonRight,
|
||||
ButtonDown,
|
||||
ButtonUp,
|
||||
TriggerZ,
|
||||
TriggerR,
|
||||
TriggerL,
|
||||
ButtonA,
|
||||
ButtonB,
|
||||
ButtonX,
|
||||
ButtonY,
|
||||
ButtonPlus,
|
||||
ButtonMinus,
|
||||
ButtonHome,
|
||||
ButtonCapture,
|
||||
ButtonStickL,
|
||||
ButtonStickR,
|
||||
TriggerL,
|
||||
TriggerZL,
|
||||
TriggerSL,
|
||||
TriggerR,
|
||||
TriggerZR,
|
||||
TriggerSR,
|
||||
|
||||
// GC button names
|
||||
TriggerZ,
|
||||
ButtonStart,
|
||||
|
||||
// DS4 button names
|
||||
@@ -328,24 +316,22 @@ class OutputDevice {
|
||||
public:
|
||||
virtual ~OutputDevice() = default;
|
||||
|
||||
virtual DriverResult SetLED([[maybe_unused]] const LedStatus& led_status) {
|
||||
return DriverResult::NotSupported;
|
||||
}
|
||||
virtual void SetLED([[maybe_unused]] const LedStatus& led_status) {}
|
||||
|
||||
virtual DriverResult SetVibration([[maybe_unused]] const VibrationStatus& vibration_status) {
|
||||
return DriverResult::NotSupported;
|
||||
virtual VibrationError SetVibration([[maybe_unused]] const VibrationStatus& vibration_status) {
|
||||
return VibrationError::NotSupported;
|
||||
}
|
||||
|
||||
virtual bool IsVibrationEnabled() {
|
||||
return false;
|
||||
}
|
||||
|
||||
virtual DriverResult SetPollingMode([[maybe_unused]] PollingMode polling_mode) {
|
||||
return DriverResult::NotSupported;
|
||||
virtual PollingError SetPollingMode([[maybe_unused]] PollingMode polling_mode) {
|
||||
return PollingError::NotSupported;
|
||||
}
|
||||
|
||||
virtual DriverResult SetCameraFormat([[maybe_unused]] CameraFormat camera_format) {
|
||||
return DriverResult::NotSupported;
|
||||
virtual CameraError SetCameraFormat([[maybe_unused]] CameraFormat camera_format) {
|
||||
return CameraError::NotSupported;
|
||||
}
|
||||
|
||||
virtual NfcState SupportsNfc() const {
|
||||
|
@@ -483,7 +483,6 @@ struct Values {
|
||||
|
||||
Setting<bool> enable_raw_input{false, "enable_raw_input"};
|
||||
Setting<bool> controller_navigation{true, "controller_navigation"};
|
||||
Setting<bool> enable_joycon_driver{true, "enable_joycon_driver"};
|
||||
|
||||
SwitchableSetting<bool> vibration_enabled{true, "vibration_enabled"};
|
||||
SwitchableSetting<bool> enable_accurate_vibrations{false, "enable_accurate_vibrations"};
|
||||
|
@@ -30,7 +30,7 @@ std::string ToUpper(std::string str) {
|
||||
return str;
|
||||
}
|
||||
|
||||
std::string StringFromBuffer(std::span<const u8> data) {
|
||||
std::string StringFromBuffer(const std::vector<u8>& data) {
|
||||
return std::string(data.begin(), std::find(data.begin(), data.end(), '\0'));
|
||||
}
|
||||
|
||||
|
@@ -5,7 +5,6 @@
|
||||
#pragma once
|
||||
|
||||
#include <cstddef>
|
||||
#include <span>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include "common/common_types.h"
|
||||
@@ -18,7 +17,7 @@ namespace Common {
|
||||
/// Make a string uppercase
|
||||
[[nodiscard]] std::string ToUpper(std::string str);
|
||||
|
||||
[[nodiscard]] std::string StringFromBuffer(std::span<const u8> data);
|
||||
[[nodiscard]] std::string StringFromBuffer(const std::vector<u8>& data);
|
||||
|
||||
[[nodiscard]] std::string StripSpaces(const std::string& s);
|
||||
[[nodiscard]] std::string StripQuotes(const std::string& s);
|
||||
|
Reference in New Issue
Block a user