From 424032b0ca4ce2c73344b9346cf7d71e4265ca48 Mon Sep 17 00:00:00 2001 From: Chris Smith Date: Tue, 10 Jan 2023 13:45:54 +0000 Subject: [PATCH] Corrects the additon of SDLK_CONTEXT_MENU (and scancodes). --- include/SDL_config.h | 4 ++-- include/SDL_scancode.h | 2 +- src/events/SDL_keyboard.c | 2 ++ 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/include/SDL_config.h b/include/SDL_config.h index 2016382ae..4e4198f3d 100644 --- a/include/SDL_config.h +++ b/include/SDL_config.h @@ -261,8 +261,8 @@ /* #undef SDL_AUDIO_DRIVER_OSS */ /* #undef SDL_AUDIO_DRIVER_OSS_SOUNDCARD_H */ /* #undef SDL_AUDIO_DRIVER_PAUDIO */ -/* #undef SDL_AUDIO_DRIVER_PULSEAUDIO */ -/* #undef SDL_AUDIO_DRIVER_PULSEAUDIO_DYNAMIC */ +#define SDL_AUDIO_DRIVER_PULSEAUDIO 1 +#define SDL_AUDIO_DRIVER_PULSEAUDIO_DYNAMIC "libpulse-simple.so.0" /* #undef SDL_AUDIO_DRIVER_QSA */ #define SDL_AUDIO_DRIVER_SNDIO 1 /* #undef SDL_AUDIO_DRIVER_SNDIO_DYNAMIC */ diff --git a/include/SDL_scancode.h b/include/SDL_scancode.h index 43edee0a6..20c52c260 100644 --- a/include/SDL_scancode.h +++ b/include/SDL_scancode.h @@ -403,7 +403,7 @@ typedef enum /* @} *//* Usage page 0x0C (additional media keys) */ /* Add any other keys here. */ - SDL_SCANCODE_CONTEXT_MENU = 438, + SDL_SCANCODE_CONTEXT_MENU = 287, SDL_NUM_SCANCODES = 512 /**< not a key, just marks the number of scancodes for array bounds */ diff --git a/src/events/SDL_keyboard.c b/src/events/SDL_keyboard.c index e1295764e..b6123d5a8 100644 --- a/src/events/SDL_keyboard.c +++ b/src/events/SDL_keyboard.c @@ -277,6 +277,7 @@ static const SDL_Keycode SDL_default_keymap[SDL_NUM_SCANCODES] = { SDLK_APP2, SDLK_AUDIOREWIND, SDLK_AUDIOFASTFORWARD, + SDLK_CONTEXT_MENU, }; static const char *SDL_scancode_names[SDL_NUM_SCANCODES] = { @@ -513,6 +514,7 @@ static const char *SDL_scancode_names[SDL_NUM_SCANCODES] = { "App2", "AudioRewind", "AudioFastForward", + "ContextMenu", }; /* Taken from SDL_iconv() */