dos3d

diff dosemu/dosemu.c @ 9:bce78aaafc68

foo
author John Tsiombikas <nuclear@member.fsf.org>
date Sat, 26 Nov 2011 03:59:48 +0200
parents f04884489bad
children 0909996838ff
line diff
     1.1 --- a/dosemu/dosemu.c	Mon Nov 21 12:45:18 2011 +0200
     1.2 +++ b/dosemu/dosemu.c	Sat Nov 26 03:59:48 2011 +0200
     1.3 @@ -38,16 +38,21 @@
     1.4  void set_video_mode(int mode)
     1.5  {
     1.6  	int resx = 320, resy = 200;
     1.7 +	unsigned int sdl_flags = SDL_HWPALETTE;
     1.8  
     1.9  	if(getenv("DOSEMU_DOUBLESIZE")) {
    1.10  		resx *= 2;
    1.11  		resy *= 2;
    1.12  	}
    1.13  
    1.14 +	if(getenv("DOSEMU_FULLSCREEN")) {
    1.15 +		sdl_flags |= SDL_FULLSCREEN;
    1.16 +	}
    1.17 +
    1.18  	switch(mode) {
    1.19  	case 0x13:
    1.20  		SDL_Init(SDL_INIT_VIDEO | SDL_INIT_TIMER);
    1.21 -		if(!(fbsurf = SDL_SetVideoMode(resx, resy, 8, SDL_HWPALETTE))) {
    1.22 +		if(!(fbsurf = SDL_SetVideoMode(resx, resy, 8, sdl_flags))) {
    1.23  			fprintf(stderr, "failed to set video mode\n");
    1.24  			abort();
    1.25  		}
    1.26 @@ -120,9 +125,9 @@
    1.27  	return keybev != 0;
    1.28  }
    1.29  
    1.30 -char getch(void)
    1.31 +int getch(void)
    1.32  {
    1.33 -	char res;
    1.34 +	int res;
    1.35  
    1.36  	while(!keybev) {
    1.37  		SDL_Event ev;