Project

General

Profile

Feature #1886

Use SDL 2 for window management, display modes, color correction, and keyboard/mouse/gamepad input

Added by skyjake about 6 years ago. Updated about 1 year ago.

Status:
In Progress
Priority:
Urgent
Assignee:
Category:
Redesign
Target version:
Start date:
2014-10-20
% Done:

90%


Description

SDL 2 has quite good support for low-level functionality that is essential to games. Particularly, it supports native input APIs like XInput on Windows, for raw device events. Using SDL 2 instead of custom code and Qt for all these things (wm, video, input) should improve robustness and reduce the maintenance burden.

In practice:
  • SDL 2 should be linked to libgui and there should be a variant of GLWindow that creates an underlying SDL_Window.
  • DisplayMode should be removed and replaced with SDL video functions.
  • Qt's OpenGL API wrappers should still be usable with an SDL-created OpenGL context (after creating a QOpenGLContext representing the previously created context).

Related issues

Related to Feature #1229: Input plugins: generate events from connected controllersRejected2003-07-09

Related to Feature #1741: Upgrade to SDL 2Closed2014-03-27

Related to Bug #778: Gamepad usability issuesProgressed2007-06-07

Related to Bug #1042: [Windows] Alt key and console activationNew2012-05-15

Related to Bug #1041: [Windows] Pressing Alt/AltGr key confuses turningNew2012-05-15

Related to Feature #1758: Separate left/right modifier keys (Shift, Alt, etc.)New2014-04-18

Related to Bug #2259: Mouse unusable on ArchLinux with Gnome / WaylandNew2017-07-23

History

#1 Updated by skyjake about 6 years ago

  • Related to Feature #1229: Input plugins: generate events from connected controllers added

#2 Updated by skyjake about 6 years ago

#3 Updated by skyjake about 6 years ago

  • Subject changed from Use SDL2 for keyboard, mouse, and joystick input to Use SDL 2 for keyboard, mouse, and joystick input

#4 Updated by skyjake about 6 years ago

  • Tags changed from Input to Input, Plugin

#5 Updated by skyjake almost 6 years ago

  • Description updated (diff)

#6 Updated by skyjake almost 6 years ago

  • Description updated (diff)

#7 Updated by skyjake almost 6 years ago

  • Related to Bug #778: Gamepad usability issues added

#8 Updated by skyjake over 5 years ago

  • Related to Bug #1042: [Windows] Alt key and console activation added

#9 Updated by skyjake over 5 years ago

  • Related to Bug #1041: [Windows] Pressing Alt/AltGr key confuses turning added

#10 Updated by danij over 5 years ago

  • Priority changed from Normal to High

#11 Updated by danij over 5 years ago

  • Assignee set to danij

#12 Updated by skyjake over 5 years ago

  • Target version changed from 42 to 2.0 – Home UI & Packages

#13 Updated by skyjake about 5 years ago

Joysticks/gamepads are already being accessed via SDL2.

#14 Updated by skyjake about 5 years ago

  • Subject changed from Use SDL 2 for keyboard, mouse, and joystick input to Input plugins that use SDL 2 for keyboard, mouse, and joystick input

#15 Updated by skyjake about 5 years ago

  • Subject changed from Input plugins that use SDL 2 for keyboard, mouse, and joystick input to Input plugin that use SDL 2 for keyboard, mouse, and joystick input

#16 Updated by skyjake about 5 years ago

  • Subject changed from Input plugin that use SDL 2 for keyboard, mouse, and joystick input to Input plugin that uses SDL 2 for keyboard, mouse, and joystick input

#17 Updated by skyjake over 4 years ago

  • Target version changed from 2.0 – Home UI & Packages to Input and game controllers

#18 Updated by skyjake over 3 years ago

  • Assignee changed from danij to skyjake
  • Priority changed from High to Urgent
  • Target version changed from Input and game controllers to 2.1 (Late 2018)

#19 Updated by skyjake over 3 years ago

  • Subject changed from Input plugin that uses SDL 2 for keyboard, mouse, and joystick input to Input plugin that uses SDL 2 for keyboard and mouse input

#20 Updated by skyjake over 3 years ago

When the game grabs key/mouse input, events should be received via SDL so that the appropriate low-level APIs are used.

UI event handling can still be done via Qt as currently.

#21 Updated by skyjake over 3 years ago

  • Subject changed from Input plugin that uses SDL 2 for keyboard and mouse input to Use SDL 2 for window management, display modes, color correction, and keyboard/mouse/gamepad input
  • Description updated (diff)
  • Category changed from Enhancement to Redesign
  • Target version changed from 2.1 (Late 2018) to Rendering

#22 Updated by skyjake over 3 years ago

  • Related to Feature #1758: Separate left/right modifier keys (Shift, Alt, etc.) added

#23 Updated by skyjake over 3 years ago

  • Related to Bug #2259: Mouse unusable on ArchLinux with Gnome / Wayland added

#24 Updated by skyjake over 2 years ago

  • Target version changed from Rendering to 3.0 (2020)

#25 Updated by skyjake over 2 years ago

  • Status changed from New to In Progress
  • % Done changed from 0 to 50

#26 Updated by skyjake over 2 years ago

I've been working on this recently, in addition to removing dependencies on Qt in the main executables. Currently debugging through a number of regressions. At least keyboard input should be much improved thanks to raw input modes.

#27 Updated by skyjake about 2 years ago

  • Target version changed from 3.0 (2020) to 2.2 (2019)

#28 Updated by skyjake over 1 year ago

  • % Done changed from 50 to 90

#29 Updated by skyjake about 1 year ago

  • Target version changed from 2.2 (2019) to 3.0 (2020)

Also available in: Atom PDF