+ init_theme();
+ unsigned screen_width = atoi(get_theme_config("screen", "width").c_str());
+ unsigned screen_height = atoi(get_theme_config("screen", "height").c_str());
+ bool use_lcd = atoi(get_theme_config("screen", "fullscreen").c_str());
+
+ SDL_Init(SDL_INIT_VIDEO);
+ if (use_lcd) {
+ screen = SDL_SetVideoMode(screen_width, screen_height, 32, SDL_DOUBLEBUF | SDL_FULLSCREEN);
+ SDL_ShowCursor(SDL_DISABLE);
+ } else {
+ screen = SDL_SetVideoMode(screen_width, screen_height, 32, SDL_DOUBLEBUF);
+ }
+ if (screen == NULL) {
+ fprintf(stderr, "Video initialization failed: %s\n", SDL_GetError());
+ exit(1);
+ }
+
+ framebuf = new unsigned char[screen_width * screen_height * 4];
+ screenbuf = new unsigned char[screen_width * screen_height * 4];