config->value("config/video/gamma/red", gr, "1.0"); config->value("config/video/gamma/green", gg, "1.0"); config->value("config/video/gamma/blue", gb, "1.0");  Image_window8::set_gamma(atof(gr.data()), atof(gg.data()), atof(gb.data()));
static void Init	(	){	Uint32 init_flags = SDL_INIT_VIDEO|SDL_INIT_TIMER|SDL_INIT_AUDIO;#ifdef NO_SDL_PARACHUTE	init_flags |= SDL_INIT_NOPARACHUTE;#endif	if (SDL_Init(init_flags) < 0)	{		cerr << "Unable to initialize SDL: " << SDL_GetError() << endl;		exit(-1);	}	atexit(SDL_Quit);		SDL_SysWMinfo info;		// Get system info.        SDL_GetWMInfo(&info);#ifdef XWIN					// Want drag-and-drop events.	SDL_EventState(SDL_SYSWMEVENT, SDL_ENABLE);#endif	SDL_ShowCursor(0);	SDL_VERSION(&info.version);	SDL_EnableUNICODE(1);	// Activate unicode translation for keypresses		int w, h, sc;	// Default resolution is 320x200 with 2x scaling	w = 320;	h = 200;	sc = 2;	int sw, sh, scaleval;	config->value("config/video/width", sw, w);	config->value("config/video/height", sh, h);	config->value("config/video/scale", scaleval, sc);	gwin = new Game_window(sw, sh, scaleval);	current_res = find_resolution(sw, sh, scaleval);	Audio::get_ptr();	string disable_fades;	config->value("config/video/disable_fades", disable_fades, "no");	if (disable_fades == "yes")		gwin->set_fades_enabled(false);#ifdef WIN32	//enable unknown (to SDL) window messages, including MM_MCINOTIFY	//(for MIDI repeats)	//SDL_EventState(SDL_SYSWMEVENT, SDL_ENABLE);#endif //WIN32	SDL_SetEventFilter(0);	// Show the banner	ExultMenu exult_menu(gwin);	Exult_Game mygame = exult_menu.run();	Game::create_game(mygame);	string yn;	gwin->init_files();					// Skip splash screen?	config->value("config/gameplay/skip_splash", yn, "no");	if(yn == "no") 		game->play_intro();	game->show_menu();	gwin->set_mode(Game_window::normal);	SDL_SetEventFilter(Filter_intro_events);	gwin->setup_game();		// This will start the scene.					// Get scale factor for mouse.	if (gwin->get_win())		scale = Log2( gwin->get_win()->get_scale() );#ifdef XWIN        SDL_GetWMInfo(&info);        xfd = ConnectionNumber(info.info.x11.display);	xdnd = new Xdnd(info.info.x11.display, info.info.x11.wmwindow,				info.info.x11.window, Drop_dragged_shape);#endif}