diff --git a/src/Gui.c b/src/Gui.c index 3020a2fe8..4dda48025 100644 --- a/src/Gui.c +++ b/src/Gui.c @@ -652,8 +652,8 @@ static void OnInit(void) { // Tile the texture to fill the entire screen int tilesX = (320 + ctx.width - 1) / ctx.width; int tilesY = (240 + ctx.height - 1) / ctx.height; - touchBgTex.Width *= tilesX; touchBgTex.Height *= tilesY; - touchBgTex.uv.U2 *= tilesX; touchBgTex.uv.V2 *= tilesY; + touchBgTex.width *= tilesX; touchBgTex.height *= tilesY; + touchBgTex.uv.u2 *= tilesX; touchBgTex.uv.v2 *= tilesY; #endif Event_Register_(&ChatEvents.FontChanged, NULL, OnFontChanged); @@ -691,4 +691,4 @@ struct IGameComponent Gui_Component = { OnReset, /* Reset */ NULL, /* OnNewMap */ NULL, /* OnNewMapLoaded */ -}; \ No newline at end of file +}; diff --git a/src/Protocol.c b/src/Protocol.c index 766d7a187..bd2d1a7fb 100644 --- a/src/Protocol.c +++ b/src/Protocol.c @@ -612,11 +612,13 @@ static void Classic_LevelFinalise(cc_uint8* data) { length = Stream_GetU16_BE(data + 4); volume = width * height * length; - if (!map1.blocks) { + if (map1.allocFailed) { + Chat_AddRaw("&cFailed to load map, try joining a different map"); + Chat_AddRaw(" &cNot enough free memory to load the map"); + } else if (!map1.blocks) { Chat_AddRaw("&cFailed to load map, try joining a different map"); Chat_AddRaw(" &cAttempted to load map without a Blocks array"); - } - if (map_volume != volume) { + } else if (map_volume != volume) { Chat_AddRaw("&cFailed to load map, try joining a different map"); Chat_Add2( " &cBlocks array size (%i) does not match volume of map (%i)", &map_volume, &volume); FreeMapStates();