mirror of
https://github.com/isledecomp/isle-portable.git
synced 2026-01-11 10:31:16 +00:00
Add full screen support (#560)
This commit is contained in:
parent
37c6abe3b5
commit
4dc8bfc0ac
@ -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
|
||||
}
|
||||
|
||||
@ -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;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user