[MPlayer-dev-eng] [PATCH] GUI cursor control

Reimar Döffinger Reimar.Doeffinger at gmx.de
Thu Sep 8 10:53:01 CEST 2011


On Thu, Sep 08, 2011 at 01:09:28AM +0200, Ingo Brückl wrote:
> Reimar Döffinger wrote on Wed, 7 Sep 2011 18:11:43 +0200:
> 
> > On Tue, Sep 06, 2011 at 06:43:01PM +0200, Ingo Brückl wrote:
> >> b.patch for the GUI to implement autohide.
> 
> > For that one the GUI code seems broken, if mouse_time is 0 by pure
> > chance the mouse pointer seems to get stuck on.
> 
> As you prefer the other solution, it may no longer be important by I'm
> curious. What do you mean by "0 by pure chance"? If it gets 0 somewhere
> else than at @@ -614,6 +618,11 @@? That would be a programming error.
> GetTimerMS() returning 0?

Yes. GetTimerMS overflows every 48 days, also it currently (somewhat
incorrectly) uses a non-monotonous timer, so it also can become
0/overflow/whatever due to a NTP time change.

> +  }
> +  else if (mouse_waiting_hide && (GetTimerMS() - mouse_timer >= 1000)) {

Cosmetic nit: put them on a single line, I think that should be more
consistent with other code.
Otherwise I like it, I think the code now is better than it was before.


More information about the MPlayer-dev-eng mailing list