(GDI) Weird code - clean this up

This commit is contained in:
twinaphex 2020-06-07 02:55:51 +02:00
parent 7b5ea63329
commit b42897d0b6

View File

@ -1166,35 +1166,28 @@ LRESULT CALLBACK WndProcGDI(HWND hwnd, UINT message,
if (gdi && gdi->memDC) if (gdi && gdi->memDC)
{ {
gdi->bmp_old = (HBITMAP)SelectObject(gdi->memDC, gdi->bmp); gdi->bmp_old = (HBITMAP)SelectObject(gdi->memDC, gdi->bmp);
#ifdef HAVE_MENU /* Draw video content */
if (menu_driver_is_alive() && !gdi_has_menu_frame(gdi)) StretchBlt(
{ gdi->winDC,
/* draw menu contents behind a gradient background */ 0,
if (gdi && gdi->memDC) 0,
StretchBlt(gdi->winDC, gdi->screen_width,
0, 0, gdi->screen_height,
gdi->screen_width, gdi->screen_height, gdi->memDC,
gdi->memDC, 0, 0, gdi->video_width, gdi->video_height, SRCCOPY); 0,
} 0,
else gdi->video_width,
#endif gdi->video_height,
{ SRCCOPY);
/* draw video content */
gdi->bmp_old = (HBITMAP)SelectObject(gdi->memDC, gdi->bmp);
StretchBlt(gdi->winDC, SelectObject(gdi->memDC, gdi->bmp_old);
0, 0, }
gdi->screen_width, gdi->screen_height,
gdi->memDC, 0, 0, gdi->video_width, gdi->video_height, SRCCOPY);
}
SelectObject(gdi->memDC, gdi->bmp_old);
}
#if _WIN32_WINNT >= 0x0500 /* 2K */ #if _WIN32_WINNT >= 0x0500 /* 2K */
if (g_win32->taskbar_message && message == g_win32->taskbar_message) if ( g_win32->taskbar_message
&& message == g_win32->taskbar_message)
taskbar_is_created = true; taskbar_is_created = true;
#endif #endif
break; break;