added error outputs
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8741 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
30585c9757
commit
1e4e105d82
@ -71,11 +71,16 @@ MouseSettings::RetrieveSettings()
|
|||||||
{
|
{
|
||||||
// retrieve current values
|
// retrieve current values
|
||||||
|
|
||||||
get_mouse_map(&fSettings.map);
|
if (get_mouse_map(&fSettings.map)!=B_OK)
|
||||||
get_click_speed(&fSettings.click_speed);
|
fprintf(stderr, "error when get_mouse_map\n");
|
||||||
get_mouse_speed(&fSettings.accel.speed);
|
if (get_click_speed(&fSettings.click_speed)!=B_OK)
|
||||||
get_mouse_acceleration(&fSettings.accel.accel_factor);
|
fprintf(stderr, "error when get_click_speed\n");
|
||||||
get_mouse_type(&fSettings.type);
|
if (get_mouse_speed(&fSettings.accel.speed)!=B_OK)
|
||||||
|
fprintf(stderr, "error when get_mouse_speed\n");
|
||||||
|
if (get_mouse_acceleration(&fSettings.accel.accel_factor)!=B_OK)
|
||||||
|
fprintf(stderr, "error when get_mouse_acceleration\n");
|
||||||
|
if (get_mouse_type(&fSettings.type)!=B_OK)
|
||||||
|
fprintf(stderr, "error when get_mouse_type\n");
|
||||||
|
|
||||||
fMode = mouse_mode();
|
fMode = mouse_mode();
|
||||||
|
|
||||||
@ -131,8 +136,6 @@ MouseSettings::SaveSettings()
|
|||||||
|
|
||||||
file.WriteAt(kOffset, &fWindowPosition, sizeof(BPoint));
|
file.WriteAt(kOffset, &fWindowPosition, sizeof(BPoint));
|
||||||
|
|
||||||
// who is responsible for saving the mouse mode?
|
|
||||||
|
|
||||||
return B_OK;
|
return B_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -217,6 +220,8 @@ MouseSettings::SetMouseType(int32 type)
|
|||||||
{
|
{
|
||||||
if (set_mouse_type(type) == B_OK)
|
if (set_mouse_type(type) == B_OK)
|
||||||
fSettings.type = type;
|
fSettings.type = type;
|
||||||
|
else
|
||||||
|
fprintf(stderr, "error when set_mouse_type\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -235,6 +240,8 @@ MouseSettings::SetClickSpeed(bigtime_t clickSpeed)
|
|||||||
|
|
||||||
if (set_click_speed(clickSpeed) == B_OK)
|
if (set_click_speed(clickSpeed) == B_OK)
|
||||||
fSettings.click_speed = clickSpeed;
|
fSettings.click_speed = clickSpeed;
|
||||||
|
else
|
||||||
|
fprintf(stderr, "error when set_click_speed\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -243,6 +250,8 @@ MouseSettings::SetMouseSpeed(int32 speed)
|
|||||||
{
|
{
|
||||||
if (set_mouse_speed(speed) == B_OK)
|
if (set_mouse_speed(speed) == B_OK)
|
||||||
fSettings.accel.speed = speed;
|
fSettings.accel.speed = speed;
|
||||||
|
else
|
||||||
|
fprintf(stderr, "error when set_mouse_speed\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -251,6 +260,8 @@ MouseSettings::SetAccelerationFactor(int32 factor)
|
|||||||
{
|
{
|
||||||
if (set_mouse_acceleration(factor) == B_OK)
|
if (set_mouse_acceleration(factor) == B_OK)
|
||||||
fSettings.accel.accel_factor = factor;
|
fSettings.accel.accel_factor = factor;
|
||||||
|
else
|
||||||
|
fprintf(stderr, "error when set_mouse_acceleration\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -272,8 +283,8 @@ void
|
|||||||
MouseSettings::SetMapping(int32 index, uint32 button)
|
MouseSettings::SetMapping(int32 index, uint32 button)
|
||||||
{
|
{
|
||||||
fSettings.map.button[index] = button;
|
fSettings.map.button[index] = button;
|
||||||
if (set_mouse_map(&fSettings.map) != B_OK) // message better for syslog?
|
if (set_mouse_map(&fSettings.map) != B_OK)
|
||||||
fprintf(stderr, "could not set mouse mapping\n");
|
fprintf(stderr, "error when set_mouse_map\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -282,6 +293,8 @@ MouseSettings::SetMapping(mouse_map &map)
|
|||||||
{
|
{
|
||||||
if (set_mouse_map(&map) == B_OK)
|
if (set_mouse_map(&map) == B_OK)
|
||||||
fSettings.map = map;
|
fSettings.map = map;
|
||||||
|
else
|
||||||
|
fprintf(stderr, "error when set_mouse_map\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user