From: Torsten Dreyer Date: Sat, 8 Jan 2011 11:50:55 +0000 (+0100) Subject: Make mouse buttons work again. X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=8cab5f9e60be3f0dbdb1fe18e5c475f5eb94a9cf;p=flightgear.git Make mouse buttons work again. --- diff --git a/src/Input/FGMouseInput.cxx b/src/Input/FGMouseInput.cxx index b171e021b..8ab430653 100644 --- a/src/Input/FGMouseInput.cxx +++ b/src/Input/FGMouseInput.cxx @@ -117,7 +117,7 @@ void FGMouseInput::init() m.mode_node->setIntValue(0); } for (j = 0; j < MAX_MOUSE_BUTTONS; j++) { - buf.clear(); + buf.seekp(ios_base::beg); buf << "/devices/status/mice/mouse["<< i << "]/button[" << j << "]"; m.mouse_button_nodes[j] = fgGetNode(buf.str().c_str(), true); m.mouse_button_nodes[j]->setBoolValue(false); @@ -150,7 +150,7 @@ void FGMouseInput::init() m.modes[j].buttons = new FGButton[MAX_MOUSE_BUTTONS]; std::ostringstream buf; for (k = 0; k < MAX_MOUSE_BUTTONS; k++) { - buf.clear(); + buf.seekp(ios_base::beg); buf << "mouse button " << k; SG_LOG(SG_INPUT, SG_DEBUG, "Initializing mouse button " << k); m.modes[j].buttons[k].init( mode_node->getChild("button", k), buf.str(), module );