From 780cbf8ec36eff2ccb92775ffdd1ce6793854698 Mon Sep 17 00:00:00 2001 From: Laggamer2005 <158077584+Laggamer2005@users.noreply.github.com> Date: Sat, 7 Dec 2024 11:20:59 +0000 Subject: [PATCH] Update DSW_Api.h --- .../include/DualSenseWindows/DSW_Api.h | 118 +++++++++--------- 1 file changed, 58 insertions(+), 60 deletions(-) diff --git a/VS19_Solution/DualSenseWindows/include/DualSenseWindows/DSW_Api.h b/VS19_Solution/DualSenseWindows/include/DualSenseWindows/DSW_Api.h index 3344ba1..881f96c 100644 --- a/VS19_Solution/DualSenseWindows/include/DualSenseWindows/DSW_Api.h +++ b/VS19_Solution/DualSenseWindows/include/DualSenseWindows/DSW_Api.h @@ -1,84 +1,82 @@ /* - DSW_Api.h is part of DualSenseWindows - https://github.com/Ohjurot/DualSense-Windows + DSW_Api.h is part of DualSenseWindows + https://github.com/Ohjurot/DualSense-Windows - Contributors of this file: - 11.2020 Ludwig Füchsl + Contributors of this file: + 11.2020 Ludwig Füchsl - Licensed under the MIT License (To be found in repository root directory) + Licensed under the MIT License (To be found in repository root directory) */ #pragma once #if defined(DS5W_BUILD_DLL) -#define DS5W_API __declspec(dllexport) -#elif defined(DS5W_BUILD_LIB) -#define DS5W_API -#elif defined(DS5W_USE_LIB) -#define DS5W_API + #define DS5W_API __declspec(dllexport) +#elif defined(DS5W_BUILD_LIB) || defined(DS5W_USE_LIB) + #define DS5W_API #else -#define DS5W_API __declspec(dllimport) + #define DS5W_API __declspec(dllimport) #endif -#define DS5W_SUCCESS(expr) ((expr) == _DS5W_ReturnValue::OK) -#define DS5W_FAILED(expr) ((expr) != _DS5W_ReturnValue::OK) +#define DS5W_SUCCESS(expr) ((expr) == DS5W_ReturnValue::OK) +#define DS5W_FAILED(expr) ((expr) != DS5W_ReturnValue::OK) -#define DS5W_OK _DS5W_ReturnValue::OK -#define DS5W_E_UNKNOWN _DS5W_ReturnValue::E_UNKNOWN -#define DS5W_E_INSUFFICIENT_BUFFER _DS5W_ReturnValue::E_INSUFFICIENT_BUFFER -#define DS5W_E_EXTERNAL_WINAPI _DS5W_ReturnValue::E_EXTERNAL_WINAPI -#define DS5W_E_STACK_OVERFLOW _DS5W_ReturnValue::E_STACK_OVERFLOW -#define DS5W_E_INVALID_ARGS _DS5W_ReturnValue::E_INVALID_ARGS -#define DS5W_E_CURRENTLY_NOT_SUPPORTED _DS5W_ReturnValue::E_CURRENTLY_NOT_SUPPORTED -#define DS5W_E_DEVICE_REMOVED _DS5W_ReturnValue::E_DEVICE_REMOVED -#define DS5W_E_BT_COM _DS5W_ReturnValue::E_BT_COM +#define DS5W_OK DS5W_ReturnValue::OK +#define DS5W_E_UNKNOWN DS5W_ReturnValue::E_UNKNOWN +#define DS5W_E_INSUFFICIENT_BUFFER DS5W_ReturnValue::E_INSUFFICIENT_BUFFER +#define DS5W_E_EXTERNAL_WINAPI DS5W_ReturnValue::E_EXTERNAL_WINAPI +#define DS5W_E_STACK_OVERFLOW DS5W_ReturnValue::E_STACK_OVERFLOW +#define DS5W_E_INVALID_ARGS DS5W_ReturnValue::E_INVALID_ARGS +#define DS5W_E_CURRENTLY_NOT_SUPPORTED DS5W_ReturnValue::E_CURRENTLY_NOT_SUPPORTED +#define DS5W_E_DEVICE_REMOVED DS5W_ReturnValue::E_DEVICE_REMOVED +#define DS5W_E_BT_COM DS5W_ReturnValue::E_BT_COM /// /// Enum for return values /// -typedef enum class _DS5W_ReturnValue : unsigned int { - /// - /// Operation completed without an error - /// - OK = 0, +typedef enum class DS5W_ReturnValue : unsigned int { + /// + /// Operation completed without an error + /// + OK = 0, - /// - /// Operation encountered an unknown error - /// - E_UNKNOWN = 1, + /// + /// Operation encountered an unknown error + /// + E_UNKNOWN = 1, - /// - /// The user supplied buffer is to small - /// - E_INSUFFICIENT_BUFFER = 2, + /// + /// The user supplied buffer is too small + /// + E_INSUFFICIENT_BUFFER = 2, - /// - /// External unexpected winapi error (please report as issue if you get this error!) - /// - E_EXTERNAL_WINAPI = 3, + /// + /// External unexpected WinAPI error (please report as issue if you get this error!) + /// + E_EXTERNAL_WINAPI = 3, - /// - /// Not enought memroy on the stack - /// - E_STACK_OVERFLOW = 4, + /// + /// Not enough memory on the stack + /// + E_STACK_OVERFLOW = 4, - /// - /// Invalid arguments - /// - E_INVALID_ARGS = 5, + /// + /// Invalid arguments + /// + E_INVALID_ARGS = 5, - /// - /// This feature is currently not supported - /// - E_CURRENTLY_NOT_SUPPORTED = 6, + /// + /// This feature is currently not supported + /// + E_CURRENTLY_NOT_SUPPORTED = 6, - /// - /// Device was disconnected - /// - E_DEVICE_REMOVED = 7, + /// + /// Device was disconnected + /// + E_DEVICE_REMOVED = 7, - /// - /// Bluetooth communication error - /// - E_BT_COM = 8, + /// + /// Bluetooth communication error + /// + E_BT_COM = 8, -} DS5W_ReturnValue, DS5W_RV; \ No newline at end of file +} DS5W_RV;