Mercurial > projects > mde
diff mde/setup/Screen.d @ 95:2a364c7d82c9
Boolean options can be adjusted from the gui now (using a very basic widget). Also some bug-fixes.
Fixed a minor bug where layouts with the same id but without shared alignments would be messed up.
Tracked down the "nothing trawn until a resize" bug (see jobs.txt).
If widgets throw during creation they're now replaced by debug widgets.
Function pointers are converted to delegates using a safer method.
author | Diggory Hardy <diggory.hardy@gmail.com> |
---|---|
date | Thu, 06 Nov 2008 11:07:18 +0000 |
parents | 9520cc0448e5 |
children | 30470bc19ca4 |
line wrap: on
line diff
--- a/mde/setup/Screen.d Thu Oct 23 17:45:49 2008 +0100 +++ b/mde/setup/Screen.d Thu Nov 06 11:07:18 2008 +0000 @@ -56,7 +56,9 @@ /** Init function to initialize SDL. */ StageState init () { // init func // Initialise SDL - if (SDL_Init (SDL_INIT_VIDEO | SDL_INIT_JOYSTICK /+| SDL_INIT_EVENTTHREAD+/)) { + debug logger.trace ("Calling SDL_Init"); + //FIXME: init SDL_INIT_TIMER? + if (SDL_Init (SDL_INIT_VIDEO | SDL_INIT_JOYSTICK | SDL_INIT_TIMER /+| SDL_INIT_EVENTTHREAD+/)) { logger.fatal ("SDL initialisation failed:"); char* msg = SDL_GetError (); logger.fatal (msg ? fromStringz(msg) : "no reason available"); @@ -67,6 +69,7 @@ } /** SDL shutdown */ StageState cleanup () { + debug logger.trace ("Calling SDL_Quit"); SDL_Quit(); return StageState.INACTIVE; } @@ -145,6 +148,7 @@ //NOTE: wrap mode may have an effect, but shouldn't be noticed... // Window-manager settings + debug logger.trace ("Calling SDL_WM_SetCaption"); SDL_WM_SetCaption (toStringz ("mde"), null); // SDL_WM_GrabInput (use later) //END Create window and initialize OpenGL @@ -213,6 +217,7 @@ } //debug logger.trace ("Setting video mode {}x{}, 32-bit, flags: {}", w,h,flags); + debug logger.trace ("Calling SDL_SetVideoMode"); if (SDL_SetVideoMode (w, h, 32, flags) is null) { logger.fatal ("Unable to set video mode:"); char* msg = SDL_GetError ();