This adds sdl2 support if you define USE_SDL2.
The only behaviour that I implemented differently in sdl2 mode is keyboard handling; I used the new scancodes support, which means your keyboard layout is ignored and the keyboard is treated as a US keyboard.
I tested this in windows 8, recent debian, and osx 10.9.2. There are some sdl2 bugs that affect quakespasm in osx:
https://bugzilla.libsdl.org/show_bug.cgi?id=2550
https://bugzilla.libsdl.org/show_bug.cgi?id=2534
https://bugzilla.libsdl.org/show_bug.cgi?id=2479
but generally it seems to work pretty well.
Updated patch uses SDL_TEXTINPUT for console text entry and chat. This respects your keyboard layout, including shifted variants of keys.
Still using scancodes for game keys, so game keys are always in the US keyboard layout. I can change it to use keycodes to match QS's current behaviour with SDL 1.2 if you want.
The SDL2 bugs affecting OS X that I linked to are all fixed now in hg.
Steve, Kristian: Can you please review?
https://sourceforge.net/p/quakespasm/patches/22/
Steve, Kristian: Can you please review?
https://sourceforge.net/p/quakespasm/patches/22/
SDL2 support merged in v0.90.0, closing this.