From ef1d29bf73c76bfbf06155228de2e7abf1d13c00 Mon Sep 17 00:00:00 2001 From: Laurent Gomila Date: Tue, 26 Nov 2013 22:30:51 +0100 Subject: [PATCH] Fixed joystick POV values on Windows (PovX and PovY were inverted) This reverts commit f1c30f106af0c27bb82331220716f1ab3e753d7d, which contained the wrong file, and adds the right modification. --- src/SFML/Window/Win32/JoystickImpl.cpp | 4 ++-- src/SFML/Window/Win32/WindowImplWin32.cpp | 4 ---- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/src/SFML/Window/Win32/JoystickImpl.cpp b/src/SFML/Window/Win32/JoystickImpl.cpp index c2645e8f..7f2bec2a 100644 --- a/src/SFML/Window/Win32/JoystickImpl.cpp +++ b/src/SFML/Window/Win32/JoystickImpl.cpp @@ -167,8 +167,8 @@ JoystickState JoystickImpl::update() if (pos.dwPOV != 0xFFFF) { float angle = pos.dwPOV / 18000.f * 3.141592654f; - state.axes[Joystick::PovX] = std::cos(angle) * 100; - state.axes[Joystick::PovY] = std::sin(angle) * 100; + state.axes[Joystick::PovX] = std::sin(angle) * 100; + state.axes[Joystick::PovY] = std::cos(angle) * 100; } else { diff --git a/src/SFML/Window/Win32/WindowImplWin32.cpp b/src/SFML/Window/Win32/WindowImplWin32.cpp index 06d73bd4..22830bcd 100644 --- a/src/SFML/Window/Win32/WindowImplWin32.cpp +++ b/src/SFML/Window/Win32/WindowImplWin32.cpp @@ -40,8 +40,6 @@ #include #include -#include - // MinGW lacks the definition of some Win32 constants #ifndef XBUTTON1 #define XBUTTON1 0x0001 @@ -771,8 +769,6 @@ void WindowImplWin32::processEvent(UINT message, WPARAM wParam, LPARAM lParam) //////////////////////////////////////////////////////////// Keyboard::Key WindowImplWin32::virtualKeyCodeToSF(WPARAM key, LPARAM flags) { - std::cout << "VM = " << std::hex << key << std::endl; - switch (key) { // Check the scancode to distinguish between left and right shift