all repos — mgba @ deb278dc22f3d71c3961eeed857475f3e4af7efa

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