* Add a BJoystick::RescanDevices() public function. It allows the BJoystick

to be updated with newly plugged in devices without the need to recreate a
  BJoystick object.
* Do an initial (re-)scan on object creation instead of always scanning in
  CountDevices() and by extension GetDeviceName().
* This makes CountDevices() and GetDeviceName() stable with regards to the
  device list, so that an enumerating application doesn't suddenly get more/less
  devices than it might expect.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@41870 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Michael Lotz
2011-06-02 15:10:31 +00:00
parent a00ac73989
commit 464e0351d3
2 changed files with 25 additions and 7 deletions
+6
View File
@@ -41,6 +41,12 @@ public:
status_t GetDeviceName(int32 index, char* name,
size_t bufSize = B_OS_NAME_LENGTH);
status_t RescanDevices();
// Haiku extension. Updates the list of devices
// as enumerated by CountDevices() and
// GetDeviceName() with possibly newly plugged
// in devices.
bool EnterEnhancedMode(const entry_ref* ref = NULL);
int32 CountSticks();