* Cleanup.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@33451 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -52,17 +52,17 @@
|
|||||||
fFunctionDepth++;
|
fFunctionDepth++;
|
||||||
fPrepend.Append(' ', fFunctionDepth * 2);
|
fPrepend.Append(' ', fFunctionDepth * 2);
|
||||||
fFunctionName << className << "::" << functionName << "()";
|
fFunctionName << className << "::" << functionName << "()";
|
||||||
|
|
||||||
debug_printf("%p -> %s%s {\n", fPointer, fPrepend.String(),
|
debug_printf("%p -> %s%s {\n", fPointer, fPrepend.String(),
|
||||||
fFunctionName.String());
|
fFunctionName.String());
|
||||||
}
|
}
|
||||||
|
|
||||||
~FunctionTracer()
|
~FunctionTracer()
|
||||||
{
|
{
|
||||||
debug_printf("%p -> %s}\n", fPointer, fPrepend.String());
|
debug_printf("%p -> %s}\n", fPointer, fPrepend.String());
|
||||||
fFunctionDepth--;
|
fFunctionDepth--;
|
||||||
}
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
BString fFunctionName;
|
BString fFunctionName;
|
||||||
BString fPrepend;
|
BString fPrepend;
|
||||||
@@ -319,7 +319,7 @@ MouseDevice::_BuildShortName() const
|
|||||||
} else {
|
} else {
|
||||||
if (string.FindFirst("intelli") >= 0)
|
if (string.FindFirst("intelli") >= 0)
|
||||||
name.Prepend("Extended ");
|
name.Prepend("Extended ");
|
||||||
|
|
||||||
name << " Mouse ";
|
name << " Mouse ";
|
||||||
}
|
}
|
||||||
name << index;
|
name << index;
|
||||||
@@ -357,7 +357,7 @@ MouseDevice::_ControlThread()
|
|||||||
fIsTouchpad = true;
|
fIsTouchpad = true;
|
||||||
|
|
||||||
fTouchpadSettings = kDefaultTouchpadSettings;
|
fTouchpadSettings = kDefaultTouchpadSettings;
|
||||||
|
|
||||||
BPath path;
|
BPath path;
|
||||||
status_t status = _GetTouchpadSettingsPath(path);
|
status_t status = _GetTouchpadSettingsPath(path);
|
||||||
BFile settingsFile(path.Path(), B_READ_ONLY);
|
BFile settingsFile(path.Path(), B_READ_ONLY);
|
||||||
@@ -402,7 +402,7 @@ MouseDevice::_ControlThread()
|
|||||||
fUpdateSettings = false;
|
fUpdateSettings = false;
|
||||||
if (fIsTouchpad) {
|
if (fIsTouchpad) {
|
||||||
BAutolock _(fTouchpadSettingsLock);
|
BAutolock _(fTouchpadSettingsLock);
|
||||||
if (fTouchpadSettingsMessage) {
|
if (fTouchpadSettingsMessage != NULL) {
|
||||||
_ReadTouchpadSettingsMsg(fTouchpadSettingsMessage);
|
_ReadTouchpadSettingsMsg(fTouchpadSettingsMessage);
|
||||||
_UpdateTouchpadSettings();
|
_UpdateTouchpadSettings();
|
||||||
delete fTouchpadSettingsMessage;
|
delete fTouchpadSettingsMessage;
|
||||||
@@ -460,8 +460,10 @@ MouseDevice::_ControlThread()
|
|||||||
continue;
|
continue;
|
||||||
|
|
||||||
if (message->AddInt64("when", movements.timestamp) == B_OK
|
if (message->AddInt64("when", movements.timestamp) == B_OK
|
||||||
&& message->AddFloat("be:wheel_delta_x", movements.wheel_xdelta) == B_OK
|
&& message->AddFloat("be:wheel_delta_x",
|
||||||
&& message->AddFloat("be:wheel_delta_y", movements.wheel_ydelta) == B_OK)
|
movements.wheel_xdelta) == B_OK
|
||||||
|
&& message->AddFloat("be:wheel_delta_y",
|
||||||
|
movements.wheel_ydelta) == B_OK)
|
||||||
fTarget.EnqueueMessage(message);
|
fTarget.EnqueueMessage(message);
|
||||||
else
|
else
|
||||||
delete message;
|
delete message;
|
||||||
@@ -546,22 +548,22 @@ MouseDevice::_GetTouchpadSettingsPath(BPath& path)
|
|||||||
status_t
|
status_t
|
||||||
MouseDevice::_ReadTouchpadSettingsMsg(BMessage* message)
|
MouseDevice::_ReadTouchpadSettingsMsg(BMessage* message)
|
||||||
{
|
{
|
||||||
message->FindBool("scroll_twofinger",
|
message->FindBool("scroll_twofinger", &fTouchpadSettings.scroll_twofinger);
|
||||||
&(fTouchpadSettings.scroll_twofinger));
|
|
||||||
message->FindBool("scroll_multifinger",
|
message->FindBool("scroll_multifinger",
|
||||||
&(fTouchpadSettings.scroll_multifinger));
|
&fTouchpadSettings.scroll_multifinger);
|
||||||
message->FindFloat("scroll_rightrange",
|
message->FindFloat("scroll_rightrange",
|
||||||
&(fTouchpadSettings.scroll_rightrange));
|
&fTouchpadSettings.scroll_rightrange);
|
||||||
message->FindFloat("scroll_bottomrange",
|
message->FindFloat("scroll_bottomrange",
|
||||||
&(fTouchpadSettings.scroll_bottomrange));
|
&fTouchpadSettings.scroll_bottomrange);
|
||||||
|
|
||||||
message->FindInt16("scroll_xstepsize",
|
message->FindInt16("scroll_xstepsize",
|
||||||
(int16*)&(fTouchpadSettings.scroll_xstepsize));
|
(int16*)&fTouchpadSettings.scroll_xstepsize);
|
||||||
message->FindInt16("scroll_ystepsize",
|
message->FindInt16("scroll_ystepsize",
|
||||||
(int16*)&(fTouchpadSettings.scroll_ystepsize));
|
(int16*)&fTouchpadSettings.scroll_ystepsize);
|
||||||
message->FindInt8("scroll_acceleration",
|
message->FindInt8("scroll_acceleration",
|
||||||
(int8*)&(fTouchpadSettings.scroll_acceleration));
|
(int8*)&fTouchpadSettings.scroll_acceleration);
|
||||||
message->FindInt8("tapgesture_sensibility",
|
message->FindInt8("tapgesture_sensibility",
|
||||||
(int8*)&(fTouchpadSettings.tapgesture_sensibility));
|
(int8*)&fTouchpadSettings.tapgesture_sensibility);
|
||||||
|
|
||||||
return B_OK;
|
return B_OK;
|
||||||
}
|
}
|
||||||
@@ -861,6 +863,3 @@ MouseInputDevice::_RemoveDevice(const char* path)
|
|||||||
|
|
||||||
return B_OK;
|
return B_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user