win32.c
changeset 298 0123c0489940
parent 287 121d79bcd34c
child 306 9ba288cacf0a
equal deleted inserted replaced
297:6c4ab6ff031f 298:0123c0489940
   496 			_wnd.main_wnd = CreateWindow("TTD", Windowtitle, style, x, y, w, h, 0, 0, _inst, 0);
   496 			_wnd.main_wnd = CreateWindow("TTD", Windowtitle, style, x, y, w, h, 0, 0, _inst, 0);
   497 			if (_wnd.main_wnd == NULL)
   497 			if (_wnd.main_wnd == NULL)
   498 				error("CreateWindow failed");
   498 				error("CreateWindow failed");
   499 		}
   499 		}
   500 	}
   500 	}
       
   501 	GameSizeChanged(); // invalidate all windows, force redraw
   501 }
   502 }
   502 
   503 
   503 static bool AllocateDibSection(int w, int h)
   504 static bool AllocateDibSection(int w, int h)
   504 {
   505 {
   505 	BITMAPINFO *bi;
   506 	BITMAPINFO *bi;
   725 static bool Win32GdiChangeRes(int w, int h)
   726 static bool Win32GdiChangeRes(int w, int h)
   726 {
   727 {
   727 	_wnd.width = _wnd.width_org = w;
   728 	_wnd.width = _wnd.width_org = w;
   728 	_wnd.height = _wnd.height_org = h;
   729 	_wnd.height = _wnd.height_org = h;
   729 
   730 
   730 	MakeWindow(_wnd.fullscreen);
   731 	MakeWindow(_fullscreen); // _wnd.fullscreen screws up ingame resolution switching
   731 
   732 
   732 	return true;
   733 	return true;
   733 }
   734 }
   734 
   735 
   735 const HalVideoDriver _win32_video_driver = {
   736 const HalVideoDriver _win32_video_driver = {