rayzor

diff src/main.cc @ 5:5fcf72837b69

fixed the dosemu bit
author John Tsiombikas <nuclear@member.fsf.org>
date Sun, 06 Apr 2014 02:43:24 +0300
parents a826bf0fb169
children a68dbf80d547
line diff
     1.1 --- a/src/main.cc	Sun Apr 06 01:12:50 2014 +0300
     1.2 +++ b/src/main.cc	Sun Apr 06 02:43:24 2014 +0300
     1.3 @@ -85,6 +85,7 @@
     1.4  	}
     1.5  
     1.6  	swap_buffers();
     1.7 +	wait_vsync();
     1.8  }
     1.9  
    1.10  #define PACK_RGB(r, g, b) \
    1.11 @@ -133,14 +134,14 @@
    1.12  
    1.13  static void handle_keyboard()
    1.14  {
    1.15 -	if(!kb_isdown(KB_ANY))
    1.16 -		return;
    1.17 +	int key;
    1.18  
    1.19 -	int c = kb_getkey();
    1.20 -	switch(c) {
    1.21 -	case 27:
    1.22 -		quit = true;
    1.23 -		return;
    1.24 +	while((key = kb_getkey()) != -1) {
    1.25 +		switch(key) {
    1.26 +		case 27:
    1.27 +			quit = true;
    1.28 +			return;
    1.29 +		}
    1.30  	}
    1.31  }
    1.32