File tree 2 files changed +12
-8
lines changed
2 files changed +12
-8
lines changed Original file line number Diff line number Diff line change @@ -248,16 +248,16 @@ function love.load()
248
248
audio .mute ()
249
249
end ,
250
250
[" 1" ] = function ()
251
- visualization .set (1 )
251
+ visualization .setType (1 )
252
252
end ,
253
253
[" 2" ] = function ()
254
- visualization .set (2 )
254
+ visualization .setType (2 )
255
255
end ,
256
256
[" 3" ] = function ()
257
- visualization .set (3 )
257
+ visualization .setType (3 )
258
258
end ,
259
259
[" 4" ] = function ()
260
- visualization .set (4 )
260
+ visualization .setType (4 )
261
261
end ,
262
262
[" escape" ] = function ()
263
263
if love .window .getFullscreen () then
@@ -294,7 +294,11 @@ function love.load()
294
294
295
295
gui .load ()
296
296
297
- MONITOR_REFRESH_RATE = ({love .window .getMode ()})[3 ].refreshrate
297
+ -- If refresh rate can be determined, use it.
298
+ local potential_refresh_rate = ({love .window .getMode ()})[3 ].refreshrate
299
+ if potential_refresh_rate ~= 0 then
300
+ MONITOR_REFRESH_RATE = potential_refresh_rate
301
+ end
298
302
299
303
--[[ Init Location Jumping ]]
300
304
if config .init_location == " sysaudio" then
@@ -614,7 +618,7 @@ function love.quit()
614
618
615
619
-- If need to update config values, set flag to true and save new values.
616
620
if config .session_persistence then
617
- local visualization_type = visualization .get ()
621
+ local visualization_type = visualization .getType ()
618
622
local shuffle = audio .isShuffling ()
619
623
local loop = audio .isLooping ()
620
624
local mute = audio .isMuted ()
Original file line number Diff line number Diff line change @@ -209,15 +209,15 @@ end
209
209
210
210
--- Sets the type of bar visualization.
211
211
-- @param v number: An integer of 1-4. Each changes the bar visualization properties.
212
- function visualization .set (v )
212
+ function visualization .setType (v )
213
213
214
214
visualizer_type = v
215
215
216
216
end
217
217
218
218
--- Obtains the type of bar visualization.
219
219
-- @return number: An integer of 1-4. The type of bar visualization.
220
- function visualization .get ()
220
+ function visualization .getType ()
221
221
222
222
return visualizer_type
223
223
You can’t perform that action at this time.
0 commit comments