View previous topic :: View next topic |
Author |
Message |
r00k
Joined: 13 Nov 2004 Posts: 483
|
Posted: Tue Jan 13, 2009 8:54 pm Post subject: Pullin gmy hair out... |
|
|
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!  |
|
Back to top |
|
 |
MauveBib

Joined: 04 Nov 2004 Posts: 602
|
Posted: Tue Jan 13, 2009 9:08 pm Post subject: |
|
|
switch back? _________________ Apathy Now! |
|
Back to top |
|
 |
Baker

Joined: 14 Mar 2006 Posts: 1538
|
Posted: Tue Jan 13, 2009 9:18 pm Post subject: Re: Pullin gmy hair out... |
|
|
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!  |
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 |
|
 |
r00k
Joined: 13 Nov 2004 Posts: 483
|
Posted: Tue Jan 13, 2009 9:19 pm Post subject: |
|
|
Hehe, okay i've tracked it down (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
EDIT: Baker replied as i was typing this message  |
|
Back to top |
|
 |
mh

Joined: 12 Jan 2008 Posts: 909
|
Posted: Tue Jan 13, 2009 9:23 pm Post subject: |
|
|
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.  _________________ DirectQ Engine - New release 1.8.666a, 9th August 2010
MHQuake Blog (General)
Direct3D 8 Quake Engines |
|
Back to top |
|
 |
r00k
Joined: 13 Nov 2004 Posts: 483
|
Posted: Tue Jan 13, 2009 9:39 pm Post subject: |
|
|
mh wrote: |
By the way, you can get rid of the move-mouse-to-center-screen code when using DirectInput.  |
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 |
|
 |
|