mirror of
https://github.com/isledecomp/isle-portable.git
synced 2026-02-03 12:31:15 +00:00
Update miniwin/miniwin/src/miniwin_ddraw.cpp
Co-authored-by: Anders Jenbo <anders@jenbo.dk>
This commit is contained in:
parent
9f78627646
commit
21a8eac003
@ -253,6 +253,18 @@ HRESULT DirectDrawImpl::RestoreDisplayMode()
|
||||
HRESULT DirectDrawImpl::SetCooperativeLevel(HWND hWnd, DDSCLFlags dwFlags)
|
||||
{
|
||||
if (hWnd) {
|
||||
bool fullscreen;
|
||||
if ((dwFlags & DDSCL_NORMAL) == DDSCL_NORMAL) {
|
||||
fullscreen = false;
|
||||
} else if ((dwFlags & DDSCL_FULLSCREEN) == DDSCL_FULLSCREEN) {
|
||||
fullscreen = true;
|
||||
} else {
|
||||
return DDERR_INVALIDPARAMS;
|
||||
}
|
||||
|
||||
if (!SDL_SetWindowFullscreen(hWnd, fullscreen)) {
|
||||
return DDERR_GENERIC;
|
||||
}
|
||||
renderer = SDL_CreateRenderer(hWnd, NULL);
|
||||
}
|
||||
return DD_OK;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user