Added love.quit callback

This commit is contained in:
Bart van Strien
2010-07-31 16:22:12 +02:00
parent 57f25a98e4
commit 55ec59810d
4 changed files with 710 additions and 701 deletions
+2 -1
View File
@@ -6,7 +6,8 @@ LOVE 0.7.0
* Added Source:isStatic().
* Added get/setGroupIndex to CircleShape and PolygonShape.
* Added Font:getWrap.
* Added identity field to love.conf.
* Added identity field to love.conf.
* Added love.quit callback.
* Enabled love.filesystem.FileData.
* Fixed bug where the debug module was not an upvalue of the error handlers. (you can now override debug)
* Fixed bug where love.audio.pause and friends were acting on everything, not just the passed Source.
@@ -19,14 +19,16 @@
#ifndef B2_SETTINGS_H
#define B2_SETTINGS_H
#include <assert.h>
//#include <assert.h>
#include <common/Exception.h>
#include <cmath>
#define B2_NOT_USED(x) x
#define b2Assert(A) assert(A)
//#define b2Assert(A) assert(A)
#define b2Assert(A) {if(!(A)) throw love::Exception("Box2D error: " #A);}
// need to include NDS jtypes.h instead of
// need to include NDS jtypes.h instead of
// usual typedefs because NDS jtypes defines
// them slightly differently, oh well.
#ifdef TARGET_IS_NDS
+5 -3
View File
@@ -319,10 +319,12 @@ function love.run()
if love.event then
for e,a,b,c in love.event.poll() do
if e == "q" then
if love.audio then
love.audio.stop()
if not love.quit or not love.quit() then
if love.audio then
love.audio.stop()
end
return
end
return
end
love.handlers[e](a,b,c)
end
+698 -694
View File
File diff suppressed because it is too large Load Diff