all repos — mgba @ 553f345bbd1b26241d3c68f07b983b22ab22d8a0

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 "common.h"
 5
 6#include "gba-thread.h"
 7
 8#include <SDL.h>
 9
10struct GBASDLEvents {
11	struct GBAInputMap* bindings;
12	SDL_Joystick* joystick;
13#if SDL_VERSION_ATLEAST(2, 0, 0)
14	SDL_Window* window;
15	int fullscreen;
16	int windowUpdated;
17#endif
18};
19
20bool GBASDLInitEvents(struct GBASDLEvents*);
21void GBASDLDeinitEvents(struct GBASDLEvents*);
22
23void GBASDLHandleEvent(struct GBAThread* context, struct GBASDLEvents* sdlContext, const union SDL_Event* event);
24
25enum GBAKey GBASDLMapButtonToKey(int button);
26
27#endif