all repos — mgba @ 027a6f129c5b9ab016d82cbf9d515917366dc382

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