fixing undocumented part of win32 api

This commit is contained in:
NishiOwO 2025-04-17 19:17:02 +09:00
parent d903a6d470
commit 62c5dfb0a8
No known key found for this signature in database
GPG Key ID: 27EF69B208EB9343

View File

@ -36,13 +36,15 @@ LRESULT CALLBACK gf_draw_platform_proc(HWND hWnd, UINT msg, WPARAM wp, LPARAM lp
EndPaint(hWnd, &ps); EndPaint(hWnd, &ps);
break; break;
case WM_SIZE: case WM_SIZE:
GetClientRect(hWnd, &rect); if(draw->platform != NULL) {
draw->x = rect.left; GetClientRect(hWnd, &rect);
draw->y = rect.top; draw->x = rect.left;
draw->width = rect.right - rect.left; draw->y = rect.top;
draw->height = rect.bottom - rect.top; draw->width = rect.right - rect.left;
wglMakeCurrent(draw->platform->dc, draw->platform->glrc); draw->height = rect.bottom - rect.top;
gf_draw_reshape(draw); wglMakeCurrent(draw->platform->dc, draw->platform->glrc);
gf_draw_reshape(draw);
}
break; break;
case WM_CLOSE: case WM_CLOSE:
draw->close = 1; draw->close = 1;