rayzor

diff src/keyb.c @ 12:d94a69933a71

lots of stuff, can't remember
author John Tsiombikas <nuclear@member.fsf.org>
date Sat, 12 Apr 2014 23:28:24 +0300
parents 2a5340a6eee4
children
line diff
     1.1 --- a/src/keyb.c	Thu Apr 10 08:42:33 2014 +0300
     1.2 +++ b/src/keyb.c	Sat Apr 12 23:28:24 2014 +0300
     1.3 @@ -90,10 +90,17 @@
     1.4  
     1.5  int kb_isdown(int key)
     1.6  {
     1.7 -	if(key == KB_ANY) {
     1.8 +	switch(key) {
     1.9 +	case KB_ANY:
    1.10  		return num_pressed;
    1.11 +
    1.12 +	case KB_ALT:
    1.13 +		return keystate[KB_LALT] + keystate[KB_RALT];
    1.14 +
    1.15 +	case KB_CTRL:
    1.16 +		return keystate[KB_LCTRL] + keystate[KB_RCTRL];
    1.17  	}
    1.18 -	return (int)keystate[key];
    1.19 +	return keystate[key];
    1.20  }
    1.21  
    1.22  void kb_wait(void)