Added joystick and gamepad element display in testgamepad
This commit is contained in:
@@ -10,24 +10,6 @@
|
||||
freely.
|
||||
*/
|
||||
|
||||
/* Joystick element display */
|
||||
|
||||
typedef struct JoystickDisplay JoystickDisplay;
|
||||
|
||||
extern JoystickDisplay *CreateJoystickDisplay(SDL_Renderer *renderer);
|
||||
extern void SetJoystickDisplayArea(JoystickDisplay *ctx, int x, int y, int w, int h);
|
||||
extern void UpdateJoystickDisplayFromJoystick(JoystickDisplay *ctx, SDL_Joystick *joystick);
|
||||
extern void RenderJoystickDisplay(JoystickDisplay *ctx);
|
||||
|
||||
/* Gamepad element display */
|
||||
|
||||
typedef struct GamepadDisplay GamepadDisplay;
|
||||
|
||||
extern GamepadDisplay *CreateGamepadDisplay(SDL_Renderer *renderer);
|
||||
extern void SetGamepadDisplayArea(GamepadDisplay *ctx, int x, int y, int w, int h);
|
||||
extern void UpdateGamepadDisplayFromGamepad(GamepadDisplay *ctx, SDL_Gamepad *joystick);
|
||||
extern void RenderGamepadDisplay(GamepadDisplay *ctx);
|
||||
|
||||
/* Gamepad image */
|
||||
|
||||
typedef struct GamepadImage GamepadImage;
|
||||
@@ -53,3 +35,21 @@ extern void UpdateGamepadImageFromGamepad(GamepadImage *ctx, SDL_Gamepad *gamepa
|
||||
extern void RenderGamepadImage(GamepadImage *ctx);
|
||||
extern void DestroyGamepadImage(GamepadImage *ctx);
|
||||
|
||||
/* Gamepad element display */
|
||||
|
||||
typedef struct GamepadDisplay GamepadDisplay;
|
||||
|
||||
extern GamepadDisplay *CreateGamepadDisplay(SDL_Renderer *renderer);
|
||||
extern void SetGamepadDisplayArea(GamepadDisplay *ctx, int x, int y, int w, int h);
|
||||
extern void RenderGamepadDisplay(GamepadDisplay *ctx, SDL_Gamepad *gamepad);
|
||||
extern void DestroyGamepadDisplay(GamepadDisplay *ctx);
|
||||
|
||||
/* Joystick element display */
|
||||
|
||||
typedef struct JoystickDisplay JoystickDisplay;
|
||||
|
||||
extern JoystickDisplay *CreateJoystickDisplay(SDL_Renderer *renderer);
|
||||
extern void SetJoystickDisplayArea(JoystickDisplay *ctx, int x, int y, int w, int h);
|
||||
extern void RenderJoystickDisplay(JoystickDisplay *ctx, SDL_Joystick *joystick);
|
||||
extern void DestroyJoystickDisplay(JoystickDisplay *ctx);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user