cmake: this patch for c89 is no longer required

This commit is contained in:
rafal1137 2024-11-23 00:43:53 +01:00
parent 6cba0b8f66
commit 5458e38ea4
2 changed files with 0 additions and 21 deletions

View file

@ -960,21 +960,12 @@ if(BUNDLED_SDL AND BUILD_CLIENT)
list(APPEND SDL_CMAKE_ARGS -DSDL_FORCE_STATIC_VCRT=ON)
endif()
# In the current version (2.26.4) there are files that do not conform to ansi c89 so patch them
if (UNIX AND NOT APPLE)
find_package(Patch REQUIRED)
set(SDL_PATCH_COMMAND "${Patch_EXECUTABLE}" -p0 < "${CMAKE_CURRENT_LIST_DIR}/patches/sdl-2.26.4.c89.patch")
else()
set(SDL_PATCH_COMMAND)
endif()
etl_find_lib_path(SDL2_BUNDLED_LIBRARIES _SDL_OUTPUT)
ExternalProject_Add(bundled_sdl
URL https://github.com/libsdl-org/SDL/releases/download/release-2.30.9/SDL2-2.30.9.tar.gz
URL_HASH MD5=57393a5e1a46dd19ae40968a301c70a3
PREFIX ${LIBS_BINARY_DIR}/sdl2
PATCH_COMMAND ${SDL_PATCH_COMMAND}
BUILD_BYPRODUCTS ${_SDL_OUTPUT}
CMAKE_ARGS ${SDL_CMAKE_ARGS}
)

View file

@ -1,12 +0,0 @@
--- src/video/wayland/SDL_waylandevents.c 2023-03-12 11:34:57.705357013 +0000
+++ src/video/wayland/SDL_waylandevents.c 2023-03-12 11:35:02.320769000 +0000
@@ -1129,7 +1129,8 @@
const SDL_Scancode scancode = Wayland_get_scancode_from_key(input, *key + 8);
if (scancode != SDL_SCANCODE_UNKNOWN) {
- for (uint32_t i = 0; i < sizeof mod_scancodes / sizeof *mod_scancodes; ++i) {
+ uint32_t i;
+ for (i = 0; i < sizeof mod_scancodes / sizeof *mod_scancodes; ++i) {
if (mod_scancodes[i] == scancode) {
SDL_SendKeyboardKey(SDL_PRESSED, scancode);
break;