Use old bitmap on low-bpp displays

git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@7300 212acab6-be3b-0410-9dea-997c60f758d6
This commit is contained in:
anders_k 2021-08-21 22:18:38 +00:00
parent 0302344430
commit aca76bc307
4 changed files with 16 additions and 12 deletions

View file

@ -86,6 +86,13 @@ BOOL InitCCExHelper(UINT icc) {
return (!suppw95 || icce) && ((BOOL(WINAPI*)(const INITCOMMONCONTROLSEX*))icce)(&icx);
}
UINT GetScreenBPP(HWND hWnd) {
HDC hDc = GetDC(hWnd);
UINT bpp = GetDeviceCaps(hDc, BITSPIXEL) * GetDeviceCaps(hDc, PLANES); // TODO: COLORRES if RASTERCAPS&RC_PALETTE?
ReleaseDC(hWnd, hDc);
return bpp;
}
int SetArgv(const TCHAR *cmdLine, TCHAR ***argv) {
const TCHAR *p;
TCHAR *arg, *argSpace;