LibWeb/Gamepad: Forward declare SDL components to fix Windows build

We have to prevent from including any SDL headers in LibWeb headers.
Otherwise there will be transitive Windows.h includes that will
re-declare some of our existing forward decls/defines in
LibCore/SocketAddressWindows.h
This commit is contained in:
ayeteadoe 2025-09-01 14:07:19 -07:00 committed by Luke Wilde
parent 5ce518f493
commit 454e6a6f7f
Notes: github-actions[bot] 2025-09-02 10:12:35 +00:00
11 changed files with 39 additions and 17 deletions

View file

@ -7,8 +7,7 @@
#pragma once
#include <LibWeb/Bindings/PlatformObject.h>
#include <SDL3/SDL_gamepad.h>
#include <SDL3/SDL_joystick.h>
#include <LibWeb/Gamepad/SDLGamepadForward.h>
namespace Web::Internals {
@ -21,9 +20,9 @@ public:
virtual ~InternalGamepad() override;
Array<SDL_GamepadButton, 15> const& buttons();
Array<SDL_GamepadAxis, 4> const& axes();
Array<SDL_GamepadAxis, 2> const& triggers();
Array<i32, 15> const& buttons();
Array<i32, 4> const& axes();
Array<i32, 2> const& triggers();
void set_button(int button, bool down);
void set_axis(int axis, short value);