1
0
Fork 0
dosbox-staging/src/hardware
Patryk Obara a06035a35e Replace SDL 1.2 with SDL 2.0
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.
2019-12-26 03:23:19 +01:00
..
mame Merge branch 'svn/trunk' 2019-10-03 23:44:48 +02:00
serialport Remove code ifdefed for OS/2 2019-12-09 16:27:11 +01:00
.gitignore Import svn:ignore props to .gitignore files 2019-09-15 20:34:57 +02:00
adlib.cpp Silence 2 switch warnings 2019-11-24 17:14:32 +01:00
adlib.h Add asserts to prevent a potential bug 2019-11-12 17:13:01 +01:00
cmos.cpp Update year and address of FSF 2019-01-25 14:09:58 +00:00
dbopl.cpp Add asserts to prevent a potential bug 2019-11-12 17:13:01 +01:00
dbopl.h Switch to a different way to calculate the table offsets. Thanks jmarsh 2019-11-11 17:23:05 +00:00
disney.cpp Update year and address of FSF 2019-01-25 14:09:58 +00:00
dma.cpp Refinements of commit 4291, so that precission can be specified as well and less fixed defines are used 2019-11-19 16:16:06 +00:00
gameblaster.cpp Fix "unused-variable" warning 2019-11-29 06:27:14 +01:00
gus.cpp Update year and address of FSF 2019-01-25 14:09:58 +00:00
hardware.cpp Fix bug 512, reported by philipp. (checking wrong variable to see if malloc was a success) 2019-09-02 16:50:30 +00:00
iohandler.cpp Make effect of I/O delay more consistent as cycles run out. Prevents flickering in NBA Jam Tournament Edition at higher cycles, and also improves automatic speed limiting in Quake. 2019-04-20 22:59:42 +00:00
ipx.cpp Pick some lowhanging fruit. (some memory leaks and unused variables) 2019-10-01 12:11:09 +00:00
ipxserver.cpp Update year and address of FSF 2019-01-25 14:09:58 +00:00
joystick.cpp Use fabsf when return value is a float. Small warning fix. 2019-10-09 20:49:21 +00:00
keyboard.cpp Implement timer 2 output on port 61h; fixes SB detection in Abaron. Also implement port 62h with timer 2 output for CGA and Hercules machine types; fixes Frank Bruno's Boxing and Math Maze. 2019-02-04 15:11:50 +00:00
Makefile.am Update automake files for mame files 2017-08-24 13:01:15 +00:00
memory.cpp Fix "misleading-indentation" warnings 2019-11-29 06:27:14 +01:00
mixer.cpp Replace SDL 1.2 with SDL 2.0 2019-12-26 03:23:19 +01:00
mpu401.cpp Ignore unrequested data in intelligent mode; fixes Roland sound in Krusty's Fun House. 2019-02-21 14:53:31 +00:00
opl.cpp Make feature checks consistent, include right header for memset, correct one off error in paging table size compare for when not using USE_FULL_TLB (jmarsh) 2019-01-28 14:26:19 +00:00
opl.h Update year and address of FSF 2019-01-25 14:09:58 +00:00
pci_bus.cpp Update year and address of FSF 2019-01-25 14:09:58 +00:00
pci_devices.h Update year and address of FSF 2019-01-25 14:09:58 +00:00
pcspeaker.cpp Use fabsf when return value is a float. Small warning fix. 2019-10-09 20:49:21 +00:00
pic.cpp Update year and address of FSF 2019-01-25 14:09:58 +00:00
sblaster.cpp Properly fix warnings about unused variable 2019-11-24 17:14:32 +01:00
tandy_sound.cpp Update year and address of FSF 2019-01-25 14:09:58 +00:00
timer.cpp Implement timer 2 output on port 61h; fixes SB detection in Abaron. Also implement port 62h with timer 2 output for CGA and Hercules machine types; fixes Frank Bruno's Boxing and Math Maze. 2019-02-04 15:11:50 +00:00
vga.cpp Update year and address of FSF 2019-01-25 14:09:58 +00:00
vga_attr.cpp Update year and address of FSF 2019-01-25 14:09:58 +00:00
vga_crtc.cpp Update year and address of FSF 2019-01-25 14:09:58 +00:00
vga_dac.cpp Update year and address of FSF 2019-01-25 14:09:58 +00:00
vga_draw.cpp Set cursor speed to the vga standard of 32 frames for a full period. Hope that this is correct for the other machines as well. Fix that frameskip would slow down the cursor blinking speed. 2019-12-10 08:25:18 +00:00
vga_gfx.cpp Update year and address of FSF 2019-01-25 14:09:58 +00:00
vga_memory.cpp Update year and address of FSF 2019-01-25 14:09:58 +00:00
vga_misc.cpp Bit 2 of video status register always set. Satisfies a strange test in Blues Brothers, thus preventing slow animations. 2019-10-03 16:35:44 +00:00
vga_other.cpp Update year and address of FSF 2019-01-25 14:09:58 +00:00
vga_paradise.cpp Update year and address of FSF 2019-01-25 14:09:58 +00:00
vga_s3.cpp Update year and address of FSF 2019-01-25 14:09:58 +00:00
vga_seq.cpp Update year and address of FSF 2019-01-25 14:09:58 +00:00
vga_tseng.cpp Update year and address of FSF 2019-01-25 14:09:58 +00:00
vga_xga.cpp Silence static analysis false-positive garbage value 2019-11-24 17:14:32 +01:00