Update render, spritebatch and input stuffs.
This commit is contained in:
@@ -1,27 +0,0 @@
|
||||
/**
|
||||
* Copyright (c) 2026 Dominic Masters
|
||||
*
|
||||
* This software is released under the MIT License.
|
||||
* https://opensource.org/licenses/MIT
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
#include "inputsdl2.h"
|
||||
|
||||
#ifdef DUSK_INPUT_KEYBOARD
|
||||
typedef inputscancodesdl2_t inputscancodeplatform_t;
|
||||
#endif
|
||||
|
||||
#ifdef DUSK_INPUT_GAMEPAD
|
||||
typedef inputgamepadbuttonsdl2_t inputgamepadbuttonplatform_t;
|
||||
typedef inputgamepadaxissdl2_t inputgamepadaxissplatform_t;
|
||||
#endif
|
||||
|
||||
#ifdef DUSK_INPUT_POINTER
|
||||
typedef inputpointeraxissdl2_t inputpointeraxisplatform_t;
|
||||
#endif
|
||||
|
||||
#define inputUpdatePlatform inputUpdateSDL2
|
||||
#define inputButtonGetValuePlatform inputButtonGetValueSDL2
|
||||
|
||||
typedef inputsdl2_t inputplatform_t;
|
||||
@@ -44,6 +44,25 @@ typedef struct {
|
||||
#endif
|
||||
} inputsdl2_t;
|
||||
|
||||
// Setup platform variables for input.
|
||||
#ifdef DUSK_INPUT_KEYBOARD
|
||||
typedef inputscancodesdl2_t inputscancodeplatform_t;
|
||||
#endif
|
||||
|
||||
#ifdef DUSK_INPUT_GAMEPAD
|
||||
typedef inputgamepadbuttonsdl2_t inputgamepadbuttonplatform_t;
|
||||
typedef inputgamepadaxissdl2_t inputgamepadaxissplatform_t;
|
||||
#endif
|
||||
|
||||
#ifdef DUSK_INPUT_POINTER
|
||||
typedef inputpointeraxissdl2_t inputpointeraxisplatform_t;
|
||||
#endif
|
||||
|
||||
#define inputUpdatePlatform inputUpdateSDL2
|
||||
#define inputButtonGetValuePlatform inputButtonGetValueSDL2
|
||||
|
||||
typedef inputsdl2_t inputplatform_t;
|
||||
|
||||
/**
|
||||
* Updates the input state for SDL2.
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user