Skip to content

Commit dad40c4

Browse files
authored
Merge branch 'master' into add-mortar-layer
2 parents ba11ad5 + 4048e74 commit dad40c4

File tree

3 files changed

+9
-1
lines changed

3 files changed

+9
-1
lines changed

ISLE/isleapp.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -938,6 +938,12 @@ MxResult IsleApp::SetupWindow()
938938
#endif
939939

940940
window = MORTAR_EX_CreateWindow(&createWindowProps);
941+
942+
#ifdef __EMSCRIPTEN__
943+
// Force correct window size since SDL3 may have picked up CSS dimensions
944+
MORTAR_SetWindowSize(window, g_targetWidth, g_targetHeight);
945+
#endif
946+
941947
MORTAR_EXT_SetWindowProperty(window, MORTAR_WINDOW_PROPERTY_USER, &m_videoParam);
942948

943949
if (m_exclusiveFullScreen && m_fullScreen) {

extensions/src/textureloader.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,7 @@ bool TextureLoader::PatchTexture(LegoTextureInfo* p_textureInfo)
6464
if (details->bits_per_pixel == 8) {
6565
MORTAR_Palette* sdlPalette = MORTAR_GetSurfacePalette(surface);
6666
if (!sdlPalette) {
67+
p_textureInfo->m_surface->Unlock(desc.lpSurface);
6768
MORTAR_DestroySurface(surface);
6869
return false;
6970
}
@@ -78,6 +79,7 @@ bool TextureLoader::PatchTexture(LegoTextureInfo* p_textureInfo)
7879

7980
LPDIRECTDRAWPALETTE ddPalette = nullptr;
8081
if (pDirectDraw->CreatePalette(DDPCAPS_8BIT | DDPCAPS_ALLOW256, entries, &ddPalette, NULL) != DD_OK) {
82+
p_textureInfo->m_surface->Unlock(desc.lpSurface);
8183
MORTAR_DestroySurface(surface);
8284
return false;
8385
}

0 commit comments

Comments
 (0)