src/video/win32_v.cpp
changeset 7922 a7e266f966d9
parent 7541 8086db74ec5b
child 7927 3a3289a049f9
equal deleted inserted replaced
7921:3437fdd5c0a8 7922:a7e266f966d9
   543 			SetRect(&r2, 0, 0, 0, 0);
   543 			SetRect(&r2, 0, 0, 0, 0);
   544 			AdjustWindowRect(&r2, GetWindowLong(hwnd, GWL_STYLE), FALSE);
   544 			AdjustWindowRect(&r2, GetWindowLong(hwnd, GWL_STYLE), FALSE);
   545 
   545 
   546 			w = r->right - r->left - (r2.right - r2.left);
   546 			w = r->right - r->left - (r2.right - r2.left);
   547 			h = r->bottom - r->top - (r2.bottom - r2.top);
   547 			h = r->bottom - r->top - (r2.bottom - r2.top);
   548 			w = clamp(w, 64, MAX_SCREEN_WIDTH);
   548 			w = Clamp(w, 64, MAX_SCREEN_WIDTH);
   549 			h = clamp(h, 64, MAX_SCREEN_HEIGHT);
   549 			h = Clamp(h, 64, MAX_SCREEN_HEIGHT);
   550 			SetRect(&r2, 0, 0, w, h);
   550 			SetRect(&r2, 0, 0, w, h);
   551 
   551 
   552 			AdjustWindowRect(&r2, GetWindowLong(hwnd, GWL_STYLE), FALSE);
   552 			AdjustWindowRect(&r2, GetWindowLong(hwnd, GWL_STYLE), FALSE);
   553 			w = r2.right - r2.left;
   553 			w = r2.right - r2.left;
   554 			h = r2.bottom - r2.top;
   554 			h = r2.bottom - r2.top;
   675 {
   675 {
   676 	BITMAPINFO *bi;
   676 	BITMAPINFO *bi;
   677 	HDC dc;
   677 	HDC dc;
   678 	int bpp = BlitterFactoryBase::GetCurrentBlitter()->GetScreenDepth();
   678 	int bpp = BlitterFactoryBase::GetCurrentBlitter()->GetScreenDepth();
   679 
   679 
   680 	w = clamp(w, 64, MAX_SCREEN_WIDTH);
   680 	w = Clamp(w, 64, MAX_SCREEN_WIDTH);
   681 	h = clamp(h, 64, MAX_SCREEN_HEIGHT);
   681 	h = Clamp(h, 64, MAX_SCREEN_HEIGHT);
   682 
   682 
   683 	if (bpp == 0) error("Can't use a blitter that blits 0 bpp for normal visuals");
   683 	if (bpp == 0) error("Can't use a blitter that blits 0 bpp for normal visuals");
   684 
   684 
   685 	if (w == _screen.width && h == _screen.height)
   685 	if (w == _screen.width && h == _screen.height)
   686 		return false;
   686 		return false;