set win32_hdc for gdi

This commit is contained in:
Brad Parker 2017-01-04 23:13:08 -05:00
parent a7a1f093c0
commit 33520fca6f
3 changed files with 9 additions and 1 deletions

View File

@ -542,7 +542,7 @@ LRESULT CALLBACK WndProcGDI(HWND hwnd, UINT message,
ui_window_win32_t win32_window;
win32_window.hwnd = hwnd;
g_inited = true;
create_gdi_context(hwnd, &g_quit);
ui_window_win32_set_droppable(&win32_window, true);
}

View File

@ -51,6 +51,7 @@ void win32_monitor_get_info(void);
void win32_monitor_info(void *data, void *hm_data, unsigned *mon_id);
void create_graphics_context(HWND hwnd, bool *quit);
void create_gdi_context(HWND hwnd, bool *quit);
bool win32_shader_dlg_init(void);
void shader_dlg_show(HWND parent_hwnd);

View File

@ -291,6 +291,13 @@ static void gfx_ctx_gdi_swap_buffers(void *data)
(void)data;
}
void create_gdi_context(HWND hwnd, bool *quit)
{
(void)quit;
win32_hdc = GetDC(hwnd);
g_inited = true;
}
const gfx_ctx_driver_t gfx_ctx_gdi = {
gfx_ctx_gdi_init,
gfx_ctx_gdi_destroy,