Skip to content

Commit

Permalink
refactor: fixed luacheck problems
Browse files Browse the repository at this point in the history
  • Loading branch information
jonasgeiler committed Sep 19, 2024
1 parent 497c4eb commit 2f043cb
Show file tree
Hide file tree
Showing 3 changed files with 49 additions and 48 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ If you want to see the old version, check out the [`old-version`][old-version] t

## Screenshot

![Screenshot](https://github.com/user-attachments/assets/4a38974f-80a0-4770-9e3c-140727b7670e)
![Screenshot](https://github.com/user-attachments/assets/612a4048-1ce7-4dee-abc6-6cf6530ec3bf)

## Requirements

Expand Down
92 changes: 46 additions & 46 deletions joysticktester/conf.lua
Original file line number Diff line number Diff line change
@@ -1,51 +1,51 @@
function love.conf(t)
t.identity = nil -- The name of the save directory (string)
t.appendidentity = false -- Search files in source directory before save directory (boolean)
t.version = '11.5' -- The LÖVE version this game was made for (string)
t.console = false -- Attach a console (boolean, Windows only)
t.accelerometerjoystick = true -- Enable the accelerometer on iOS and Android by exposing it as a Joystick (boolean)
t.externalstorage = false -- True to save files (and read from the save directory) in external storage on Android (boolean)
t.gammacorrect = false -- Enable gamma-correct rendering, when supported by the system (boolean)
t.identity = nil
t.appendidentity = false
t.version = '11.5'
t.console = false
t.accelerometerjoystick = true
t.externalstorage = false
t.gammacorrect = false

t.audio.mic = false -- Request and use microphone capabilities in Android (boolean)
t.audio.mixwithsystem = true -- Keep background music playing when opening LOVE (boolean, iOS and Android only)
t.audio.mic = false
t.audio.mixwithsystem = true

t.window.title = 'Joystick Tester - Press ESC to exit, 0-9 to vibrate all, Mouse wheel to scroll' -- The window title (string)
t.window.icon = 'graphics/icon/512.png' -- Filepath to an image to use as the window's icon (string)
t.window.width = 1600 -- The window width (number)
t.window.height = 800 -- The window height (number)
t.window.borderless = false -- Remove all border visuals from the window (boolean)
t.window.resizable = true -- Let the window be user-resizable (boolean)
t.window.minwidth = 400 -- Minimum window width if the window is resizable (number)
t.window.minheight = 200 -- Minimum window height if the window is resizable (number)
t.window.fullscreen = false -- Enable fullscreen (boolean)
t.window.fullscreentype = 'desktop' -- Choose between "desktop" fullscreen or "exclusive" fullscreen mode (string)
t.window.vsync = 1 -- Vertical sync mode (number)
t.window.msaa = 0 -- The number of samples to use with multi-sampled antialiasing (number)
t.window.depth = nil -- The number of bits per sample in the depth buffer
t.window.stencil = nil -- The number of bits per sample in the stencil buffer
t.window.display = 1 -- Index of the monitor to show the window in (number)
t.window.highdpi = true -- Enable high-dpi mode for the window on a Retina display (boolean)
t.window.usedpiscale = true -- Enable automatic DPI scaling when highdpi is set to true as well (boolean)
t.window.x = nil -- The x-coordinate of the window's position in the specified display (number)
t.window.y = nil -- The y-coordinate of the window's position in the specified display (number)
t.window.title = 'Joystick Tester (Press 0-9 to vibrate all; Use mouse wheel to scroll)'
t.window.icon = 'graphics/icon/512.png'
t.window.width = 1600
t.window.height = 800
t.window.borderless = false
t.window.resizable = true
t.window.minwidth = 400
t.window.minheight = 200
t.window.fullscreen = false
t.window.fullscreentype = 'desktop'
t.window.vsync = 1
t.window.msaa = 0
t.window.depth = nil
t.window.stencil = nil
t.window.display = 1
t.window.highdpi = true
t.window.usedpiscale = true
t.window.x = nil
t.window.y = nil

t.modules.audio = false -- Enable the audio module (boolean)
t.modules.data = false -- Enable the data module (boolean)
t.modules.event = true -- Enable the event module (boolean)
t.modules.font = true -- Enable the font module (boolean)
t.modules.graphics = true -- Enable the graphics module (boolean)
t.modules.image = true -- Enable the image module (boolean)
t.modules.joystick = true -- Enable the joystick module (boolean)
t.modules.keyboard = true -- Enable the keyboard module (boolean)
t.modules.math = true -- Enable the math module (boolean)
t.modules.mouse = true -- Enable the mouse module (boolean)
t.modules.physics = false -- Enable the physics module (boolean)
t.modules.sound = false -- Enable the sound module (boolean)
t.modules.system = false -- Enable the system module (boolean)
t.modules.thread = false -- Enable the thread module (boolean)
t.modules.timer = true -- Enable the timer module (boolean), Disabling it will result 0 delta time in love.update
t.modules.touch = false -- Enable the touch module (boolean)
t.modules.video = false -- Enable the video module (boolean)
t.modules.window = true -- Enable the window module (boolean)
t.modules.audio = false
t.modules.data = false
t.modules.event = true
t.modules.font = true
t.modules.graphics = true
t.modules.image = true
t.modules.joystick = true
t.modules.keyboard = true
t.modules.math = true
t.modules.mouse = true
t.modules.physics = false
t.modules.sound = false
t.modules.system = false
t.modules.thread = false
t.modules.timer = true
t.modules.touch = false
t.modules.video = false
t.modules.window = true
end
3 changes: 2 additions & 1 deletion joysticktester/main.lua
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,8 @@ local function updateJoystickTextsLinesVars(id)
joystickTextsLinesMost = lines
updateTextOffsetYVars()
elseif lines < joystickTextsLinesMost then
--joystick might have had the most lines and now has fewer, so we have to check all texts and update most lines if needed
--joystick might have had the most lines and now has fewer,
--so we have to check all texts and update most lines if needed
local linesMost = 0
for _, ls in pairs(joystickTextsLines) do
if ls > linesMost then
Expand Down

0 comments on commit 2f043cb

Please sign in to comment.