dingusppc/devices/video
Mihai Parparita 1f7edfdb3b Make Emscripten build not depend on SDL2 or cubeb
While Emscripten has an SDL compabtility layer, it assumes that the
code is executing in the main browser process (and thus has access to
them DOM). The Infinite Mac project runs emulators in a worker thread
(for better performance) and has a custom API for the display, sound,
input, etc. Similarly, it does not need the cross-platform sound support
from cubeb, there there is a sound API as well.

This commit makes SDL (*_sdl.cpp) and cubeb-based (*_cubeb.cpp) code be
skipped when targeting Emscripten, and instead *_js.cpp files are used
instead (this is the cross-platform convention used by Chromium[^1], and
could be extended for other targets).

For hostevents.cpp and soundserver.cpp the entire file was replaced,
whereas for videoctrl.cpp there was enough shared logic that it was
kept, and the platform-specific bits were moved behind a Display class
that can have per-platform implementations. For cases where we need
additional private fields in the platform-specific classes, we use
a PIMPL pattern.

The *_js.cpp files with implementations are not included in this
commit, since they are closely tied to the Infinite Mac project, and
will live in its fork of DingusPPC.

[^1]: https://www.chromium.org/developers/design-documents/conventions-and-patterns-for-multi-platform-development/
2023-10-25 22:25:53 -07:00
..
atimach64defs.h Convert ATI register offsets to DWORD format. 2023-04-11 01:25:00 +02:00
atimach64gx.cpp atimach64gx: use new refresh task control. 2023-07-31 03:52:17 +02:00
atimach64gx.h Refactor ATI Mach64 GX emulation. 2023-04-10 22:19:55 +02:00
atirage.cpp atirage: return meaningful value for GUI_STAT:GUI_FIFO. 2023-10-10 02:31:09 +02:00
atirage.h atirage: return meaningful value for GUI_STAT:GUI_FIFO. 2023-10-10 02:31:09 +02:00
control.cpp control: use new refresh task control. 2023-07-31 03:53:13 +02:00
control.h Add BAR 0 to control. 2023-01-11 00:05:23 -08:00
display_sdl.cpp Make Emscripten build not depend on SDL2 or cubeb 2023-10-25 22:25:53 -07:00
display.h Make Emscripten build not depend on SDL2 or cubeb 2023-10-25 22:25:53 -07:00
displayid.cpp displayid: prevent reading past EDID data. 2023-10-03 00:42:03 +02:00
displayid.h displayid: prevent reading past EDID data. 2023-10-03 00:42:03 +02:00
pdmonboard.cpp pdmonboard: switch to mmu_map_dma_mem. 2023-10-02 15:00:12 +02:00
pdmonboard.h pdmonboard: switch to new video controller API. 2023-08-01 17:41:02 +02:00
rgb514defs.h ATI Mach64 GX controller emulation. 2022-05-21 14:51:27 +02:00
videoctrl.cpp Make Emscripten build not depend on SDL2 or cubeb 2023-10-25 22:25:53 -07:00
videoctrl.h Make Emscripten build not depend on SDL2 or cubeb 2023-10-25 22:25:53 -07:00