Skip to content

Commit 03794d5

Browse files
committed
Update to 0.11.1 and stop fft and drawing when minimized
The love.isVisible callback is buggy and only works in certain scenarios, but despite that the new love.window.isMinimized() function somehow works perfectly (at least on Windows).
1 parent 12d4edb commit 03794d5

File tree

526 files changed

+4228
-161152
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

526 files changed

+4228
-161152
lines changed

conf.lua

+5-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
function love.conf(t)
22
t.identity = "Drop" -- The name of the save directory (string)
3-
t.version = "0.11.0" -- The L�VE version this game was made for (string)
3+
t.version = "11.1" -- The L�VE version this game was made for (string)
44
t.console = false -- Attach a console (boolean, Windows only)
55
t.accelerometerjoystick = false -- Enable the accelerometer on iOS and Android by exposing it as a Joystick (boolean)
66
t.externalstorage = false -- True to save files (and read from the save directory) in external storage on Android (boolean)
@@ -9,7 +9,9 @@ function love.conf(t)
99
t.window = nil
1010

1111
t.modules.audio = true -- Enable the audio module (boolean)
12+
t.modules.data = true -- Enable the data module (boolean)
1213
t.modules.event = true -- Enable the event module (boolean)
14+
t.modules.font = true -- Enable the font module (boolean)
1315
t.modules.graphics = true -- Enable the graphics module (boolean)
1416
t.modules.image = true -- Enable the image module (boolean)
1517
t.modules.joystick = false -- Enable the joystick module (boolean)
@@ -19,9 +21,9 @@ function love.conf(t)
1921
t.modules.physics = false -- Enable the physics module (boolean)
2022
t.modules.sound = true -- Enable the sound module (boolean)
2123
t.modules.system = true -- Enable the system module (boolean)
24+
t.modules.thread = false -- Enable the thread module (boolean)
2225
t.modules.timer = true -- Enable the timer module (boolean), Disabling it will result 0 delta time in love.update
2326
t.modules.touch = false -- Enable the touch module (boolean)
24-
t.modules.video = true -- Enable the video module (boolean)
27+
t.modules.video = false -- Enable the video module (boolean)
2528
t.modules.window = true -- Enable the window module (boolean)
26-
t.modules.thread = false -- Enable the thread module (boolean)
2729
end

main.lua

+5-3
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ function love.update(dt)
9696
if audio.musicExists() then
9797
audio.update()
9898

99-
if spectrum.wouldChange() and window_visible then
99+
if spectrum.wouldChange() and window_visible and not love.window.isMinimized() then
100100
-- fft calculations (generates waveform for visualization)
101101
waveform = spectrum.generateWaveform()
102102

@@ -119,7 +119,9 @@ function love.update(dt)
119119
end
120120

121121
function love.draw()
122-
spectrum.draw(waveform)
122+
if not love.window.isMinimized() then
123+
spectrum.draw(waveform)
124+
end
123125

124126
-- controls visualization fade
125127
if fade_bool then
@@ -253,5 +255,5 @@ function love.filedropped(file)
253255
end
254256

255257
function love.visible(v)
256-
--window_visible = v
258+
window_visible = v
257259
end
Binary file not shown.

0 commit comments

Comments
 (0)