mirror of
https://github.com/love2d/love.git
synced 2026-08-12 08:30:56 +02:00
Fix physics meter value persisting after love.event.quit("restart").
Fixes #1685
This commit is contained in:
@@ -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.
|
||||
|
||||
@@ -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";
|
||||
|
||||
@@ -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; }
|
||||
|
||||
Reference in New Issue
Block a user