Commits

Marek Kubica committed 2a313bc Draft Merge

Merged cluke009/zoetrope into default

  • Participants
  • Parent commits f0c2bdd, 7137ebf

Comments (0)

Files changed (3)

File zoetrope/core/app.lua

 		-- set icon if possible
 
 		if self.icon then
-			love.graphics.setIcon(Cached:image(self.icon))
+			love.window.setIcon(Cached:image(self.icon))
 		end
 
 		-- view containers
 			assert(self.fullscreen, 'asked to exit fullscreen when already out of fullscreen')
 		end
 
-		love.graphics.setMode(self.width, self.height, false)
+		love.window.setMode(self.width, self.height, {fullscreen = false})
 		love.graphics.setScissor(0, 0, self.width, self.height)
 		self.fullscreen = false
 		self.inset.x = 0

File zoetrope/input/gamepad.lua

 	-- to the appropriate gamepad.
 
 	_dispatchPress = function (number, button)
-	print(button)
 		if the.gamepads[number] then
 			the.gamepads[number]:buttonPressed(button)
 		end

File zoetrope/utils/storage.lua

 -- retains your data across a single app session. If you want to be notified
 -- when errors occur, check the <save()> and <load()> methods' arguments.
 --
--- Make sure to set your app's identity in conf.lua, so that your 
+-- Make sure to set your app's identity in conf.lua, so that your
 -- files don't clobber some other app's. See https://love2d.org/wiki/Config_Files
 -- for details.
 --
 	-- Arguments:
 	--		values - table of values to set before saving, optional -- these
 	--		act in addition to anything previously set in the <data>
-	--		ignoreError - silently ignore any errors saving, defaults to true 
+	--		ignoreError - silently ignore any errors saving, defaults to true
 	--
 	-- Returns:
 	--		nothing
 	load = function (self, ignoreError)
 		if ignoreError ~= false then ignoreError = true end
 
-		local ok, data = pcall(love.filesystem.read, self.filename)
+		local ok = love.filesystem.isFile(self.filename)
 
 		if ok then
-			ok, self.data = pcall(loadstring('return ' .. data))
-			
+			ok, self.data = pcall(loadstring('return ' .. love.filesystem.read(self.filename)))
+
 			if not ok then
 				if ignoreError then
 					self.data = {}
 			end
 		else
 			if not ignoreError then
-				error("could not load storage from disk: " .. data)
+				error("could not load storage from disk: " .. love.filesystem.read(self.filename))
 			end
 		end