GDI: fix window not responding, but menu corruption still happens if set_gdi_pixel_format is called
This commit is contained in:
parent
bdc68e679f
commit
6c62901ae5
|
@ -521,19 +521,20 @@ LRESULT CALLBACK WndProcGDI(HWND hwnd, UINT message,
|
||||||
|
|
||||||
switch (message)
|
switch (message)
|
||||||
{
|
{
|
||||||
case WM_PAINT:
|
//case WM_PAINT:
|
||||||
{
|
//{
|
||||||
PAINTSTRUCT ps;
|
/*PAINTSTRUCT ps;
|
||||||
HDC hdc = BeginPaint(hwnd, &ps);
|
HDC hdc = BeginPaint(hwnd, &ps);
|
||||||
|
|
||||||
// All painting occurs here, between BeginPaint and EndPaint.
|
// All painting occurs here, between BeginPaint and EndPaint.
|
||||||
|
|
||||||
//FillRect(hdc, &ps.rcPaint, (HBRUSH) (COLOR_WINDOW+1));
|
FillRect(hdc, &ps.rcPaint, (HBRUSH) (COLOR_WINDOW+1));
|
||||||
|
|
||||||
EndPaint(hwnd, &ps);
|
EndPaint(hwnd, &ps);*/
|
||||||
return 0;
|
//return DefWindowProc(hwnd, message, wparam, lparam);
|
||||||
break;
|
//return 0;
|
||||||
}
|
//break;
|
||||||
|
//}
|
||||||
case WM_DROPFILES:
|
case WM_DROPFILES:
|
||||||
case WM_SYSCOMMAND:
|
case WM_SYSCOMMAND:
|
||||||
case WM_CHAR:
|
case WM_CHAR:
|
||||||
|
|
|
@ -354,8 +354,25 @@ static void gdi_gfx_set_nonblock_state(void *data, bool toggle)
|
||||||
|
|
||||||
static bool gdi_gfx_alive(void *data)
|
static bool gdi_gfx_alive(void *data)
|
||||||
{
|
{
|
||||||
(void)data;
|
gfx_ctx_size_t size_data;
|
||||||
video_driver_set_size(&gdi_video_width, &gdi_video_height);
|
unsigned temp_width = 0;
|
||||||
|
unsigned temp_height = 0;
|
||||||
|
bool quit = false;
|
||||||
|
bool resize = false;
|
||||||
|
|
||||||
|
/* Needed because some context drivers don't track their sizes */
|
||||||
|
video_driver_get_size(&temp_width, &temp_height);
|
||||||
|
|
||||||
|
size_data.quit = &quit;
|
||||||
|
size_data.resize = &resize;
|
||||||
|
size_data.width = &temp_width;
|
||||||
|
size_data.height = &temp_height;
|
||||||
|
|
||||||
|
video_context_driver_check_window(&size_data);
|
||||||
|
|
||||||
|
if (temp_width != 0 && temp_height != 0)
|
||||||
|
video_driver_set_size(&temp_width, &temp_height);
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -298,7 +298,7 @@ void create_gdi_context(HWND hwnd, bool *quit)
|
||||||
(void)quit;
|
(void)quit;
|
||||||
win32_gdi_hdc = GetDC(hwnd);
|
win32_gdi_hdc = GetDC(hwnd);
|
||||||
|
|
||||||
setup_gdi_pixel_format(win32_gdi_hdc);
|
//setup_gdi_pixel_format(win32_gdi_hdc);
|
||||||
|
|
||||||
g_inited = true;
|
g_inited = true;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue