saintxi.com

SaintXi - Games Studio
It is currently Tue Sep 07, 2010 11:47 pm

All times are UTC




Post new topic Reply to topic  [ 3 posts ] 
Author Message
 Post subject: Wheel Deltas changed in Vista
PostPosted: Mon Mar 02, 2009 10:41 am 
Offline
Site Admin
Site Admin

Joined: Thu Apr 10, 2008 6:02 am
Posts: 1056
Location: London
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;
   }
}


Top
 Profile  
 
 Post subject: Re: Wheel Deltas changed in Vista
PostPosted: Mon Nov 02, 2009 5:21 am 
Offline
Landing Site
Landing Site

Joined: Mon Nov 02, 2009 5:10 am
Posts: 1
I agree with the post, In windows Vista there is a problem, I also faced it but still i am searching for its solution, is there anyone who has the solution of this problem;

regards,


Top
 Profile  
 
 Post subject: Re: Wheel Deltas changed in Vista
PostPosted: Fri Nov 20, 2009 7:34 am 
Offline
Landing Site
Landing Site

Joined: Fri Nov 20, 2009 7:31 am
Posts: 2
yeah the simple sulotion is to switch back to windows XP. :)


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
phpBB Hosting from 34SP.com