all repos — mgba @ 3ee3f7625f5f60248ff2a05853bf93e8a00d9171

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