From 4cc3ec9fddb82a76cea81c0704881074254a79e9 Mon Sep 17 00:00:00 2001 From: Stefano Ceccherini Date: Thu, 23 Oct 2008 08:18:48 +0000 Subject: [PATCH] Moved _joystick_info definition to JoystickTweaker.h, since there is no point to keep it public. Removed default parameter in the second version of Open(), otherwise the two functions can't be used unambiguously. Should fix bug #2904 git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28291 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- headers/os/device/Joystick.h | 19 ++----------------- headers/private/device/JoystickTweaker.h | 15 ++++++++++++++- src/kits/device/Joystick.cpp | 1 + 3 files changed, 17 insertions(+), 18 deletions(-) diff --git a/headers/os/device/Joystick.h b/headers/os/device/Joystick.h index 1c1c759562..3557e3675d 100644 --- a/headers/os/device/Joystick.h +++ b/headers/os/device/Joystick.h @@ -21,21 +21,7 @@ class BString; struct entry_ref; struct _extended_joystick; class _BJoystickTweaker; - -typedef struct _joystick_info { - char module_name[64]; - char controller_name[64]; - int16 num_axes; - int16 num_buttons; - int16 num_hats; - uint32 num_sticks; - bool calibration_enable; - bigtime_t max_latency; - BList name_axis; - BList name_hat; - BList name_button; -// BList name_ -} joystick_info; +struct _joystick_info; /* -----------------------------------------------------------------------*/ class BJoystick { @@ -44,7 +30,7 @@ public: virtual ~BJoystick(); status_t Open(const char *portName); - status_t Open(const char *portName, bool enter_enhanced = true); + status_t Open(const char *portName, bool enter_enhanced); void Close(void); status_t Update(void); @@ -84,7 +70,6 @@ virtual ~BJoystick(); /* NOTE: Buttons() are 1 == on */ uint32 ButtonValues(int32 for_stick = 0); status_t GetButtonNameAt(int32 index, BString * out_name); -/* -----------------------------------------------------------------------*/ protected: diff --git a/headers/private/device/JoystickTweaker.h b/headers/private/device/JoystickTweaker.h index bfa199ccc9..86fb334d46 100644 --- a/headers/private/device/JoystickTweaker.h +++ b/headers/private/device/JoystickTweaker.h @@ -16,7 +16,20 @@ class BJoystick; -struct _joystick_info; +typedef struct _joystick_info { + char module_name[64]; + char controller_name[64]; + int16 num_axes; + int16 num_buttons; + int16 num_hats; + uint32 num_sticks; + bool calibration_enable; + bigtime_t max_latency; + BList name_axis; + BList name_hat; + BList name_button; +// BList name_ +} joystick_info; class _BJoystickTweaker { diff --git a/src/kits/device/Joystick.cpp b/src/kits/device/Joystick.cpp index 372184c9e8..00159291c2 100644 --- a/src/kits/device/Joystick.cpp +++ b/src/kits/device/Joystick.cpp @@ -41,6 +41,7 @@ FILE *BJoystick::sLogFile = NULL; #include "JoystickTweaker.h" + BJoystick::BJoystick() : fBeBoxMode(false),