all repos — mgba @ d75042ea38fbffafdd53d2827421ab4470b47737

mGBA Game Boy Advance Emulator

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;
14struct Configuration;
15
16struct GBASDLEvents {
17	struct GBAInputMap* bindings;
18	SDL_Joystick* joystick;
19#if SDL_VERSION_ATLEAST(2, 0, 0)
20	SDL_Window* window;
21	int fullscreen;
22	int windowUpdated;
23#endif
24};
25
26bool GBASDLInitEvents(struct GBASDLEvents*);
27void GBASDLDeinitEvents(struct GBASDLEvents*);
28
29void GBASDLInitindings(struct GBAInputMap* inputMap);
30void GBASDLEventsLoadConfig(struct GBASDLEvents*, const struct Configuration*);
31
32void GBASDLHandleEvent(struct GBAThread* context, struct GBASDLEvents* sdlContext, const union SDL_Event* event);
33
34#endif