summaryrefslogtreecommitdiffstats
path: root/src/input_common
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/input_common/CMakeLists.txt2
-rw-r--r--src/input_common/sdl/sdl_impl.cpp10
2 files changed, 11 insertions, 1 deletions
diff --git a/src/input_common/CMakeLists.txt b/src/input_common/CMakeLists.txt
index c3cfe7efc..de53e1fda 100644
--- a/src/input_common/CMakeLists.txt
+++ b/src/input_common/CMakeLists.txt
@@ -62,7 +62,7 @@ else()
)
endif()
-if(SDL2_FOUND)
+if (ENABLE_SDL2)
target_sources(input_common PRIVATE
sdl/sdl_impl.cpp
sdl/sdl_impl.h
diff --git a/src/input_common/sdl/sdl_impl.cpp b/src/input_common/sdl/sdl_impl.cpp
index 9418e78fa..f682a6db4 100644
--- a/src/input_common/sdl/sdl_impl.cpp
+++ b/src/input_common/sdl/sdl_impl.cpp
@@ -17,7 +17,17 @@
#include <unordered_map>
#include <utility>
#include <vector>
+
+// Ignore -Wimplicit-fallthrough due to https://github.com/libsdl-org/SDL/issues/4307
+#ifdef __clang__
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wimplicit-fallthrough"
+#endif
#include <SDL.h>
+#ifdef __clang__
+#pragma clang diagnostic pop
+#endif
+
#include "common/logging/log.h"
#include "common/param_package.h"
#include "common/settings_input.h"