src/main_gui.cpp
branchNewGRF_ports
changeset 10274 b3c58f3df92b
parent 10242 52b4a9006029
child 10724 68a692eacf22
equal deleted inserted replaced
10243:e9066a148720 10274:b3c58f3df92b
   410 
   410 
   411 	int width = _screen.width;
   411 	int width = _screen.width;
   412 	int height = _screen.height;
   412 	int height = _screen.height;
   413 
   413 
   414 	Window *w = AllocateWindow(0, 0, width, height, MainWindowWndProc, WC_MAIN_WINDOW, NULL);
   414 	Window *w = AllocateWindow(0, 0, width, height, MainWindowWndProc, WC_MAIN_WINDOW, NULL);
   415 	AssignWindowViewport(w, 0, 0, width, height, TileXY(32, 32), ZOOM_LVL_VIEWPORT);
   415 	InitializeWindowViewport(w, 0, 0, width, height, TileXY(32, 32), ZOOM_LVL_VIEWPORT);
   416 
   416 
   417 	/* XXX: these are not done */
   417 	/* XXX: these are not done */
   418 	switch (_game_mode) {
   418 	switch (_game_mode) {
   419 		default: NOT_REACHED();
   419 		default: NOT_REACHED();
   420 		case GM_MENU:
   420 		case GM_MENU:
   447  */
   447  */
   448 void GameSizeChanged()
   448 void GameSizeChanged()
   449 {
   449 {
   450 	_cur_resolution[0] = _screen.width;
   450 	_cur_resolution[0] = _screen.width;
   451 	_cur_resolution[1] = _screen.height;
   451 	_cur_resolution[1] = _screen.height;
       
   452 	ScreenSizeChanged();
   452 	RelocateAllWindows(_screen.width, _screen.height);
   453 	RelocateAllWindows(_screen.width, _screen.height);
   453 	ScreenSizeChanged();
       
   454 	MarkWholeScreenDirty();
   454 	MarkWholeScreenDirty();
   455 }
   455 }