mirror of
https://github.com/Kaehvaman/OAIP.git
synced 2025-01-18 16:49:11 +04:00
fix GDI object leak
This commit is contained in:
parent
9e54b8aa9b
commit
f0ec17ce93
@ -293,6 +293,7 @@ void drawBottomBar(HDC hdc) {
|
||||
HBRUSH hBrush = CreateSolidBrush(RGB(30, 30, 30));
|
||||
RECT r = { 0, HEIGHT * M, WIDTH * N, HEIGHT * M + VOFFSET };
|
||||
FillRect(hdc, &r, hBrush);
|
||||
DeleteObject(hBrush);
|
||||
}
|
||||
|
||||
void drawPlayer(HDC hdc) {
|
||||
@ -303,6 +304,7 @@ void drawPlayer(HDC hdc) {
|
||||
int y2 = (player_y + 1) * HEIGHT;
|
||||
RECT r = { x1, y1, x2, y2 };
|
||||
FillRect(hdc, &r, hBrushMan);
|
||||
DeleteObject(hBrushMan);
|
||||
}
|
||||
|
||||
void save() {
|
||||
|
Loading…
Reference in New Issue
Block a user