From 42b97d230fc43e616c7d8739bb7ecf537525fcc4 Mon Sep 17 00:00:00 2001 From: ceylo Date: Tue, 5 Jan 2010 18:10:29 +0000 Subject: [PATCH] Replaced GetAxesCount() with HasAxis(). git-svn-id: https://sfml.svn.sourceforge.net/svnroot/sfml/trunk@1321 4e206d99-4929-0410-ac5d-dfc041789085 --- src/SFML/Window/Cocoa/Joystick.cpp | 7 +++---- src/SFML/Window/Cocoa/Joystick.hpp | 10 ++++++---- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/src/SFML/Window/Cocoa/Joystick.cpp b/src/SFML/Window/Cocoa/Joystick.cpp index 4ade09c4d..ff2a353aa 100644 --- a/src/SFML/Window/Cocoa/Joystick.cpp +++ b/src/SFML/Window/Cocoa/Joystick.cpp @@ -55,12 +55,11 @@ JoystickState Joystick::UpdateState() //////////////////////////////////////////////////////////// -/// Get the number of axes supported by the joystick +/// Check if the joystick supports the given axis //////////////////////////////////////////////////////////// -unsigned int Joystick::GetAxesCount() const +bool Joystick::HasAxis(Joy::Axis Axis) const { - // Return number of supported axes - return 0; + return false; } diff --git a/src/SFML/Window/Cocoa/Joystick.hpp b/src/SFML/Window/Cocoa/Joystick.hpp index 425907517..60c5db243 100644 --- a/src/SFML/Window/Cocoa/Joystick.hpp +++ b/src/SFML/Window/Cocoa/Joystick.hpp @@ -58,13 +58,15 @@ public : JoystickState UpdateState(); //////////////////////////////////////////////////////////// - /// Get the number of axes supported by the joystick + /// Check if the joystick supports the given axis /// - /// \return Number of axis + /// \param Axis : Axis to check + /// + /// \return True of the axis is supported, false otherwise /// //////////////////////////////////////////////////////////// - unsigned int GetAxesCount() const; - + bool HasAxis(Joy::Axis Axis) const; + //////////////////////////////////////////////////////////// /// Get the number of buttons supported by the joystick ///