mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-22 15:40:19 +00:00
33b772a7fa
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.
32 lines
1 KiB
Bash
Executable file
32 lines
1 KiB
Bash
Executable file
#!/usr/bin/env -S bash ../.port_include.sh
|
|
port='SDL2'
|
|
version='2.28.2'
|
|
useconfigure='true'
|
|
files=(
|
|
"https://github.com/libsdl-org/SDL/releases/download/release-${version}/SDL2-${version}.tar.gz#64b1102fa22093515b02ef33dd8739dee1ba57e9dbba6a092942b8bbed1a1c5e"
|
|
)
|
|
configopts=(
|
|
"-DCMAKE_CXX_FLAGS=-I${SERENITY_BUILD_DIR}/Root/usr/include/Services/ -I${SERENITY_BUILD_DIR}/Root/usr/include/Userland/Services/"
|
|
"-DCMAKE_TOOLCHAIN_FILE=${SERENITY_BUILD_DIR}/CMakeToolchain.txt"
|
|
"-DPULSEAUDIO=OFF"
|
|
"-DJACK=OFF"
|
|
"-DSDL_LIBSAMPLERATE=OFF" # Disabled to prevent potential collision with host libsamplerate
|
|
"-DEXTRA_LDFLAGS=-laudio;-liconv;-ldl"
|
|
)
|
|
depends=("libiconv")
|
|
|
|
configure() {
|
|
mkdir -p "${PORT_BUILD_DIR}/SDL2-${version}-build"
|
|
cd "${PORT_BUILD_DIR}/SDL2-${version}-build"
|
|
cmake "${configopts[@]}" "${PORT_BUILD_DIR}/SDL2-${version}"
|
|
}
|
|
|
|
build() {
|
|
cd "${PORT_BUILD_DIR}/SDL2-${version}-build"
|
|
make "${makeopts[@]}"
|
|
}
|
|
|
|
install() {
|
|
cd "${PORT_BUILD_DIR}/SDL2-${version}-build"
|
|
make install
|
|
}
|