comparison mde/events.d @ 21:a60cbb7359dd

Window settings now come from options, and may use OpenGL (enabled/disabled at compile time). committer: Diggory Hardy <diggory.hardy@gmail.com>
author Diggory Hardy <diggory.hardy@gmail.com>
date Mon, 24 Mar 2008 17:53:28 +0000
parents 838577503598
children 249eb6620685
comparison
equal deleted inserted replaced
20:838577503598 21:a60cbb7359dd
34 34
35 init2.addFunc (&initInput); 35 init2.addFunc (&initInput);
36 } 36 }
37 37
38 void initInput () { // init2 func 38 void initInput () { // init2 func
39 logger.trace ("init2: initInput() started");
40
39 try { 41 try {
40 global.input = new Input(); 42 global.input = new Input();
41 global.input.loadConfig (); // (may also create instance) 43 global.input.loadConfig (); // (may also create instance)
42 44
43 Scheduler.perFrame (&pollEvents); 45 Scheduler.perFrame (&pollEvents);
44 } catch (Exception e) { 46 } catch (Exception e) {
45 init2.setFailure (); // must clean up properly 47 setInitFailure (); // must clean up properly
46 } 48 }
49
50 logger.trace ("init2: initInput() finished");
47 } 51 }
48 52
49 void pollEvents (double) { 53 void pollEvents (double) {
50 SDL_Event event; 54 SDL_Event event;
51 while (SDL_PollEvent (&event)) { 55 while (SDL_PollEvent (&event)) {