From b94cdb18915986ccf80e23b5cffb936466e495ce Mon Sep 17 00:00:00 2001 From: Montgomery Date: Thu, 23 Apr 2026 18:38:38 +0100 Subject: [PATCH] Fix the StretchBlt when the windows goes off the left and top of the screen. --- win32/game_of_life/game_of_life.odin | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/win32/game_of_life/game_of_life.odin b/win32/game_of_life/game_of_life.odin index 2c39e39..644e34d 100644 --- a/win32/game_of_life/game_of_life.odin +++ b/win32/game_of_life/game_of_life.odin @@ -256,7 +256,7 @@ WM_PAINT :: proc(hwnd: win32.HWND) -> win32.LRESULT { win32.SelectObject(hdc_source, win32.HGDIOBJ(app.hbitmap)) client_size := get_rect_size(&ps.rcPaint) - win32.StretchBlt(hdc, 0, 0, client_size.x, client_size.y, hdc_source, 0, 0, app.size.x, app.size.y, win32.SRCCOPY) + win32.StretchBlt(hdc, ps.rcPaint.left, ps.rcPaint.top, client_size.x, client_size.y, hdc_source, 0, 0, app.size.x, app.size.y, win32.SRCCOPY) } if show_help {