Refactor away some additional integer types.
This commit is contained in:
@@ -29,29 +29,24 @@
|
|||||||
|
|
||||||
/*****************************************************************************************************/
|
/*****************************************************************************************************/
|
||||||
|
|
||||||
#include <stdint.h>
|
|
||||||
|
|
||||||
#define bool SDL_bool
|
#define bool SDL_bool
|
||||||
#define true SDL_TRUE
|
#define true SDL_TRUE
|
||||||
#define false SDL_FALSE
|
#define false SDL_FALSE
|
||||||
|
|
||||||
typedef uint32_t uint32;
|
|
||||||
typedef uint64_t uint64;
|
|
||||||
|
|
||||||
#include "steam/controller_constants.h"
|
#include "steam/controller_constants.h"
|
||||||
#include "steam/controller_structs.h"
|
#include "steam/controller_structs.h"
|
||||||
|
|
||||||
typedef struct SteamControllerStateInternal_t
|
typedef struct SteamControllerStateInternal_t
|
||||||
{
|
{
|
||||||
// Controller Type for this Controller State
|
// Controller Type for this Controller State
|
||||||
uint32 eControllerType;
|
Uint32 eControllerType;
|
||||||
|
|
||||||
// If packet num matches that on your prior call, then the controller state hasn't been changed since
|
// If packet num matches that on your prior call, then the controller state hasn't been changed since
|
||||||
// your last call and there is no need to process it
|
// your last call and there is no need to process it
|
||||||
uint32 unPacketNum;
|
Uint32 unPacketNum;
|
||||||
|
|
||||||
// bit flags for each of the buttons
|
// bit flags for each of the buttons
|
||||||
uint64 ulButtons;
|
Uint64 ulButtons;
|
||||||
|
|
||||||
// Left pad coordinates
|
// Left pad coordinates
|
||||||
short sLeftPadX;
|
short sLeftPadX;
|
||||||
|
|||||||
@@ -29,15 +29,6 @@
|
|||||||
|
|
||||||
/*****************************************************************************************************/
|
/*****************************************************************************************************/
|
||||||
|
|
||||||
#include <stdint.h>
|
|
||||||
|
|
||||||
#define bool SDL_bool
|
|
||||||
#define true SDL_TRUE
|
|
||||||
#define false SDL_FALSE
|
|
||||||
|
|
||||||
typedef uint32_t uint32;
|
|
||||||
typedef uint64_t uint64;
|
|
||||||
|
|
||||||
#include "steam/controller_constants.h"
|
#include "steam/controller_constants.h"
|
||||||
#include "steam/controller_structs.h"
|
#include "steam/controller_structs.h"
|
||||||
|
|
||||||
|
|||||||
@@ -109,12 +109,12 @@ typedef struct
|
|||||||
{
|
{
|
||||||
// If packet num matches that on your prior call, then the controller state hasn't been changed since
|
// If packet num matches that on your prior call, then the controller state hasn't been changed since
|
||||||
// your last call and there is no need to process it
|
// your last call and there is no need to process it
|
||||||
uint32 unPacketNum;
|
Uint32 unPacketNum;
|
||||||
|
|
||||||
// Button bitmask and trigger data.
|
// Button bitmask and trigger data.
|
||||||
union
|
union
|
||||||
{
|
{
|
||||||
uint64 ulButtons;
|
Uint64 ulButtons;
|
||||||
struct
|
struct
|
||||||
{
|
{
|
||||||
unsigned char _pad0[3];
|
unsigned char _pad0[3];
|
||||||
@@ -158,12 +158,12 @@ typedef struct
|
|||||||
{
|
{
|
||||||
// If packet num matches that on your prior call, then the controller state hasn't been changed since
|
// If packet num matches that on your prior call, then the controller state hasn't been changed since
|
||||||
// your last call and there is no need to process it
|
// your last call and there is no need to process it
|
||||||
uint32 unPacketNum;
|
Uint32 unPacketNum;
|
||||||
|
|
||||||
// Button bitmask and trigger data.
|
// Button bitmask and trigger data.
|
||||||
union
|
union
|
||||||
{
|
{
|
||||||
uint64 ulButtons;
|
Uint64 ulButtons;
|
||||||
struct
|
struct
|
||||||
{
|
{
|
||||||
unsigned char _pad0[3];
|
unsigned char _pad0[3];
|
||||||
@@ -279,16 +279,16 @@ typedef struct
|
|||||||
// If packet num matches that on your prior call, then the controller
|
// If packet num matches that on your prior call, then the controller
|
||||||
// state hasn't been changed since your last call and there is no need to
|
// state hasn't been changed since your last call and there is no need to
|
||||||
// process it
|
// process it
|
||||||
uint32 unPacketNum;
|
Uint32 unPacketNum;
|
||||||
|
|
||||||
// Button bitmask and trigger data.
|
// Button bitmask and trigger data.
|
||||||
union
|
union
|
||||||
{
|
{
|
||||||
uint64 ulButtons;
|
Uint64 ulButtons;
|
||||||
struct
|
struct
|
||||||
{
|
{
|
||||||
uint32 ulButtonsL;
|
Uint32 ulButtonsL;
|
||||||
uint32 ulButtonsH;
|
Uint32 ulButtonsH;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user