1
0
mirror of https://github.com/SerenityOS/serenity synced 2024-07-03 12:28:41 +00:00
Commit Graph

56 Commits

Author SHA1 Message Date
Andrew Kaster
77e890b15e Meta+Documentation+Ports: Move from C++20 to C++23
Now that oss-fuzz is on a clang commit > the 17.x release candidates,
we can start looking at some shiny new features to enable.
2024-05-06 11:46:28 -06:00
Timothy Flynn
9af8c61b29 Ports: Update ports that depend on LibCore to depend on LibCoreMinimal
Looks like we need to be explicit for make-based ports.
2024-03-31 19:22:32 +02:00
Refrag
33b772a7fa Ports: Implement SDL2 mouse warping
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.
2024-02-20 00:20:18 +01:00
Jelle Raaijmakers
66859c8cd8 Ports/SDL2: Support ShowMessageBox before VideoInit
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.
2024-02-15 12:33:23 +01:00
Jelle Raaijmakers
055f78f528 Ports: Update SDL2 scancode mapping
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.
2024-01-14 15:06:37 -07:00
Tim Schumacher
456fd9f574 Ports: Switch to the new files syntax 2023-09-09 01:06:31 +02:00
Tim Ledbetter
c8f78066c4 Ports/SDL2: Update to version 2.28.2 2023-08-24 12:26:19 +02:00
Tim Ledbetter
3a98c48f20 Ports/SDL2: Avoid accumulation errors in resampler
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.
2023-08-10 02:45:01 +02:00
Tim Schumacher
fb4db096cb Ports: Remove the filename entry from files 2023-08-08 19:57:43 +02:00
Tim Schumacher
284fee9e77 Ports: Make files a proper array 2023-08-08 19:57:43 +02:00
Tim Schumacher
89b0a61067 Ports: Remove support for auth_types other than sha256 2023-07-10 13:08:27 +02:00
Linus Groh
8dee35065b Ports/SDL2: Implement GetWindowWMInfo 2023-07-04 19:38:24 +01:00
kleines Filmröllchen
213025f210 AK: Rename Time to Duration
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.
2023-05-24 23:18:07 +02:00
Kenneth Myhra
4c17f22735 Ports: Unbreak SDL2 by using GUI::Application::create()
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.
2023-05-06 00:08:59 +02:00
Jelle Raaijmakers
34b04271f4 Ports/SDL2: Handle window close requests correctly
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.
2023-04-26 09:37:16 +01:00
Jelle Raaijmakers
62843befca Ports/SDL2: Stop the audio client when device is closed
This ensures all threads and event loops on the audio client's side are
shut down.
2023-04-26 09:37:16 +01:00
Andreas Kling
c756e021a7 Userland: Remove "Inspector" program and related utilities
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. :^)
2023-04-25 14:48:40 +02:00
Tim Schumacher
82a152b696 LibGfx: Remove try_ prefix from bitmap creation functions
Those don't have any non-try counterpart, so we might as well just omit
it.
2023-01-26 20:24:37 +00:00
cflip
5c68ca8f48 Ports/SDL2: Update window focus event listeners
Fixes an issue where ClassiCube would get stuck on the pause menu.
2022-11-28 13:11:16 +01:00
kleines Filmröllchen
20e51025bb Ports/SDL2: Rename LibGUI Window function in accordance with 5d56756 2022-11-23 15:06:15 +01:00
cflip
f872d945c3 Ports/SDL2: Add null check to SerenitySDLWidget::paint_event
This was causing a crash when message boxes appeared before the window
painted anything.
2022-10-19 22:07:05 +02:00
Jelle Raaijmakers
09d211e08a Ports: Make SDL2 build since recent GL::create_context changes
We also directly invoke `::present` on `GLContext` instead of going
through the static method `GL::present_context`.
2022-09-17 19:38:30 +02:00
Jelle Raaijmakers
6af184b48b Ports: Support SDL_WINDOWEVENT_CLOSE in SDL2
This allows PrBoom+ to properly quit the application when closing the
main window.
2022-09-03 00:07:24 +02:00
Jelle Raaijmakers
14ece2ac90 Ports: Support "restarts" in SDL2
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.
2022-08-31 12:42:55 +01:00
Valtteri Koskivuori
adf85c719a Ports: Disable libsamplerate dependency for SDL2
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.
2022-08-28 22:54:11 +01:00
Tim Schumacher
831afe3c3d Ports/SDL2: Update to 2.24.0 2022-08-23 13:30:48 +01:00
Tim Schumacher
2e31a479c4 Ports/SDL2: Do an out-of-tree build
SDL 2.24.0 starts having include loops if we try to do an in-tree build
against its wishes, so let's not do that anymore.
2022-08-23 13:30:48 +01:00
Tim Schumacher
218e6d2f5e Ports/SDL2: Rename LibAudio connection to ConnectionToServer 2022-07-23 00:21:13 +01:00
Tim Schumacher
4cf55c4056 Ports/SDL2: Update for the recent StringView changes 2022-07-16 23:13:43 +01:00
Tim Schumacher
333429fa47 Ports/SDL2: Implement a basic keyboard focus
Some SDL applications will not process inputs that they receive without
ensuring that they have the keyboard input focus.
2022-06-10 14:21:20 +01:00
Tim Schumacher
d426c5a4b2 Ports: Format patches without numbering, commit hash or version number 2022-06-08 17:58:36 +01:00
Tim Schumacher
5a24accfa7 Ports: Update SDL2 to 2.0.22 2022-05-25 23:04:52 +01:00
Tim Schumacher
cb6a406190 Ports: Return SDL2 to upstream 2022-05-25 23:04:52 +01:00
Jelle Raaijmakers
15b0c38c0f Ports: Compile SDL2 against LibAudio 2022-04-29 18:05:42 +02:00
Tim Schumacher
418d69c0ad Ports: Fix dependencies for SDL2
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.
2021-10-16 15:36:04 -07:00
Tim Schumacher
c07f91474d Ports: Make array-like settings actual arrays
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.
2021-10-05 02:13:08 +02:00
Andrew Kaster
9dff6acc55 Ports: Use new CMakeToolchain.txt located in the build directory
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.
2021-09-15 19:04:52 +04:30
Andreas Kling
aa2e19e58f Ports: Update relocated ports
Port repos have been moved to the new SerenityPorts organization on
GitHub, to declutter the main SerenityOS organization.
2021-08-30 20:18:07 +02:00
Gunnar Beutner
fb67e99562 Ports: Fix version numbers for some of the ports 2021-04-23 16:11:48 +02:00
Panagiotis Vasilopoulos
492f7132d2 Ports: Improve consistency and quality of ports
- 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.
2021-04-20 18:20:00 +02:00
Gunnar Beutner
12ed436562 Ports: Remove auth_type for our own packages
Otherwise we'd have to update them in this repository
every time something changes.
2021-04-20 17:04:51 +02:00
Panagiotis Vasilopoulos
e45e0eeb47 Everywhere: Replace SERENITY_ROOT with SERENITY_SOURCE_DIR 2021-04-20 15:27:52 +02:00
Brendan Coles
cfad6606f0 Ports: SDL2: Use correct CMAKE_TOOLCHAIN_FILE in configopts 2021-04-16 21:49:51 +02:00
Brendan Coles
a206ab2211 Ports: Add auth_type verification to all package.sh files 2021-04-16 21:14:00 +02:00
Gunnar Beutner
594d480391 Toolchain+Ports: Move the CMake toolchain file into a subdirectory 2021-04-16 19:04:24 +02:00
Andreas Kling
52ce7ed842 Ports: Switch to new SDL2 port
I've rebased the SDL2 port on top of the latest SDL2 main branch.
This patch simply points the SDL2 port scripts to the new branch.
2021-03-27 22:57:08 +01:00
Jonathan Turner
0bf5669ba3
Meta: Get building on NixOS (#5005) 2021-01-22 17:44:05 +01:00
Jesse Buhagiar
591870c7b4 Ports: Disable JACK for SDL2 in configopts
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).
2020-02-10 13:10:51 +01:00
Emanuel Sprung
f46d80ac4f Ports: Added checksums / signature files and other fixes
* 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
2020-02-06 14:06:23 +01:00
Andreas Kling
4b8b100b83 Ports: Fix SDL2 install step
Ports using CMake already install into the right place, so we don't
need to do the usual port system DESTDIR override.
2019-12-25 23:18:08 +01:00