mirror of
https://github.com/RGBCube/serenity
synced 2025-07-28 09:57:36 +00:00
Ports: Add VVVVVV port
Co-Authored-By: Tim Schumacher <timschumi@gmx.de> (thanks for the line ending and assert() troubleshooting)
This commit is contained in:
parent
2a45d30302
commit
51315c0b1d
6 changed files with 204 additions and 0 deletions
32
Ports/VVVVVV/patches/ReadMe.md
Normal file
32
Ports/VVVVVV/patches/ReadMe.md
Normal file
|
@ -0,0 +1,32 @@
|
|||
# Patches for VVVVVV on SerenityOS
|
||||
|
||||
## `0001-Change-C-standard-to-C99.patch`
|
||||
|
||||
Change C standard to C99
|
||||
|
||||
The originally-set C90 doesn't support the `inline` keyword, causing
|
||||
weird compile errors because isalnum() and other functions under
|
||||
ctype.h are actually #define'd as inline.
|
||||
|
||||
## `0002-Add-SerenityOS-in-platform-specific-defines.patch`
|
||||
|
||||
Add SerenityOS in platform-specific defines
|
||||
|
||||
|
||||
## `0003-Defer-sound-system-initialization-until-main.patch`
|
||||
|
||||
Defer sound system initialization until main()
|
||||
|
||||
The original VVVVVV source code initializes the sound subsystem
|
||||
during global variable initialization. Technically speaking, the
|
||||
order of initialization of global variables is unspecified. This
|
||||
results in SerenityOS's dynamic linker to call Mix_OpenAudio()
|
||||
(which uses EventLoop under the hood) before all global variable
|
||||
initializers finish executing, resulting in an inconsistent state
|
||||
that causes assertion failure.
|
||||
|
||||
This patch moves initialization of the culprit sound system to
|
||||
a separate method, which is called first thing inside main(), thus
|
||||
preventing the setup from happening during musicclass's initialization
|
||||
in the global scope, which causes the aforementioned crash.
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue