mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-11-10 14:52:01 +00:00
Fix mouse buttons 4 and 5 on Linux with SDL2, at least for 2.0.9 and up
git-svn-id: https://svn.eduke32.com/eduke32@8043 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
parent
97a1dea887
commit
3b419e9d04
1 changed files with 4 additions and 3 deletions
|
@ -2060,13 +2060,14 @@ int32_t handleevents_sdlcommon(SDL_Event *ev)
|
|||
break;
|
||||
#endif
|
||||
/* Thumb buttons. */
|
||||
#if SDL_MAJOR_VERSION==1 || !defined _WIN32
|
||||
#if SDL_MAJOR_VERSION==1
|
||||
// NOTE: SDL1 does have SDL_BUTTON_X1, but that's not what is
|
||||
// generated. Neither with SDL2 on Linux. (Other OSs: not tested.)
|
||||
// generated. (Only tested on Linux and Windows.)
|
||||
case 8: j = 3; break;
|
||||
case 9: j = 6; break;
|
||||
#else
|
||||
// On SDL2/Windows, everything is as it should be.
|
||||
// On SDL2/Windows and SDL >= 2.0.?/Linux, everything is as it should be.
|
||||
// If anyone cares about old versions of SDL2 on Linux, patches welcome.
|
||||
case SDL_BUTTON_X1: j = 3; break;
|
||||
case SDL_BUTTON_X2: j = 6; break;
|
||||
#endif
|
||||
|
|
Loading…
Reference in a new issue