Add full screen support

This commit is contained in:
Christian Semmler 2025-07-08 15:02:31 -07:00
parent 37c6abe3b5
commit 3b7397170e
No known key found for this signature in database
GPG Key ID: 086DAA1360BEEE5C
2 changed files with 7 additions and 2 deletions

View File

@ -3,6 +3,7 @@
#include "filesystem.h"
#include <SDL3/SDL_log.h>
#include <emscripten.h>
#include <iniparser.h>
void Emscripten_SetupDefaultConfigOverrides(dictionary* p_dictionary)
@ -14,4 +15,8 @@ void Emscripten_SetupDefaultConfigOverrides(dictionary* p_dictionary)
iniparser_set(p_dictionary, "isle:savepath", Emscripten_savePath);
iniparser_set(p_dictionary, "isle:Full Screen", "false");
iniparser_set(p_dictionary, "isle:Flip Surfaces", "true");
// clang-format off
MAIN_THREAD_EM_ASM({JSEvents.fullscreenEnabled = function() { return false; }});
// clang-format on
}

View File

@ -311,11 +311,11 @@ HRESULT DirectDrawImpl::SetCooperativeLevel(HWND hWnd, DDSCLFlags dwFlags)
return DDERR_INVALIDPARAMS;
}
if (!SDL_SetWindowFullscreen(sdlWindow, fullscreen)) {
#ifndef __EMSCRIPTEN__
if (!SDL_SetWindowFullscreen(sdlWindow, fullscreen)) {
return DDERR_GENERIC;
#endif
}
#endif
DDWindow = sdlWindow;
}
return DD_OK;