Win32: redraw whole window when called with 0 width and height
This commit is contained in:
		
							parent
							
								
									e72bb8cab1
								
							
						
					
					
						commit
						981bcd37b4
					
				@ -539,6 +539,13 @@ void Screen_FillRect(int x, int y, int w, int h, byte color)
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void Update_rect(short x, short y, unsigned short width, unsigned short height)
 | 
			
		||||
{
 | 
			
		||||
  if (width == 0 && height == 0)
 | 
			
		||||
  {
 | 
			
		||||
    // update whole window
 | 
			
		||||
    InvalidateRect(Win32_hwnd, NULL, FALSE/*TRUE*/);
 | 
			
		||||
  }
 | 
			
		||||
  else
 | 
			
		||||
  {
 | 
			
		||||
    RECT rect;
 | 
			
		||||
    rect.left = x * Pixel_width;
 | 
			
		||||
@ -547,6 +554,7 @@ void Update_rect(short x, short y, unsigned short width, unsigned short height)
 | 
			
		||||
    rect.bottom = (y + height) * Pixel_height;
 | 
			
		||||
    InvalidateRect(Win32_hwnd, &rect, FALSE/*TRUE*/);
 | 
			
		||||
  }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void Flush_update(void)
 | 
			
		||||
{
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user