all repos — mgba @ 19142a288101cfe8265b332e4a51db7b379102ce

mGBA Game Boy Advance Emulator

Use command key on OS X
Jeffrey Pfau jeffrey@endrift.com
Sun, 02 Feb 2014 02:56:02 -0800
commit

19142a288101cfe8265b332e4a51db7b379102ce

parent

ad38ae63ec3615da4a9e485affe38b7371bf47ea

1 files changed, 7 insertions(+), 1 deletions(-)

jump to
M src/platform/sdl/sdl-events.csrc/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);