Just discovered that the long time constant WM_MOUSEWHEEL behaviour has changed in recent mouse drivers so any value of delta will get passed through - previously it was always exactly WHEEL_DELTA (= 120)
As
Light of Altair treats mouse wheel actions as discrete 'clicks' to navigate between planet, fleet, and galaxy UIs we needed to convert the new smooth wheel movement back into reliable clicks.
We only found this issue through beta testing, It would have been impossible to find on our own PCs using the old drivers.
thanks to MSDN for the solution!
http://social.msdn.microsoft.com/forums/en-US/gametechnologiesgeneral/thread/1deb5f7e-95ee-40ac-84db-58d636f601c7/Here's a mockup of how I'm going to fix it - not 100% sure it is the most 'correct' way...
Code:
//void MsgProc(UINT uMsg, WPARAM wParam, LPARAM lParam)
static int wheel_delta=0;
switch(uMsg)
{
case WM_MOUSEWHEEL:
{
wheel_delta += GET_WHEEL_DELTA_WPARAM(wParam);
int wheelmove = 0;
do
{
wheelmove = 0;
if(wheel_delta>=WHEEL_DELTA)
{
wheelmove=SR_BUTTON_WHEELUP;
wheel_delta-=WHEEL_DELTA;
}
else
if(wheel_delta<=-WHEEL_DELTA)
{
wheelmove=SR_BUTTON_WHEELDOWN;
wheel_delta+=WHEEL_DELTA;
}
if(wheelmove)
{
gSR_EventCallback(wheelmove);
}
}
while(wheelmove!=0);
break;
}
}