wacom: start node monitor earlier
Should fix #16003 but I don't have the hardware to test. Change-Id: I0e6c0df7b66adf72e35e4afa272cd907427a9427 Reviewed-on: https://review.haiku-os.org/c/haiku/+/2714 Reviewed-by: waddlesplash <[email protected]>
This commit is contained in:
committed by
waddlesplash
parent
ec43e4f4c2
commit
785518beef
@@ -52,7 +52,21 @@ MasterServerDevice::MasterServerDevice()
|
|||||||
get_mouse_acceleration(&fAcceleration);
|
get_mouse_acceleration(&fAcceleration);
|
||||||
get_click_speed(&fDblClickSpeed);
|
get_click_speed(&fDblClickSpeed);
|
||||||
_CalculateAccelerationTable();
|
_CalculateAccelerationTable();
|
||||||
_SearchDevices();
|
|
||||||
|
if (_LockDevices()) {
|
||||||
|
// do an initial scan of the devfs folder, after that, we should receive
|
||||||
|
// node monitor messages for hotplugging support
|
||||||
|
_SearchDevices();
|
||||||
|
|
||||||
|
fActive = true;
|
||||||
|
|
||||||
|
for (int32 i = 0; PointingDevice* device = (PointingDevice*)fDevices.ItemAt(i); i++) {
|
||||||
|
device->Start();
|
||||||
|
}
|
||||||
|
_UnlockDevices();
|
||||||
|
}
|
||||||
|
|
||||||
|
StartMonitoringDevice(kWatchFolder);
|
||||||
}
|
}
|
||||||
|
|
||||||
// destructor
|
// destructor
|
||||||
@@ -96,23 +110,10 @@ MasterServerDevice::SystemShuttingDown()
|
|||||||
status_t
|
status_t
|
||||||
MasterServerDevice::Start(const char* device, void* cookie)
|
MasterServerDevice::Start(const char* device, void* cookie)
|
||||||
{
|
{
|
||||||
if (_LockDevices()) {
|
|
||||||
// do an initial scan of the devfs folder, after that, we should receive
|
|
||||||
// node monitor messages for hotplugging support
|
|
||||||
_SearchDevices();
|
|
||||||
|
|
||||||
fActive = true;
|
|
||||||
|
|
||||||
for (int32 i = 0; PointingDevice* device = (PointingDevice*)fDevices.ItemAt(i); i++) {
|
|
||||||
device->Start();
|
|
||||||
}
|
|
||||||
_UnlockDevices();
|
|
||||||
}
|
|
||||||
|
|
||||||
// TODO: make this configurable
|
// TODO: make this configurable
|
||||||
// _StartPS2DisablerThread();
|
// _StartPS2DisablerThread();
|
||||||
|
|
||||||
return StartMonitoringDevice(kWatchFolder);
|
return B_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Stop
|
// Stop
|
||||||
@@ -214,7 +215,7 @@ MasterServerDevice::_AddDevice(const char* path)
|
|||||||
// start device polling only if we're started
|
// start device polling only if we're started
|
||||||
if (fActive)
|
if (fActive)
|
||||||
device->Start();
|
device->Start();
|
||||||
input_device_ref device = { (char *)"Wacom Tablets",
|
input_device_ref device = { (char *)"Wacom Tablet",
|
||||||
B_POINTING_DEVICE, (void*)this };
|
B_POINTING_DEVICE, (void*)this };
|
||||||
input_device_ref* deviceList[2] = { &device, NULL };
|
input_device_ref* deviceList[2] = { &device, NULL };
|
||||||
RegisterDevices(deviceList);
|
RegisterDevices(deviceList);
|
||||||
|
|||||||
Reference in New Issue
Block a user