src/platform/sdl/sdl-events.h (view raw)
1#ifndef SDL_EVENTS_H
2#define SDL_EVENTS_H
3
4#include "util/common.h"
5
6#include "gba-thread.h"
7
8#include <SDL.h>
9
10#define SDL_BINDING_KEY 0x53444C4B
11#define SDL_BINDING_BUTTON 0x53444C42
12
13struct GBAVideoSoftwareRenderer;
14
15struct GBASDLEvents {
16 struct GBAInputMap* bindings;
17 SDL_Joystick* joystick;
18#if SDL_VERSION_ATLEAST(2, 0, 0)
19 SDL_Window* window;
20 int fullscreen;
21 int windowUpdated;
22#endif
23};
24
25bool GBASDLInitEvents(struct GBASDLEvents*);
26void GBASDLDeinitEvents(struct GBASDLEvents*);
27
28void GBASDLHandleEvent(struct GBAThread* context, struct GBASDLEvents* sdlContext, const union SDL_Event* event);
29
30#endif