Compatibility and game controller patches (#42)

* Compatibility for old CMake versions (3.0)
Compatibility for SDL Mixer 2.0.1
Basic controller support: LB, RB for flippers, A for plunger, DPAD for table bump

* Update SpaceCadetPinball/Sound.cpp

Co-authored-by: Muzychenko Andrey <33288308+k4zmu2a@users.noreply.github.com>
This commit is contained in:
MariotakuandMuzychenko Andrey authored and GitHub committed 2021-10-17 07:52:05 +03:00
1 parent a7e3503e2c
commit f56abf0596
3 files changed
+75 -5

No files matched your search

+8 -5
View File
@@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.16)
cmake_minimum_required(VERSION 3.0)
project(SpaceCadetPinball)
set(CMAKE_CXX_STANDARD 11)
@@ -191,10 +191,13 @@ set_source_files_properties(
SpaceCadetPinball/imgui_impl_sdl.cpp
PROPERTIES SKIP_PRECOMPILE_HEADERS 1
)
target_precompile_headers(SpaceCadetPinball
PUBLIC
SpaceCadetPinball/pch.h
)
if(${CMAKE_VERSION} VERSION_GREATER "3.16.0" OR ${CMAKE_VERSION} VERSION_EQUAL "3.16.0")
target_precompile_headers(SpaceCadetPinball
PUBLIC
SpaceCadetPinball/pch.h
)
endif()
target_link_libraries(SpaceCadetPinball ${SDL2_LIBRARY} ${SDL2_MIXER_LIBRARY})