Different default full screen behavior for Emscripten

This commit is contained in:
Christian Semmler 2025-06-12 14:02:20 -07:00
parent eb84da0476
commit d48ed3749d
No known key found for this signature in database
GPG Key ID: 086DAA1360BEEE5C
2 changed files with 6 additions and 5 deletions

View File

@ -94,7 +94,11 @@ IsleApp::IsleApp()
m_cdPath = NULL;
m_deviceId = NULL;
m_savePath = NULL;
#ifdef __EMSCRIPTEN__
m_fullScreen = FALSE;
#else
m_fullScreen = TRUE;
#endif
m_flipSurfaces = FALSE;
m_backBuffersInVram = TRUE;
m_using8bit = FALSE;

View File

@ -284,11 +284,6 @@ HRESULT DirectDrawImpl::SetCooperativeLevel(HWND hWnd, DDSCLFlags dwFlags)
{
SDL_Window* sdlWindow = reinterpret_cast<SDL_Window*>(hWnd);
#ifdef __EMSCRIPTEN__
DDWindow = sdlWindow;
return DD_OK;
#endif
if (sdlWindow) {
bool fullscreen;
if ((dwFlags & DDSCL_NORMAL) == DDSCL_NORMAL) {
@ -302,7 +297,9 @@ HRESULT DirectDrawImpl::SetCooperativeLevel(HWND hWnd, DDSCLFlags dwFlags)
}
if (!SDL_SetWindowFullscreen(sdlWindow, fullscreen)) {
#ifndef __EMSCRIPTEN__
return DDERR_GENERIC;
#endif
}
DDWindow = sdlWindow;
DDRenderer = SDL_CreateRenderer(DDWindow, NULL);