comparison pwplib/pwplib-unix.c @ 53:f0c596c5905b

Make Final Isi hack more easily configurable.
author Matti Hamalainen <ccr@tnsp.org>
date Wed, 26 May 2010 00:42:25 +0300
parents 411c1c8d810e
children 85671798fdb3
comparison
equal deleted inserted replaced
52:411c1c8d810e 53:f0c596c5905b
1 #define __PWPLIB_C 1 #define __PWPLIB_C
2
3 #undef FISI_HACK /* NOTICE! Enabling this is a hack for Final ISI only */
2 4
3 #include "config.h" 5 #include "config.h"
4 6
5 #include <stdio.h> 7 #include <stdio.h>
6 #include <stdlib.h> 8 #include <stdlib.h>
48 switch (event.type) { 50 switch (event.type) {
49 case SDL_KEYDOWN: 51 case SDL_KEYDOWN:
50 if (event.key.keysym.sym == SDLK_ESCAPE) 52 if (event.key.keysym.sym == SDLK_ESCAPE)
51 quit = 1; 53 quit = 1;
52 break; 54 break;
53 #if 0 55 #ifdef FISI_HACK
54 /* NOTICE! Disableing this is a hack for Final ISI only */
55 case SDL_QUIT: 56 case SDL_QUIT:
56 quit = 1; 57 quit = 1;
57 break; 58 break;
58 #endif 59 #endif
59 } 60 }
108 sdl_flags |= SDL_INIT_VIDEO; 109 sdl_flags |= SDL_INIT_VIDEO;
109 #endif 110 #endif
110 #ifdef DRIVE_AUDIO 111 #ifdef DRIVE_AUDIO
111 sdl_flags |= SDL_INIT_AUDIO; 112 sdl_flags |= SDL_INIT_AUDIO;
112 #endif 113 #endif
114 #ifdef FISI_HACK
115 sdl_flags |= SDL_INIT_NOPARACHUTE;
116 #endif
117
113 /* With SDL, we let it handle the signals */ 118 /* With SDL, we let it handle the signals */
114 if (SDL_Init(SDL_INIT_TIMER | SDL_INIT_EVENTTHREAD | sdl_flags) != 0) { 119 if (SDL_Init(SDL_INIT_TIMER | SDL_INIT_EVENTTHREAD | sdl_flags) != 0) {
115 pwpwrite("* SDL could not be initialized (%s).\n", SDL_GetError()); 120 pwpwrite("* SDL could not be initialized (%s).\n", SDL_GetError());
116 sdl_init = 0; 121 sdl_init = 0;
117 } else 122 } else