Use command key on OS X
Jeffrey Pfau jeffrey@endrift.com
Sun, 02 Feb 2014 02:56:02 -0800
1 files changed,
7 insertions(+),
1 deletions(-)
jump to
M
src/platform/sdl/sdl-events.c
→
src/platform/sdl/sdl-events.c
@@ -5,6 +5,12 @@ #include "gba-io.h"
#include "gba-serialize.h" #include "gba-video.h" +#if SDL_VERSION_ATLEAST(2, 0, 0) && defined(__APPLE__) +#define GUI_MOD KMOD_GUI +#else +#define GUI_MOD KMOD_CTRL +#endif + int GBASDLInitEvents(struct GBASDLEvents* context) { if (SDL_InitSubSystem(SDL_INIT_JOYSTICK) < 0) { return 0;@@ -79,7 +85,7 @@ GBAThreadUnpause(context);
} default: if (event->type == SDL_KEYDOWN) { - if (event->keysym.mod & KMOD_CTRL) { + if (event->keysym.mod & GUI_MOD) { switch (event->keysym.sym) { case SDLK_p: GBAThreadTogglePause(context);