Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

AppGameKit Classic Chat / Bug: 2.0.16 SetRawMouseVisible(0)

Author
Message
Preben
AGK Studio Developer
20
Years of Service
User Offline
Joined: 30th Jun 2004
Location:
Posted: 14th Jan 2016 14:40
SetRawMouseVisible(0) , dont work on windows 10, also tried it in fullscreen , same result.

Only tested on windows 10.

Works perfect on mac.

FYI:
SetRawMousePosition has a 3 sync update time on win10, before you can read the mouse position again, but 18 on mac really slow.


best regards Preben Eriksen,
Paul Johnston
TGC Developer
22
Years of Service
User Offline
Joined: 16th Nov 2002
Location: United Kingdom
Posted: 14th Jan 2016 18:30
Works here on Windows 10 Home. If the app is in a window the cursor won't disappear outside the window but it does disappear when the cursor enters your window.

I think Mac has some mouse smoothing going on behind the scenes that mean the mouse position takes a while to filter through.
Digital Awakening
AGK Developer
22
Years of Service
User Offline
Joined: 27th Aug 2002
Location: Sweden
Posted: 14th Jan 2016 18:41
Works here on both W10 and W7.
Preben
AGK Studio Developer
20
Years of Service
User Offline
Joined: 30th Jun 2004
Location:
Posted: 14th Jan 2016 23:51
Got it working on my win 10 , but only when i call it 2 times, wierd.

Working code:



Not working code:



Must be some condition in the SetRawMouseVisible function, or another thing that makes SetRawMouseVisible fail the first time i call it ?

best regards Preben Eriksen,
AJCodes
9
Years of Service
User Offline
Joined: 6th Jan 2015
Location:
Posted: 15th Jan 2016 03:45
I've never been able to get it work, Win7 or Win10 which has been maddening for some of my apps. Using a nVidia GPU if that makes any difference.

Tried the "call it twice" logic and it DID work, but there was a good 1 second delay between the calls and when the mouse pointer disappeared.


Born. Currently living.
Digital Awakening
AGK Developer
22
Years of Service
User Offline
Joined: 27th Aug 2002
Location: Sweden
Posted: 15th Jan 2016 09:43 Edited at: 15th Jan 2016 09:44
I've had problems turning it off and on multiple times and then it stops hiding. Which is why I have a sprite for a pointer and hide the mouse permanently in RTA. I only call it once at the beginning of the code.
Preben
AGK Studio Developer
20
Years of Service
User Offline
Joined: 30th Jun 2004
Location:
Posted: 15th Jan 2016 15:30
When switching between fullscreen and windows mode , sometimes (even calling it 2 times) it still dont work this is what i got now.

SetRawMouseVisible(0)
SetRawMouseVisible(0)
sync()
SetRawMouseVisible(0)
SetRawMouseVisible(0)

And that seems to work all the time ( at least here ) , if at all you got the time to test this i would really appreciate it, hiding the mouse is a must. just download the game , start playing and click "right mouse button" to enter mouse mode , this should hide the mouse , right click again to get the mouse back , try switching to fullscreen ( fullscreen icon in the top right corner ) and try it again.

game: http://www.plemsoft.com/3darcadefps.zip

Thanks.
best regards Preben Eriksen,
Paul Johnston
TGC Developer
22
Years of Service
User Offline
Joined: 16th Nov 2002
Location: United Kingdom
Posted: 15th Jan 2016 16:44
Strange, as we simply call the ShowCursor(BOOL) command in the Windows API with no other processing on AGK's part, so I'm not sure why it would behave differently across different machines.
Blendman
10
Years of Service
User Offline
Joined: 17th Feb 2014
Location: Arkeos
Posted: 15th Jan 2016 18:33
Preben : is your mouse problem a "razer" or an equivalent ?
I know there are some problems with razer mouse in some applications/game (lag...).
AGK2 tier1 - http://www.dracaena-studio.com
Preben
AGK Studio Developer
20
Years of Service
User Offline
Joined: 30th Jun 2004
Location:
Posted: 16th Jan 2016 11:21
no razer.

Paul:
it looks like ShowCursor is a counter , so it could be 4 and you need to call it 4 times , perhaps stuff like errors , exceptions other menu stuff in the window itself will make it count up, like dialog boxes always does and error messages ? so perhaps you need something like this:
while(ShowCursor(FALSE) >= 0);

Well not letting it run forever if it fails somehow , or perhaps just return the return value from ShowCursor to agk SetRawMouseVisible function so we can do it ourself.


best regards Preben Eriksen,
Digital Awakening
AGK Developer
22
Years of Service
User Offline
Joined: 27th Aug 2002
Location: Sweden
Posted: 16th Jan 2016 13:59 Edited at: 16th Jan 2016 14:00
Just a hunch as Preben mentiones menu stuff. AppGameKit still have a problem with the ALT-key, which have previously tried to access the window menu. ALT+Space still opens up a menu and holding down ALT makes the program not read the keys and often generates a Windows *bing* noice. Could they be related?

Login to post a reply

Server time is: 2024-11-17 02:54:21
Your offset time is: 2024-11-17 02:54:21