diff --git a/src/SFML/Window/CMakeLists.txt b/src/SFML/Window/CMakeLists.txt index 6375bb68..e1bff7d7 100644 --- a/src/SFML/Window/CMakeLists.txt +++ b/src/SFML/Window/CMakeLists.txt @@ -23,13 +23,13 @@ set(SRC ${SRCROOT}/Keyboard.cpp ${INCROOT}/Mouse.hpp ${SRCROOT}/Mouse.cpp - ${INCROOT}/Touch.hpp + ${INCROOT}/Touch.hpp ${SRCROOT}/Touch.cpp ${INCROOT}/Sensor.hpp ${SRCROOT}/Sensor.cpp ${SRCROOT}/SensorImpl.hpp ${SRCROOT}/SensorManager.cpp - ${SRCROOT}/SensorManager.hpp + ${SRCROOT}/SensorManager.hpp ${SRCROOT}/VideoMode.cpp ${INCROOT}/VideoMode.hpp ${SRCROOT}/VideoModeImpl.hpp @@ -40,7 +40,7 @@ set(SRC ${SRCROOT}/WindowImpl.hpp ${INCROOT}/WindowStyle.hpp ) -if(SFML_OPENGL_ES) +if(SFML_OPENGL_ES AND NOT SFML_OS_IOS) list(APPEND SRC ${SRCROOT}/EGLCheck.cpp) list(APPEND SRC ${SRCROOT}/EGLCheck.hpp) list(APPEND SRC ${SRCROOT}/EglContext.cpp) @@ -86,7 +86,7 @@ elseif(SFML_OS_LINUX OR SFML_OS_FREEBSD) ${SRCROOT}/Unix/GlxContext.hpp ) endif() - if(SFML_OS_LINUX) + if(SFML_OS_LINUX) set(PLATFORM_SRC ${PLATFORM_SRC} ${SRCROOT}/Unix/JoystickImpl.cpp @@ -98,9 +98,9 @@ elseif(SFML_OS_LINUX OR SFML_OS_FREEBSD) ${SRCROOT}/FreeBSD/JoystickImpl.cpp ${SRCROOT}/FreeBSD/JoystickImpl.hpp ) - endif() + endif() source_group("unix" FILES ${PLATFORM_SRC}) -elseif(SFML_OS_MACOSX) +elseif(SFML_OS_MACOSX) set(PLATFORM_SRC ${SRCROOT}/OSX/cpp_objc_conversion.h ${SRCROOT}/OSX/cpp_objc_conversion.mm @@ -178,7 +178,7 @@ elseif(SFML_OS_ANDROID) ) source_group("android" FILES ${PLATFORM_SRC}) endif() - + # find external libraries if(SFML_OS_LINUX OR SFML_OS_FREEBSD) find_package(X11 REQUIRED) @@ -186,7 +186,7 @@ if(SFML_OS_LINUX OR SFML_OS_FREEBSD) message(FATAL_ERROR "Xrandr library not found") endif() include_directories(${X11_INCLUDE_DIR}) -endif() +endif() if(NOT SFML_OPENGL_ES) find_package(OpenGL REQUIRED) include_directories(${OPENGL_INCLUDE_DIR}) @@ -208,21 +208,21 @@ if(SFML_OPENGL_ES AND SFML_OS_LINUX) find_package(GLES REQUIRED) include_directories(${EGL_INCLUDE_DIR} ${GLES_INCLUDE_DIR}) endif() - -# build the list of external libraries to link + +# build the list of external libraries to link if(SFML_OS_WINDOWS) list(APPEND WINDOW_EXT_LIBS winmm gdi32) elseif(SFML_OS_LINUX OR SFML_OS_FREEBSD) list(APPEND WINDOW_EXT_LIBS ${X11_X11_LIB} ${X11_Xrandr_LIB} ${UDEV_LIBRARIES}) if(SFML_OS_FREEBSD) list(APPEND WINDOW_EXT_LIBS usbhid) - endif() + endif() elseif(SFML_OS_MACOSX) list(APPEND WINDOW_EXT_LIBS "-framework Foundation -framework AppKit -framework IOKit -framework Carbon") -elseif(SFML_OS_IOS) +elseif(SFML_OS_IOS) list(APPEND WINDOW_EXT_LIBS "-framework Foundation -framework UIKit -framework CoreGraphics -framework QuartzCore -framework CoreMotion") elseif(SFML_OS_ANDROID) - list(APPEND WINDOW_EXT_LIBS "-landroid") + list(APPEND WINDOW_EXT_LIBS "-landroid") endif() if(SFML_OPENGL_ES) if(SFML_OS_LINUX) diff --git a/src/SFML/Window/iOS/JoystickImpl.hpp b/src/SFML/Window/iOS/JoystickImpl.hpp index 3114527b..460b6e70 100644 --- a/src/SFML/Window/iOS/JoystickImpl.hpp +++ b/src/SFML/Window/iOS/JoystickImpl.hpp @@ -96,13 +96,6 @@ public : /// //////////////////////////////////////////////////////////// JoystickState update(); - -private : - - //////////////////////////////////////////////////////////// - // Member data - //////////////////////////////////////////////////////////// - int m_index; ///< Index of the joystick }; } // namespace priv diff --git a/src/SFML/Window/iOS/SensorImpl.mm b/src/SFML/Window/iOS/SensorImpl.mm index dd923fab..1278ee1d 100644 --- a/src/SFML/Window/iOS/SensorImpl.mm +++ b/src/SFML/Window/iOS/SensorImpl.mm @@ -26,6 +26,7 @@ // Headers //////////////////////////////////////////////////////////// #include +#include namespace @@ -186,7 +187,7 @@ void SensorImpl::setEnabled(bool enabled) if (enabled == m_enabled) return; - switch (index) + switch (m_sensor) { case Sensor::Accelerometer: if (enabled)