Inside3D!
     

Pullin gmy hair out...

 
Post new topic   Reply to topic    Inside3d Forums Forum Index -> Engine Programming
View previous topic :: View next topic  
Author Message
r00k



Joined: 13 Nov 2004
Posts: 483

PostPosted: Tue Jan 13, 2009 8:54 pm    Post subject: Pullin gmy hair out... Reply with quote

So, I've switched from MSVC 6.0 to MSVC 2005, basically had to create a clean setup. But now, when I alt-tab my mouse pointer is stuck in the bottom right corner of the screen! Eek! I've used a DIFF program to compare changes I might have made but nothing really jumps out at me. I'm pretty sure im using a newer DirectX sdk when installing 2005. Any suggestions, as my head really is starting to hurt from banging it on the desk! Sad
Back to top
View user's profile Send private message
MauveBib



Joined: 04 Nov 2004
Posts: 602

PostPosted: Tue Jan 13, 2009 9:08 pm    Post subject: Reply with quote

switch back?
_________________
Apathy Now!
Back to top
View user's profile Send private message
Baker



Joined: 14 Mar 2006
Posts: 1538

PostPosted: Tue Jan 13, 2009 9:18 pm    Post subject: Re: Pullin gmy hair out... Reply with quote

r00k wrote:
So, I've switched from MSVC 6.0 to MSVC 2005, basically had to create a clean setup. But now, when I alt-tab my mouse pointer is stuck in the bottom right corner of the screen! Eek! I've used a DIFF program to compare changes I might have made but nothing really jumps out at me. I'm pretty sure im using a newer DirectX sdk when installing 2005. Any suggestions, as my head really is starting to hurt from banging it on the desk! Sad


In Qrack?

I've had this problem on the current build of Qrack on my Windows XP machine.

If I am correct, here is what is doing this ...

1) You are either using dinput or not using dinput, I bet. What I mean is that you are using the opposite input method of what you usually use.

2) There are 2 sets of code to release the mouse when app deactivate occurs in vid_wgl.c, the dinput way and the non-dinput way. And other extra factors like whether or not the mouse is windowed and whether or not _windowed_mouse = 1.

Some where in one of those sets of conditions, something is amiss.

There is some code that locks the mouse to window. If I recall this is different than the code that constantly moves the mouse to the center of the window.

I remember battling with this a year ago and the end result was me rewriting all the in_win.c code just so I had total understanding of each and every single item that was going on.

I'd recommend adding Con_Printf("Mouse was released\n ..."); and so forth if developer >= 10. Somewhere something is not getting triggered.

This represents a guess, but I am pretty sure I've had the mouse cursor locked to the window in Qrack 1.90 on Windows XP in windowed mode when it shouldn't be.


Last edited by Baker on Tue Jan 13, 2009 9:19 pm; edited 1 time in total
Back to top
View user's profile Send private message
r00k



Joined: 13 Nov 2004
Posts: 483

PostPosted: Tue Jan 13, 2009 9:19 pm    Post subject: Reply with quote

Hehe, okay i've tracked it down Razz (pasting my hair back over the bald spots...)

It seems that it was a cfg problem and quite possibly a new bug i need to address. When a user has m_directinput 0 this problem occurs, as with m_directinput 1 it's perfectly fine! :O Yippy I love spending 3 hours of self abuse to track down bugs Razz

EDIT: Razz Baker replied as i was typing this message Very Happy
Back to top
View user's profile Send private message
mh



Joined: 12 Jan 2008
Posts: 910

PostPosted: Tue Jan 13, 2009 9:23 pm    Post subject: Reply with quote

Alt-tab from Quake?

If you're using DirectInput it automatically hands the mouse back to the OS when the app loses focus, unless you've got a DISCL_BACKGROUND co-operative level set (in which case you may not be unacquiring the device on a focus switch). If it's software input the code to re-center the pointer on-screen may have gone wacko on you.

Checking out your 1.90 source you haven't changed anything in your SetCoperativeLevel call.

I'm on the March 2008 SDK, and don't have this problem, but DirectInput hasn't been updated since version 8, so I doubt if I'm any different to you.

Edit: 2 replies while I was typing this!

By the way, you can get rid of the move-mouse-to-center-screen code when using DirectInput. Wink
_________________
DirectQ Engine - New release 1.8.666a, 9th August 2010
MHQuake Blog (General)
Direct3D 8 Quake Engines
Back to top
View user's profile Send private message Visit poster's website
r00k



Joined: 13 Nov 2004
Posts: 483

PostPosted: Tue Jan 13, 2009 9:39 pm    Post subject: Reply with quote

mh wrote:


By the way, you can get rid of the move-mouse-to-center-screen code when using DirectInput. Wink


Hehe, I was just looking at that part....
Code:

// if the mouse has moved, force it to the center, so there's room to move
   if (mx || my)
      SetCursorPos (window_center_x, window_center_y);
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Inside3d Forums Forum Index -> Engine Programming All times are GMT
Page 1 of 1

 
Jump to:  
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 vote in polls in this forum


Powered by phpBB © 2004 phpBB Group