mirror of
https://github.com/love2d/love.git
synced 2026-08-12 08:30:56 +02:00
Added love.quit callback
This commit is contained in:
+2
-1
@@ -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
|
||||
|
||||
@@ -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
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user