[InputHandler_DirectInput] Fixed MouseWheel input not resetting.
This commit is contained in:
@@ -10,6 +10,7 @@ StepMania 5.0 Preview 2 | 20110???
|
|||||||
|
|
||||||
2011/06/13
|
2011/06/13
|
||||||
----------
|
----------
|
||||||
|
* [InputHandler_DirectInput] Fixed MouseWheel input not resetting. [AJ]
|
||||||
* [ScreenTextEntry] Make it so only the keyboard's Enter key can finish the
|
* [ScreenTextEntry] Make it so only the keyboard's Enter key can finish the
|
||||||
screen. Should fix issues with buttons whose secondary function is MenuStart. [AJ]
|
screen. Should fix issues with buttons whose secondary function is MenuStart. [AJ]
|
||||||
* [InputMapper] Modify default mappings. Use the Hyphen key instead of the
|
* [InputMapper] Modify default mappings. Use the Hyphen key instead of the
|
||||||
|
|||||||
@@ -384,6 +384,10 @@ void InputHandler_DInput::UpdatePolled( DIDevice &device, const RageTimer &tm )
|
|||||||
if( hr == DIERR_INPUTLOST || hr == DIERR_NOTACQUIRED )
|
if( hr == DIERR_INPUTLOST || hr == DIERR_NOTACQUIRED )
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
// reset mousewheel
|
||||||
|
ButtonPressed( DeviceInput(device.dev, MOUSE_WHEELUP, 0, tm) );
|
||||||
|
ButtonPressed( DeviceInput(device.dev, MOUSE_WHEELDOWN, 0, tm) );
|
||||||
|
|
||||||
for( unsigned i = 0; i < device.Inputs.size(); ++i )
|
for( unsigned i = 0; i < device.Inputs.size(); ++i )
|
||||||
{
|
{
|
||||||
const input_t &in = device.Inputs[i];
|
const input_t &in = device.Inputs[i];
|
||||||
@@ -476,6 +480,12 @@ void InputHandler_DInput::UpdateBuffered( DIDevice &device, const RageTimer &tm
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// reset mousewheel
|
||||||
|
DeviceInput diUp = DeviceInput(device.dev, MOUSE_WHEELUP, 0.0f, tm);
|
||||||
|
ButtonPressed( diUp );
|
||||||
|
DeviceInput diDown = DeviceInput(device.dev, MOUSE_WHEELDOWN, 0.0f, tm);
|
||||||
|
ButtonPressed( diDown );
|
||||||
|
|
||||||
for( int i = 0; i < (int) numevents; ++i )
|
for( int i = 0; i < (int) numevents; ++i )
|
||||||
{
|
{
|
||||||
for(unsigned j = 0; j < device.Inputs.size(); ++j)
|
for(unsigned j = 0; j < device.Inputs.size(); ++j)
|
||||||
@@ -522,6 +532,7 @@ void InputHandler_DInput::UpdateBuffered( DIDevice &device, const RageTimer &tm
|
|||||||
GetCursorPos(&cursorPos);
|
GetCursorPos(&cursorPos);
|
||||||
// convert screen coordinates to client
|
// convert screen coordinates to client
|
||||||
ScreenToClient(GraphicsWindow::GetHwnd(), &cursorPos);
|
ScreenToClient(GraphicsWindow::GetHwnd(), &cursorPos);
|
||||||
|
|
||||||
switch(in.ofs)
|
switch(in.ofs)
|
||||||
{
|
{
|
||||||
case DIMOFS_X:
|
case DIMOFS_X:
|
||||||
|
|||||||
Reference in New Issue
Block a user