Sdl2-branch TODO
This is the old TODO list which used to be on the sdl2-branch page. This is now deprecated; the Github milestone is tracking the things to do for sdl2-branch completion.
Contents
VideoEdit
- Hardware scaling (mostly done)
- At the time of writing, the only thing remaining here is a config file option that will force one axis to be an integer multiple of the base screen size. Fraggle (talk) 00:34, 9 November 2015 (UTC)
- Integration with chocolate-doom-setup
- If "Full screen" is selected in the "Display configuration" panel, we need to get rid of the "Screen mode" selection, because we will not change the screen mode anyway but run fullscreen in the current mode instead. Also, we should probably offer integer multiples of the original 320x200/240 resolution up to the current screen mode dimensions in the "Window size" selection. Fabian
- Ah, interesting. You do have a point here. If we make the assumption that everyone is using a TFT display nowadays, then it makes sense to always run at the native resolution of the underlying monitor (as we want to minimize blur / have as much direct control over it). Desktop screen resolution might be a good proxy for this, though we should probably look into whether we can query this information outright from SDL2's video API.
- I do think there's an argument to be made for allowing users to still manually pick their video mode. We might hide this behind a separate pop-up window, perhaps. In general it's probably best if we try to do the right thing by default and end up with a situation where users aren't making this choice. Fraggle (talk) 20:42, 9 November 2015 (UTC)
libtextscreenEdit
- All text input dialogs seem to be completely broken at present. Can't type hotkey characters to activate window buttons either.
Use the hi-res font if SDL_WINDOW_ALLOW_HIGHDPI flag is supported (ie. OS X retina display).
InputEdit
Cursor hiding, mouse grabbing
- There is currently a lot of code in i_video.c that takes care of changing the mouse cursor to become "invisible" and manually reseting its position to the screen center to capture "relative" mouse movement. This should all become unnecessary and get replaced with calls to SDL_SetRelativeMouseMode() in e.g. UpdateGrab(). Fabian
Keyboard input (SDL2 distinguishes between keyboard symbol and scan code by itself)
- I started looking at this a while back but hit something of a wall integrating the current input system with SDL2's new text input system. I really want to make sure we do this properly - I want to support eg. tablet systems that have pop-up on-screen keyboards. This means that i_video.c needs a hook function to enable the text input mode when the user is supposed to enter text (typing in the name of a save game, typing a multiplayer chat message, etc.). Fraggle (talk) 00:34, 9 November 2015 (UTC)
- Mouse wheel handling
- In SDL2, the mouse wheel is no longer a button. Instead, we should change the code to listen to SDL_MOUSEWHEEL events. Buttons 4 and 5, in turn, can now be assigned to real mouse buttons. Fabian
- Joystick stuff
the joystick handling needs some tweaking. SDL2 does not guarantee that the first joystick is index 0, nor (afaics) any guarantee that joystick indexes will be in an unbroken sequence. Instead SDL2 does tracking of hotplugged joysticks and provides a different ID (SDL_JoystickInstanceID) to applications who want to track a particular stick. On the plus side, we will get hotplugging support by finishing this porting work. (related bug). -- Jdowland (talk) 20:47, 18 March 2016 (UTC)
- I thought I'd volunteered to do this somewhere, evidently not here: anyway, for currently-undisclosed reasons I am very unlikely to get far on this, so someone else will have to do it instead. Sorry! The big decision to make, IMHO, is whether to use SDL2's joystick API or gamepad API, the latter built on top of the former, but only supporting things it knows about. [It knows about a lot of gamepads already https://hg.libsdl.org/SDL/file/e12c38730512/src/joystick/SDL_gamecontrollerdb.h], and it seems easy enough to get others added to that list in SDL2 itself. My pet controller (8bitdo sfc30) is presently unsupported. -- Jdowland (talk) 21:24, 12 April 2016 (BST)
Build systemEdit
Remove SDL 1.x required work-around in configure.ac
- It's great this is no longer needed. Is it definitely no longer needed (IIRC only some platforms redefine main). If it's really We need to remove the definition from acinclude.m4 too. Fraggle (talk) 00:34, 9 November 2015 (UTC)
Switch configure.ac chain to use pkg-config macros (i.e. require pkg-config as a build-dependency)
Non-SDL2 featuresEdit
The first release from sdl2-branch will be a new major release of Chocolate Doom; because of this, the following additional features will be included which are not strictly related to SDL2:
Real-time windowed/fullscreen mode switching (via alt+enter or other)
- Using alt+enter as the binding might be considered akin to breaking vanilla behavior, since alt+enter on vanilla doesn't do anything special. There are situations like typing a chat msg while holding alt to strafe in multiplayer which could unintentionally trigger this. Windows+enter is a safer choice. Fraggle (talk) 00:35, 19 March 2016 (UTC)
- Command line changes for consistency (bug #212)
- Inclusion of optional DLLs in Windows releases (to support Digital music packs and PNG screenshots).
Non-essential for initial releaseEdit
- PNG screenshots (from rendered texture)
- As an interim solution we can potentially keep the 1600x1200 software scale code so that we can keep doing screenshots as we currently do. Fraggle (talk) 00:34, 9 November 2015 (UTC)
- However, rendering the current screen content into an intermediate surface and save this into a file shouldn't be too hard, either. Fabian