This patch implements the mouse warping functionality of SDL2.
This adds a WarpMouse function implementation to the SDL2 port.
SDL2 will then be able to use this for it's relative mouse mode
implementation.
With this, multiple ports depending on SDL2 now correctly lock the
mouse inside the window and it improves the experience significantly.
Note that as of now, you may need to pass the kernel argument
'vmmouse=off' in order to test these changes properly.
An SDL2 application is allowed to show a message box before the video
subsystem is initialized. This change makes sure GUI::Application is
initialized.
An example of this is SRB2: the process forks itself to let the child
process install itself as the signal handler and deal with errors. This
child process could try to show a message box long after the video
subsystem was initialized, but since it is a forked process there is no
static state for GUI::Application or the connection to the window
server and the process would crash because of a null dereference.
This was broken since c8f27d7cb8 introduced a new enum value in
between existing values. Since the Serenity platform support in SDL2
relied on a sequential array index, a lot of keys were now incorrectly
mapped.
This introduces a new way to map Serenity `KeyCode` to SDL2's scancode
constants that is less prone to breaking in the future.
This adds a patch to the SDL2 port to fix a segfault which occurs in
the resampler.
Taken from this upstream commit:
https://github.com/libsdl-org/SDL/commit/78f9710
This fixes a crash we were seeing in the julius port.
That's what this class really is; in fact that's what the first line of
the comment says it is.
This commit does not rename the main files, since those will contain
other time-related classes in a little bit.
Commit 1a97382 introduced the fallible GUI::Application::create() and
removed GUI::Application::construct() breaking the SDL2 port, let's
update it to use the fallible version.
We were going about this the wrong way:
* We should not send `SDL_QUIT` events; SDL2 is doing this for us
already when the last window is closed, for example.
* The `SDL_WINDOWEVENT_CLOSE` event does not represent a closed window,
but rather a _request_ from the window manager to close a window.
This resolves the issue with the PrBoom+ port where the quit screen
would not be shown when trying to close the main window.
This program has never lived up to its original idea, and has been
broken for years (property editing, etc). It's also unmaintained and
off-by-default since forever.
At this point, Inspector is more of a maintenance burden than a feature,
so this commit removes it from the system, along with the mechanism in
Core::EventLoop that enables it.
If we decide we want the feature again in the future, it can be
reimplemented better. :^)
SDL2 applications are prone to reinitializing the SDL components when,
for example, changing the display resolution. This would lead to
crashes since we were doing things in the wrong order.
* We now decouple `GLContext` from `SDL_Window` a bit more, allowing
the window to be destroyed before the GLContext.
* Do not quit the `GUI::Application`, let our event loop handle exiting
These changes allow changing the display resolution in the Quake3 port.
On Arch Linux, the build was picking up the system libsamplerate, which
is undesirable. Unlikely that it is needed on Serenity, so disabling it
is a good workaround.
We are doing nonstandard stuff with our headers, so SDL assumed that
both iconv and dlopen are available inside LibC, which they aren't.
Fix that by adding a dependency on libiconv and adding additional
linker flags.
We may need entries with spaces in makeopts, installopts, and
configopts, and at that point we should also convert depends and
auth_opts to avoid confusion.
Now that we're generating the CMake toolchain file in the build
directory, we need to redirect the ports that use CMake to the new
location. Looking into this showed that there's still a bunch of work to
do in general to make the ports agnostic to which toolchain they're
using, there's a lot of hard-coded ${ARCH}-pc-serenity-gcc assumptions
still here.
- Replaced /Root with
- Improved documentation.
- Removed a few typos.
- Replaced with
- Added brackets in some cases.
Most of the changes were reviewed and applied manually.
This is causing build errors for myself and a few other people.
This config option disables the SDL2 port from trying to compile
with the JACK audio server (which we don't need).
* Use ${version} instead of explicit version numbers in urls/filenames
* Move -L option to port script, as this is always good
* Fix some various other stuff
Ports/.port_include.sh, Toolchain/BuildIt.sh, Toolchain/UseIt.sh
have been left largely untouched due to use of Bash-exclusive
functions and variables such as $BASH_SOURCE, pushd and popd.