mirror of
https://gitlab.winehq.org/wine/vkd3d.git
synced 2024-09-13 09:16:14 -07:00
demos: Properly destroy windows on Win32.
This commit is contained in:
parent
2d0c3c871a
commit
efde85e8ca
@ -96,11 +96,7 @@ static inline struct demo_window *demo_window_create(struct demo *demo, const ch
|
|||||||
|
|
||||||
static inline void demo_window_destroy(struct demo_window *window)
|
static inline void demo_window_destroy(struct demo_window *window)
|
||||||
{
|
{
|
||||||
if (window->hwnd)
|
DestroyWindow(window->hwnd);
|
||||||
DestroyWindow(window->hwnd);
|
|
||||||
if (!--window->demo->window_count)
|
|
||||||
window->demo->quit = true;
|
|
||||||
free(window);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline demo_key demo_key_from_vkey(DWORD vkey)
|
static inline demo_key demo_key_from_vkey(DWORD vkey)
|
||||||
@ -128,8 +124,9 @@ static inline LRESULT CALLBACK demo_window_proc(HWND hwnd, UINT message, WPARAM
|
|||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
case WM_DESTROY:
|
case WM_DESTROY:
|
||||||
window->hwnd = NULL;
|
if (!--window->demo->window_count)
|
||||||
demo_window_destroy(window);
|
window->demo->quit = true;
|
||||||
|
free(window);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user