[MPlayer-cvslog] CVS: main/osdep getch2-win.c,1.11,1.12

Rich Felker dalias at aerifal.cx
Mon Apr 17 04:19:07 CEST 2006


On Sat, Apr 15, 2006 at 11:18:23PM +0200, Reimar Döffinger CVS wrote:
> CVS change done by Reimar Döffinger CVS
> 
> Update of /cvsroot/mplayer/main/osdep
> In directory mail:/var2/tmp/cvs-serv10058
> 
> Modified Files:
> 	getch2-win.c 
> Log Message:
> 10l, fix broken if (X >= Y >= Z) comparison, probably stopped F-keys from working
> 
> 
> Index: getch2-win.c
> ===================================================================
> RCS file: /cvsroot/mplayer/main/osdep/getch2-win.c,v
> retrieving revision 1.11
> retrieving revision 1.12
> diff -u -r1.11 -r1.12
> --- getch2-win.c	10 Apr 2006 12:42:10 -0000	1.11
> +++ getch2-win.c	15 Apr 2006 21:18:20 -0000	1.12
> @@ -93,7 +93,7 @@
>                          continue;              
>  					}
>  					/*check for function keys*/
> -        			if(0x87 >= eventbuffer[i].Event.KeyEvent.wVirtualKeyCode >= 0x70)
> +        			if(0x87 >= eventbuffer[i].Event.KeyEvent.wVirtualKeyCode && eventbuffer[i].Event.KeyEvent.wVirtualKeyCode >= 0x70)

There's a much nicer version that's not so damn long:

if ((unsigned)eventbuffer[i].Event.KeyEvent.wVirtualKeyCode - 0x70 <= 0x17)

Rich




More information about the MPlayer-cvslog mailing list