[win32, canvas] Fix random crash by correctly setting wgl_surface deselect function pointer to mg_wgl_deselect(). Forgot to do it in 18c793db
, dumb me.
This commit is contained in:
parent
1e34c3406f
commit
806f00417e
|
@ -193,6 +193,7 @@ mg_surface_data* mg_wgl_surface_create_for_window(mp_window window)
|
||||||
surface = malloc_type(mg_wgl_surface);
|
surface = malloc_type(mg_wgl_surface);
|
||||||
if(surface)
|
if(surface)
|
||||||
{
|
{
|
||||||
|
memset(surface, 0, sizeof(mg_wgl_surface));
|
||||||
mg_surface_init_for_window((mg_surface_data*)surface, windowData);
|
mg_surface_init_for_window((mg_surface_data*)surface, windowData);
|
||||||
|
|
||||||
surface->interface.api = MG_GL;
|
surface->interface.api = MG_GL;
|
||||||
|
@ -200,6 +201,7 @@ mg_surface_data* mg_wgl_surface_create_for_window(mp_window window)
|
||||||
surface->interface.prepare = mg_wgl_surface_prepare;
|
surface->interface.prepare = mg_wgl_surface_prepare;
|
||||||
surface->interface.present = mg_wgl_surface_present;
|
surface->interface.present = mg_wgl_surface_present;
|
||||||
surface->interface.swapInterval = mg_wgl_surface_swap_interval;
|
surface->interface.swapInterval = mg_wgl_surface_swap_interval;
|
||||||
|
surface->interface.deselect = mg_wgl_surface_deselect;
|
||||||
|
|
||||||
surface->hDC = GetDC(surface->interface.layer.hWnd);
|
surface->hDC = GetDC(surface->interface.layer.hWnd);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue