From f253a016f66048ebc7f0fb5bd7311747cd28dfe2 Mon Sep 17 00:00:00 2001 From: Alex Szpakowski Date: Sat, 8 Jun 2013 19:56:36 -0300 Subject: [PATCH] Cleaned up love.run a bit --- src/scripts/boot.lua | 5 ++--- src/scripts/boot.lua.h | 4 ---- 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/src/scripts/boot.lua b/src/scripts/boot.lua index 50fd781a0..a59deae72 100644 --- a/src/scripts/boot.lua +++ b/src/scripts/boot.lua @@ -456,15 +456,14 @@ function love.run() -- Call update and draw if love.update then love.update(dt) end -- will pass 0 if love.timer is disabled + if love.window and love.graphics then love.graphics.clear() love.graphics.origin() if love.draw then love.draw() end - end - - if love.window and love.graphics then love.graphics.present() end + if love.timer then love.timer.sleep(0.001) end end diff --git a/src/scripts/boot.lua.h b/src/scripts/boot.lua.h index 0089f0b9a..e221ea70a 100644 --- a/src/scripts/boot.lua.h +++ b/src/scripts/boot.lua.h @@ -805,10 +805,6 @@ const unsigned char boot_lua[] = 0x72, 0x69, 0x67, 0x69, 0x6e, 0x28, 0x29, 0x0a, 0x09, 0x09, 0x09, 0x69, 0x66, 0x20, 0x6c, 0x6f, 0x76, 0x65, 0x2e, 0x64, 0x72, 0x61, 0x77, 0x20, 0x74, 0x68, 0x65, 0x6e, 0x20, 0x6c, 0x6f, 0x76, 0x65, 0x2e, 0x64, 0x72, 0x61, 0x77, 0x28, 0x29, 0x20, 0x65, 0x6e, 0x64, 0x0a, - 0x09, 0x09, 0x65, 0x6e, 0x64, 0x0a, - 0x09, 0x09, 0x69, 0x66, 0x20, 0x6c, 0x6f, 0x76, 0x65, 0x2e, 0x77, 0x69, 0x6e, 0x64, 0x6f, 0x77, 0x20, 0x61, - 0x6e, 0x64, 0x20, 0x6c, 0x6f, 0x76, 0x65, 0x2e, 0x67, 0x72, 0x61, 0x70, 0x68, 0x69, 0x63, 0x73, 0x20, 0x74, - 0x68, 0x65, 0x6e, 0x0a, 0x09, 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, 0x09, 0x65, 0x6e, 0x64, 0x0a,