Mouse flicker.

BlitzMax Forums/BlitzMax Beginners Area/Mouse flicker.

sswift(Posted 2006) [#1]
I've been notcing a little flickering of the mouse in fullscreen mode. (Haven't checked windowed yet.)

Does anyone know if this might be because I am hiding the mouse continuously, and then showing it again immeidately after during the same frame? Does this cause windows to forget to draw it on occasion?

Or maybe the mouse is a hardware based overlay or something and can be hidden in the middle of a frame and the flickering I am seeing is a result of that, and the current location of the scanline at the time of it being hidden?

Or maybe there's just a bug and it flickers normally in fullscreen mode?

The effect is very slight.


GfK(Posted 2006) [#2]
Does anyone know if this might be because I am hiding the mouse continuously, and then showing it again immeidately after during the same frame? Does this cause windows to forget to draw it on occasion?
Sounds feasible, but why would you be doing that?
Or maybe there's just a bug and it flickers normally in fullscreen mode?
Its not something I've ever witnessed...


Dreamora(Posted 2006) [#3]
Just a wild guess:

You don't use flip 1. For that reason, the screen is not flipped at once, but only lines of it.
As result, the mouse cursor is only partially drawn which makes it look like it flickers.

Is there a usefull reason why you show - hide it all the time? *especially with a that high frequency? Humans see 30, in total max 60 pictures per second)


Grey Alien(Posted 2006) [#4]
weird, I've never seen this. Are you drawing your own cursor? Ah I guess as you are doing hide/showmouse you must be showing the windows one. Just fix your code and stop the continuous hiding/showing like a normal person!


sswift(Posted 2006) [#5]
"Sounds feasible, but why would you be doing that?"

Because I have a huge case statement with 30 different states, most of which I don't want the mouse visible during, and some of which I do. So I showmouse at the start of those which I do. Of course there are other ways I could handle this, but this was the quickest and easiest in this instance.


Dreamora:
Flip 1 has nothing to do with this. The loop is like this:

HideMouse
ShowMouse
Flip False

Either the mouse is visible when it flips, or it is not. The background is not changing and the mouse is not moving, so nothing should be causing the flicker, unless for some reason ShowMouse fails on occasion, or the mouse is not actually being drawn during the flip but is instead hardware based and can be turned on and off between flips.

Grey:
No, it's the windows cursor. I'll probably code around it somehow. I just thought it was weird and wanted to know why it was happening. Also I wanted to know it wasn't something that would happen normally and was unpreventable even if I just showed it when absolutely neccessary before I changed all my code.


tonyg(Posted 2006) [#6]
Have you got any example code which shows the flicker?


sswift(Posted 2006) [#7]
Nope.


Dreamora(Posted 2006) [#8]
ok in that case it has no influence on the backbuffer.
So its just your system that does not like the hardware cursor and tries to eliminate it. In fullscreen, you should do it over a "cursor sprite" anyway, not something that is not bound to the actual window after all.


amonite(Posted 2006) [#9]
@sswift, just to let you know you are not alone,
i have also noticed the same flickering of the mouse cursor on my PC in windowed mode.