Usermode/AxWin3 - Clean up unneeded (and silly) log message
[tpg/acess2.git] / Usermode / Applications / axwin3_src / WM / main_SDL.c
1 /*
2  * Acess2 GUI (AxWin3) WM
3  * - By John Hodge (thePowersGang)
4  *
5  * main_SDL.c
6  * - SDL build main function
7  */
8 #include <stdlib.h>
9 #include <stdio.h>
10 #include <SDL/SDL.h>
11
12 // === IMPORTS ===
13 extern void     Video_Setup(void);
14 extern void     WM_Initialise(void);
15 extern void     WM_Update(void);
16
17 // === CODE ===
18 int main(int argc, char *argv[])
19 {
20         // Set up basic SDL environment
21         if( SDL_Init(SDL_INIT_VIDEO) < 0 ) {
22                 fprintf(stderr, "Unable to initialise SDL: %s\n", SDL_GetError());
23                 exit(1);
24         }
25         atexit(SDL_Quit);
26
27         
28         Video_Setup();
29         WM_Initialise();
30
31         // Main loop
32         printf("Entering idle loop\n");
33          int    bRunning = 1;
34         while(bRunning)
35         {
36                 SDL_Event       ev;
37                 WM_Update();
38                 SDL_WaitEvent(&ev);
39                 switch( ev.type )
40                 {
41                 case SDL_QUIT:
42                         bRunning = 0;
43                         break;
44                 case SDL_KEYDOWN:
45                         break;
46                 case SDL_USEREVENT:
47                         break;
48                 }
49         }
50         
51         // TODO: Clean up
52
53         return 0;
54 }
55

UCC git Repository :: git.ucc.asn.au