2 * Copyright 2008, Haiku, Inc.
3 * Distributed under the terms of the MIT License.
9 #include <joystick_driver.h>
19 #define DEVICE_BASE_PATH "/dev/joystick/"
20 #define JOYSTICK_CONFIG_BASE_PATH "/boot/home/config/settings/joysticks/"
21 // TODO: this should use find_directory() instead and it should take
22 // common/system into account as well
26 typedef struct _joystick_info
{
27 joystick_module_info module_info
;
28 bool calibration_enable
;
29 bigtime_t max_latency
;
36 class _BJoystickTweaker
{
39 _BJoystickTweaker(BJoystick
&stick
);
40 virtual ~_BJoystickTweaker();
41 status_t
SendIOCT(uint32 op
);
42 status_t
GetInfo(_joystick_info
* info
, const char *ref
);
44 // BeOS R5's joystick pref need these
45 status_t
save_config(const entry_ref
*ref
= NULL
);
46 void scan_including_disabled();
50 void _BuildFromJoystickDesc(char *string
,
51 _joystick_info
*info
);
52 status_t
_ScanIncludingDisabled(const char *rootPath
,
53 BList
*list
, BEntry
*rootEntry
= NULL
);
55 void _EmpyList(BList
*list
);
57 BJoystick
* fJoystick
;
60 static FILE * sLogFile
;