SDL2 support upgraded from !KNOWN BROKEN! to !EXPERIMENTAL!
#1
Everything in this post applies to the master branch, currently on track to become release 0.61. Release 0.60 is unaffected by these changes.

John filed SDL 2 (#82) a bit over 3 years ago, asking for feedback on whether to move Rebirth to SDL 2.  I added a knob to select SDL 2 that July, and zico wrote in August 2015 that he planned to add support for it.   At the time, I had no interest in working on it, and no one else committed any time, so it languished.  I recently decided I wanted access to some of the functionality that was new in SDL 2, so I made the changes to make Rebirth work with SDL 2.  As such, support is now classified as !EXPERIMENTAL!, rather than the !KNOWN BROKEN! status it had for the last 3 years (though that status was not fully communicated to readers until someone posted a comment expecting it to work, and I adjusted the messaging accordingly).

At this time, both SDL1 and SDL2 are supported. SDL1 is preferred, but active testing on SDL2 is welcome. If no major problems are reported within the next few months, SDL1 will be deprecated and SDL2 will become preferred. Depending on the maintenance burden, support for SDL1 will be dropped at some later point, likely 3-6 months after it becomes deprecated.

Notable differences:
  • Feature: Fullscreen support is now based on resizing the Rebirth window, not on changing your monitor resolution.
  • Bug: Toggling fullscreen while the automap is open does not properly resync the automap to the new dimensions (SDL2: automap does not resize when toggling fullscreen mode (#394)). This should be fixed at some point.
  • Feature: SDL2 supports grabbing the keyboard and mouse separately. For historical compatibility, I configure it to grab both, but you can override it with a hint not to grab the keyboard if you want your window manager keys to work while in game.
  • Quirk: the Graphics submenu is much smaller. Since monitor resolution no longer controls available game resolutions, monitor resolutions are not enumerated or shown. The fullscreen checkbox is removed. Use Alt+Enter to toggle fullscreen mode. The resolution list could be restored if someone has a need for it. The checkbox could be brought back if a bug related to window resizing is fixed.
  • Redbook support is gone. SDL2 removed the required functionality.
  • The SDL-only build does not work with SDL2. This could be fixed if anyone cares.
Potential improvements enabled by this change:
  • SDL2 provides easier access to advanced OpenGL support.
  • SDL2 requires a different method of configuring joysticks, but should provide better support in some areas.
  • SDL2 improves handling of newer input devices.
As a further note about OpenGL support: currently, Rebirth uses very limited GL, in part due to the age of the code and in part due to the need to make the SDL-only build work. I would appreciate feedback from anyone with older systems on the maximum OpenGL version your system can provide. I am interested in raising the minimum required version, and would like to avoid locking out users unnecessarily.
Reply
#2
Thanks for this KP, it is all working very nicely here! I will test it heavily over the next little while...
Reply
#3
(07-29-2018, 12:52 AM)Kp Wrote: As a further note about OpenGL support: currently, Rebirth uses very limited GL, in part due to the age of the code and in part due to the need to make the SDL-only build work.  I would appreciate feedback from anyone with older systems on the maximum OpenGL version your system can provide.  I am interested in raising the minimum required version, and would like to avoid locking out users unnecessarily.

From the the raspberry Pi's point of view, it could do GLES 1.1 or GLES 2.0 - but in contrast to desktop GL 2.x, GLES2 would imply to completely remove any usage of the fixed function pipeline (not that this would be a bad thing).
"Perfection is attained not when there is nothing more to add, but when there is nothing more to remove." -- Antoine de Saint Exupéry
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)