mirror of
https://github.com/love2d/love.git
synced 2026-08-13 17:10:54 +02:00
math and data module instances are now deleted when they have no more Lua references (matches the behaviour of other modules.) Fixes the deprecation system not fully restarting when love.event.quit("restart") is called.
Resolves issue #1462.
This commit is contained in:
@@ -199,14 +199,9 @@ float linearToGamma(float c)
|
||||
return 1.055f * powf(c, 1.0f / 2.4f) - 0.055f;
|
||||
}
|
||||
|
||||
Math Math::instance;
|
||||
|
||||
Math::Math()
|
||||
: rng()
|
||||
{
|
||||
// prevent the runtime from free()-ing this
|
||||
retain();
|
||||
|
||||
RandomGenerator::Seed seed;
|
||||
seed.b64 = (uint64) time(nullptr);
|
||||
rng.setSeed(seed);
|
||||
|
||||
Reference in New Issue
Block a user