Update codebase to SDL 3.4.0
This commit is contained in:
@@ -38,10 +38,7 @@ struct logitech_g27_ffb_slot
|
|||||||
logitech_g27_ffb_state state = logitech_g27_ffb_state::inactive;
|
logitech_g27_ffb_state state = logitech_g27_ffb_state::inactive;
|
||||||
u64 last_update = 0;
|
u64 last_update = 0;
|
||||||
SDL_HapticEffect last_effect {};
|
SDL_HapticEffect last_effect {};
|
||||||
|
SDL_HapticEffectID effect_id = -1;
|
||||||
// TODO switch to SDL_HapticEffectID when it becomes available in a future SDL release
|
|
||||||
// Match the return of SDL_CreateHapticEffect for now
|
|
||||||
int effect_id = -1;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
struct sdl_mapping
|
struct sdl_mapping
|
||||||
|
|||||||
@@ -10,15 +10,6 @@
|
|||||||
|
|
||||||
LOG_CHANNEL(camera_log, "Camera");
|
LOG_CHANNEL(camera_log, "Camera");
|
||||||
|
|
||||||
#if !(SDL_VERSION_ATLEAST(3, 4, 0))
|
|
||||||
namespace SDL_CameraPermissionState
|
|
||||||
{
|
|
||||||
constexpr int SDL_CAMERA_PERMISSION_STATE_DENIED = -1;
|
|
||||||
constexpr int SDL_CAMERA_PERMISSION_STATE_PENDING = 0;
|
|
||||||
constexpr int SDL_CAMERA_PERMISSION_STATE_APPROVED = 1;
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
template <>
|
template <>
|
||||||
void fmt_class_string<SDL_CameraSpec>::format(std::string& out, u64 arg)
|
void fmt_class_string<SDL_CameraSpec>::format(std::string& out, u64 arg)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -102,8 +102,8 @@ bool sdl_instance::initialize_impl()
|
|||||||
set_hint(SDL_HINT_JOYSTICK_HIDAPI_PS3, "1");
|
set_hint(SDL_HINT_JOYSTICK_HIDAPI_PS3, "1");
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// Disable LG4FF driver on windows (only needed for SDL 3.4.0)
|
// Disable LG4FF driver on windows
|
||||||
#if _WIN32 && SDL_VERSION_ATLEAST(3, 4, 0)
|
#if _WIN32
|
||||||
set_hint(SDL_HINT_JOYSTICK_HIDAPI_LG4FF, "0");
|
set_hint(SDL_HINT_JOYSTICK_HIDAPI_LG4FF, "0");
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user