all repos — mgba @ 16608a408cd3f9df010aeef11fb7240e86f1faec

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#endif
16};
17
18int GBASDLInitEvents(struct GBASDLEvents*);
19void GBASDLDeinitEvents(struct GBASDLEvents*);
20
21void GBASDLHandleEvent(struct GBAThread* context, struct GBASDLEvents* sdlContext, const union SDL_Event* event);
22
23enum GBAKey GBASDLMapButtonToKey(int button);
24
25#endif