Fixed warning C4204: nonstandard extension used: non-constant aggregate initializer when built with Visual Studio 2019
This commit is contained in:
@@ -966,11 +966,11 @@ WIN_WindowProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
|
||||
if (IS_HIGH_SURROGATE(wParam)) {
|
||||
data->high_surrogate = (WCHAR)wParam;
|
||||
} else {
|
||||
WCHAR utf16[] = {
|
||||
data->high_surrogate ? data->high_surrogate : (WCHAR)wParam,
|
||||
data->high_surrogate ? (WCHAR)wParam : L'\0',
|
||||
L'\0'
|
||||
};
|
||||
WCHAR utf16[3];
|
||||
|
||||
utf16[0] = data->high_surrogate ? data->high_surrogate : (WCHAR)wParam;
|
||||
utf16[1] = data->high_surrogate ? (WCHAR)wParam : L'\0';
|
||||
utf16[2] = L'\0';
|
||||
|
||||
char utf8[5];
|
||||
int result = WIN_WideCharToMultiByte(CP_UTF8, WC_ERR_INVALID_CHARS, utf16, -1, utf8, sizeof(utf8), NULL, NULL);
|
||||
|
||||
@@ -719,7 +719,11 @@ int WIN_CreateWindow(SDL_VideoDevice *_this, SDL_Window *window, SDL_PropertiesI
|
||||
We can use (-1, -1, 0, 0) boundary to make sure no pixels are being blurred
|
||||
*/
|
||||
HRGN rgn = CreateRectRgn(-1, -1, 0, 0);
|
||||
DWM_BLURBEHIND bb = {DWM_BB_ENABLE | DWM_BB_BLURREGION, TRUE, rgn, FALSE};
|
||||
DWM_BLURBEHIND bb;
|
||||
bb.flags = (DWM_BB_ENABLE | DWM_BB_BLURREGION);
|
||||
bb.enable = TRUE;
|
||||
bb.blur_region = rgn;
|
||||
bb.transition_on_maxed = FALSE;
|
||||
DwmEnableBlurBehindWindowFunc(hwnd, &bb);
|
||||
DeleteObject(rgn);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user