Fix physics meter value persisting after love.event.quit("restart").

Fixes #1685
This commit is contained in:
Alex Szpakowski
2021-04-11 19:53:16 -03:00
parent 6f8c48f6cd
commit 977c690fa9
3 changed files with 14 additions and 0 deletions
+1
View File
@@ -18,6 +18,7 @@ Released: N/A
* Fixed fused macOS apps opening other love games when drag-and-drop is used (if the fused app hasn't already removed .love files from recognized document types).
* Fixed File:isEOF when called on a dropped file.
* Fixed support for > 2GB dropped files on desktops.
* Fixed love.physics meter scale value persisting after love.event.quit("restart").
* Fixed audio to resume properly after interruption on iOS.
* Fixed initial window creation to set the window's title during creation instead of after.
* Fixed the window's screen position when exiting fullscreen via love.window.setFullscreen.
+10
View File
@@ -31,8 +31,18 @@ namespace physics
namespace box2d
{
// TODO: Make this not static.
float Physics::meter = Physics::DEFAULT_METER;
Physics::Physics()
{
meter = DEFAULT_METER;
}
Physics::~Physics()
{
}
const char *Physics::getName() const
{
return "love.physics.box2d";
+3
View File
@@ -61,6 +61,9 @@ public:
**/
static const int DEFAULT_METER = 30;
Physics();
virtual ~Physics();
// Implements Module.
const char *getName() const;
virtual ModuleType getModuleType() const { return M_PHYSICS; }