From a4a075dd2e7b7932ba45388aebda83ae94163aa9 Mon Sep 17 00:00:00 2001 From: Alex Szpakowski Date: Thu, 10 Jul 2014 16:16:00 -0300 Subject: [PATCH 1/3] Fixed crashes and instability when love.graphics.setMode is called when a vertex buffer is mapped by love. --- src/modules/graphics/opengl/VertexBuffer.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/modules/graphics/opengl/VertexBuffer.cpp b/src/modules/graphics/opengl/VertexBuffer.cpp index 43c9282f9..88da3b854 100644 --- a/src/modules/graphics/opengl/VertexBuffer.cpp +++ b/src/modules/graphics/opengl/VertexBuffer.cpp @@ -291,13 +291,11 @@ void VBO::unload(bool save) if (save && getMemoryBacking() == BACKING_PARTIAL) { VertexBuffer::Bind bind(*this); - - bool mapped = is_mapped; - map(); // saves buffer content to memory_map. - is_mapped = mapped; } + is_mapped = false; + glDeleteBuffersARB(1, &vbo); vbo = 0; } From 0841ff209b695f86c9ff1f649ab831c316c15c70 Mon Sep 17 00:00:00 2001 From: Alex Szpakowski Date: Thu, 10 Jul 2014 20:54:35 -0300 Subject: [PATCH 2/3] =?UTF-8?q?license.txt=20is=20now=20distributed=20with?= =?UTF-8?q?=20the=20OS=20X=20build=20of=20L=C3=96VE=20in=20love.app/Conten?= =?UTF-8?q?ts/Resources/.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- license.txt | 8 ++++---- platform/macosx/love.xcodeproj/project.pbxproj | 4 ++++ 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/license.txt b/license.txt index c087cc71c..9de86ee33 100644 --- a/license.txt +++ b/license.txt @@ -23,14 +23,14 @@ distribution. ------- -LÖVE also uses the following LGPL libraries: +LÖVE uses the following LGPL libraries: - libmpg123 Website: http://www.mpg123.de/ Source download: http://sourceforge.net/projects/mpg123/files/latest/download - - OpenAL - Website: http://connect.creativelabs.com/openal/default.aspx - Source download: http://connect.creativelabs.com/openal/Downloads/openal-soft-1.13.tbz2 + - OpenAL Soft + Website: http://kcat.strangesoft.net/openal.html + Source download: http://kcat.strangesoft.net/openal.html#download - DevIL Website: http://openil.sourceforge.net/ Source download: http://downloads.sourceforge.net/openil/DevIL-1.7.8.tar.gz diff --git a/platform/macosx/love.xcodeproj/project.pbxproj b/platform/macosx/love.xcodeproj/project.pbxproj index ab34a46bf..c1e0dad5e 100644 --- a/platform/macosx/love.xcodeproj/project.pbxproj +++ b/platform/macosx/love.xcodeproj/project.pbxproj @@ -25,6 +25,7 @@ FA9B4A0A16E1579F00074F42 /* SDL2.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FA9B4A0916E1579F00074F42 /* SDL2.framework */; }; FA9B4A0B16E157B500074F42 /* SDL2.framework in Copy Frameworks */ = {isa = PBXBuildFile; fileRef = FA9B4A0916E1579F00074F42 /* SDL2.framework */; }; FAAFF04716CB120000CCDE45 /* OpenAL-Soft.framework in Copy Frameworks */ = {isa = PBXBuildFile; fileRef = FAAFF04616CB120000CCDE45 /* OpenAL-Soft.framework */; }; + FAC1A449196F5DC600125284 /* license.txt in Resources */ = {isa = PBXBuildFile; fileRef = FAC1A448196F5DC600125284 /* license.txt */; }; FAC8E8D416F3C468004DADF3 /* OSX.mm in Sources */ = {isa = PBXBuildFile; fileRef = FAC8E8D316F3C468004DADF3 /* OSX.mm */; }; /* End PBXBuildFile section */ @@ -82,6 +83,7 @@ FA577A9316C7217800860150 /* love-framework.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; path = "love-framework.xcodeproj"; sourceTree = ""; }; FA9B4A0916E1579F00074F42 /* SDL2.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = SDL2.framework; path = /Library/Frameworks/SDL2.framework; sourceTree = ""; }; FAAFF04616CB120000CCDE45 /* OpenAL-Soft.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = "OpenAL-Soft.framework"; path = "/Library/Frameworks/OpenAL-Soft.framework"; sourceTree = ""; }; + FAC1A448196F5DC600125284 /* license.txt */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = license.txt; path = ../../license.txt; sourceTree = ""; }; FAC8E8D316F3C468004DADF3 /* OSX.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = OSX.mm; sourceTree = ""; }; FAC8E8D616F3C46E004DADF3 /* OSX.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = OSX.h; sourceTree = ""; }; /* End PBXFileReference section */ @@ -145,6 +147,7 @@ 29B97317FDCFA39411CA2CEA /* Resources */ = { isa = PBXGroup; children = ( + FAC1A448196F5DC600125284 /* license.txt */, A97E3842132A9EDE00198A2F /* love-Info.plist */, A9DEC1BF1046EFA60049C70C /* Love.icns */, A9DEC1C01046EFA70049C70C /* LoveDocument.icns */, @@ -240,6 +243,7 @@ isa = PBXResourcesBuildPhase; buildActionMask = 2147483647; files = ( + FAC1A449196F5DC600125284 /* license.txt in Resources */, A9DEC1C11046EFA70049C70C /* Love.icns in Resources */, A9DEC1C21046EFA70049C70C /* LoveDocument.icns in Resources */, ); From a658c7df765c99fc06b4c51461d3747f85e1e8ad Mon Sep 17 00:00:00 2001 From: Alex Szpakowski Date: Sat, 12 Jul 2014 21:12:21 -0300 Subject: [PATCH 3/3] Fixed the error screen when highdpi mode is enabled on a retina monitor in OS X (resolves issue #908) --- src/scripts/boot.lua | 5 +++-- src/scripts/boot.lua.h | 13 +++++++++---- 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/src/scripts/boot.lua b/src/scripts/boot.lua index 15b1d65e3..3c27c3243 100644 --- a/src/scripts/boot.lua +++ b/src/scripts/boot.lua @@ -1563,7 +1563,7 @@ function love.errhand(msg) if love.audio then love.audio.stop() end love.graphics.reset() love.graphics.setBackgroundColor(89, 157, 220) - local font = love.graphics.setNewFont(14) + local font = love.graphics.setNewFont(math.floor(14 * love.window.getPixelScale())) love.graphics.setColor(255, 255, 255, 255) @@ -1590,8 +1590,9 @@ function love.errhand(msg) p = string.gsub(p, "%[string \"(.-)\"%]", "%1") local function draw() + local pos = 70 * love.window.getPixelScale() love.graphics.clear() - love.graphics.printf(p, 70, 70, love.graphics.getWidth() - 70) + love.graphics.printf(p, pos, pos, love.graphics.getWidth() - pos) love.graphics.present() end diff --git a/src/scripts/boot.lua.h b/src/scripts/boot.lua.h index fc9156515..c3e9b5622 100644 --- a/src/scripts/boot.lua.h +++ b/src/scripts/boot.lua.h @@ -5286,7 +5286,9 @@ const unsigned char boot_lua[] = 0x2c, 0x20, 0x31, 0x35, 0x37, 0x2c, 0x20, 0x32, 0x32, 0x30, 0x29, 0x0a, 0x09, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x20, 0x66, 0x6f, 0x6e, 0x74, 0x20, 0x3d, 0x20, 0x6c, 0x6f, 0x76, 0x65, 0x2e, 0x67, 0x72, 0x61, 0x70, 0x68, 0x69, 0x63, 0x73, 0x2e, 0x73, 0x65, 0x74, 0x4e, 0x65, 0x77, 0x46, 0x6f, - 0x6e, 0x74, 0x28, 0x31, 0x34, 0x29, 0x0a, + 0x6e, 0x74, 0x28, 0x6d, 0x61, 0x74, 0x68, 0x2e, 0x66, 0x6c, 0x6f, 0x6f, 0x72, 0x28, 0x31, 0x34, 0x20, 0x2a, + 0x20, 0x6c, 0x6f, 0x76, 0x65, 0x2e, 0x77, 0x69, 0x6e, 0x64, 0x6f, 0x77, 0x2e, 0x67, 0x65, 0x74, 0x50, 0x69, + 0x78, 0x65, 0x6c, 0x53, 0x63, 0x61, 0x6c, 0x65, 0x28, 0x29, 0x29, 0x29, 0x0a, 0x09, 0x6c, 0x6f, 0x76, 0x65, 0x2e, 0x67, 0x72, 0x61, 0x70, 0x68, 0x69, 0x63, 0x73, 0x2e, 0x73, 0x65, 0x74, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x28, 0x32, 0x35, 0x35, 0x2c, 0x20, 0x32, 0x35, 0x35, 0x2c, 0x20, 0x32, 0x35, 0x35, 0x2c, 0x20, 0x32, 0x35, 0x35, 0x29, 0x0a, @@ -5324,12 +5326,15 @@ const unsigned char boot_lua[] = 0x5c, 0x22, 0x25, 0x5d, 0x22, 0x2c, 0x20, 0x22, 0x25, 0x31, 0x22, 0x29, 0x0a, 0x09, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x20, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x64, 0x72, 0x61, 0x77, 0x28, 0x29, 0x0a, + 0x09, 0x09, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x20, 0x70, 0x6f, 0x73, 0x20, 0x3d, 0x20, 0x37, 0x30, 0x20, 0x2a, + 0x20, 0x6c, 0x6f, 0x76, 0x65, 0x2e, 0x77, 0x69, 0x6e, 0x64, 0x6f, 0x77, 0x2e, 0x67, 0x65, 0x74, 0x50, 0x69, + 0x78, 0x65, 0x6c, 0x53, 0x63, 0x61, 0x6c, 0x65, 0x28, 0x29, 0x0a, 0x09, 0x09, 0x6c, 0x6f, 0x76, 0x65, 0x2e, 0x67, 0x72, 0x61, 0x70, 0x68, 0x69, 0x63, 0x73, 0x2e, 0x63, 0x6c, 0x65, 0x61, 0x72, 0x28, 0x29, 0x0a, 0x09, 0x09, 0x6c, 0x6f, 0x76, 0x65, 0x2e, 0x67, 0x72, 0x61, 0x70, 0x68, 0x69, 0x63, 0x73, 0x2e, 0x70, 0x72, - 0x69, 0x6e, 0x74, 0x66, 0x28, 0x70, 0x2c, 0x20, 0x37, 0x30, 0x2c, 0x20, 0x37, 0x30, 0x2c, 0x20, 0x6c, 0x6f, - 0x76, 0x65, 0x2e, 0x67, 0x72, 0x61, 0x70, 0x68, 0x69, 0x63, 0x73, 0x2e, 0x67, 0x65, 0x74, 0x57, 0x69, 0x64, - 0x74, 0x68, 0x28, 0x29, 0x20, 0x2d, 0x20, 0x37, 0x30, 0x29, 0x0a, + 0x69, 0x6e, 0x74, 0x66, 0x28, 0x70, 0x2c, 0x20, 0x70, 0x6f, 0x73, 0x2c, 0x20, 0x70, 0x6f, 0x73, 0x2c, 0x20, + 0x6c, 0x6f, 0x76, 0x65, 0x2e, 0x67, 0x72, 0x61, 0x70, 0x68, 0x69, 0x63, 0x73, 0x2e, 0x67, 0x65, 0x74, 0x57, + 0x69, 0x64, 0x74, 0x68, 0x28, 0x29, 0x20, 0x2d, 0x20, 0x70, 0x6f, 0x73, 0x29, 0x0a, 0x09, 0x09, 0x6c, 0x6f, 0x76, 0x65, 0x2e, 0x67, 0x72, 0x61, 0x70, 0x68, 0x69, 0x63, 0x73, 0x2e, 0x70, 0x72, 0x65, 0x73, 0x65, 0x6e, 0x74, 0x28, 0x29, 0x0a, 0x09, 0x65, 0x6e, 0x64, 0x0a,