Replace the [sdl] `autolock = true/false` configuration setting with [sdl]
`capture_mouse = ...` with a two-value setting.
The first value defines how the mouse is controlled:
- onclick: The mouse will be captured with a click inside the window.
- onstart: The mouse is captured immediately on start (similar to real DOS).
- seamless: The mouse will move seamlessly in and out of DOSBox and cannot be captured.
- nomouse: The mouse is disabled and hidden without any input sent to the game.
The second value defines how middle-clicks are handled:
- middlegame: Middle-clicks are sent to the game (not used to uncapture the mouse).
- middlerelease: Middle-click will uncapture the mouse when windowed (not sent to the game).
Middle-clicks are sent to the game when fullscreen or when seamless control is set.
The default setting of "onclick middlegame" reproduces DOSBox's existing behavior.
Users who test dosbox-staging via various GUI frontends might have a
problem distinguishing if the instance they have configured is really
dosbox-staging or some other version of DOSBox. Different splash screen
is a simple remedy for it.
Two graphical files are included: one in vector format to allow for
further refinements and one converted to necessary size in png format,
that is used as direct source of logo embedded in the source code. Use
GIMP to convert the png logo to a C file.
Notes about new design:
Orange background was replaced by black to make switch to black
background of empty terminal a little less jarring.
The box side is covered with the rainbow-like pattern to resemble logos
of various computer platforms popular in the 80s. AFAIK IBM or
PC-clones never had such colourful logos, but the point is to resemble
a retro-computing platform while being aesthetically pleasing.
Some computing platforms, that used rainbow patterns are Sinclair,
Commodore, Amiga, Dragon 32, and Apple. The pattern used for
dosbox-staging splash is deliberately different from all of these.
Word "staging" is rendered using excellent Raleway font:
https://www.theleagueofmoveabletype.com/raleway
This change is not supposed to be upstreamed.
This merge had serious conflicts; some of changes could be applied, but
others needed to be removed.
- Code for new SETMODE_RESTARTS_SUBSYSTEM was removed, as it depends on
SDL 1.2 functionality (SDL_SetVideoMode) and seems rather pointless
for SDL 2.0.
- Support for setting windowresolution as a percentage was retained, but
window centering of this feature likely won't work, as it depends on
SDL 1.2 env variable SDL_VIDEO_CENTERED.
- Support for applying windowresolution as a percentage was removed, as
it was implemented purely in code removed during transition to
SDL 2.0.
Add way to restart graphics subsystem on fullscreen/windowed mode transitions in OpenGL mode (disabled by default)
Add check for pixels being valid in OpenGL to prevent direct crash when the allocation fails.
Add define to turn off Pixel Buffer Object usage. (disabled by default)
Add a way to specify the windowresolution as percentage of your current resolution. (This centers the window.)
Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@4306
There's no point in hardcoding these values - they can be different to
every user (it depends on hardware, OS, SDL version, etc).
Also, future versions of SDL might introduce more renderers, so this way
the code is more future-proof.
Otherwise users might easily miss, that this option is supposed to work
only for 'texture' output.
Also, do slight adjustments to formatting in generated .conf file.
This massive patch is based on work of NY00123, which was published on
Vogons forum in 2013 and was waiting for inclusion in SVN since then:
https://www.vogons.org/viewtopic.php?f=41&t=34770
Revision from December 2018 was used to kickstart this work. However, a
number of changes were implemented:
- Original patch preserves all SDL 1.2 code by ifdefing it; this patch
completely removes all code ifdefed for several versions of SDL 1.2.*
This way the code will be easier to maintain going forward and
features enabled by SDL 2.0 do not need to be backported.
A side-effect of this change is almost-complete removal of DirectDraw
support - but users can now use Direct3D based acceleration (without
any ifdefs in code).
- Code ifdefed for Android was removed to make the project easier to
understand and modify. Android port should still be possible, but it
requires more work (mostly CI and buildsystem work).
Android-related functionalities that were cross-platform were
preserved.
- Code ifdefed for OpenGL ES (which was only used for Android) was
removed - this should not affect Android support, as
hardware-accelerated 2D should still be viable via "texture" output,
but it was not tested, as buildsystem does not support Android ATM.
- SDL_cdrom code is not included; it was outside of scope of SDL2
changes. Inclusion of that library did not justify supporting one
small usecase (playblack of CD audio from physical CDs).
- Few code warning were fixed (but new sdl_mapper implementation
introduces many, many new warnings).
- Some formatting changes were implemented.
Overall, the original patch had ~40k lines of code - here it was
trimmed to +769,-972 (so more old code got removed than new code added).
This implementation was extensively tested on Linux and somewhat tested
on Windows 10. It fixes numerous issues (too many too list).
Testing found two small regressions:
- Starting game in fullscreen makes it impossible to switch back to
windowed mode correctly (Windows 10)
- Scaling works a bit worse, only in text mode, only in window (Linux)
This implementation introduces revised user settings in sdl section - it
is only partly compatible with settings from SDL 1.2; this is an issue,
but it will need to be addressed in a separete commit.
This removes a feature of mounting physical CD-ROMs in DOSBox.
SDL 2.0 removed SDL_cdrom from supported libraries, so to bring this
code back, either the functionality will need to be reimplemented or
SDL_cdrom code modernized for SDL 2.0, and bundled with the repo (the
same way SDL_sound is already bundled).
Cleanup before replacing SDL1.2 with SDL2.
OS/2 support was introduced in DOSBox in March 2006. OS/2 reached EOL
in December 2006.
As of 2019, OS/2 is being continued by proprietary 32-bit only ArcaOS,
although there is no official SDL2 support, despite pledges from SDL2
maintainers.
Use this to add an optional parameter to sensitivity which controls the y axis. When optional parameter is missing, x and y axis have the same value.
Change limits on sensitivity to allow for negative values so the Mouse Y-axis can be inversed. Similar to patch #276.
Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@4197