Fix Linux icon issue (#808)

- Try load icon
- Only build linux
- Set icon in conf.lua
- Set some global variables in conf.lua and set corresponding configs
- Avoid change fullscreen state when playing on mobile devices
- Try mobile
- Enable CI for merging
This commit is contained in:
Particle_G
2022-12-16 14:51:00 +08:00
committed by GitHub
parent c9e0a58232
commit eb1e7fd15a
4 changed files with 60 additions and 47 deletions

View File

@@ -22,9 +22,6 @@
local fs=love.filesystem
VERSION=require"version"
TIME=love.timer.getTime
SYSTEM=love.system.getOS() if SYSTEM=='OS X' then SYSTEM='macOS' end
FNNS=SYSTEM:find'\79\83'-- What does FNSF stand for? IDK so don't ask me lol
MOBILE=SYSTEM=='Android' or SYSTEM=='iOS'
-- Global Vars & Settings
SFXPACKS={'chiptune'}
@@ -37,14 +34,6 @@ math.randomseed(os.time()*626)
love.setDeprecationOutput(false)
love.keyboard.setKeyRepeat(true)
love.keyboard.setTextInput(false)
if MOBILE then
local w,h,f=love.window.getMode()
f.resizable=false
love.window.setMode(w,h,f)
end
if love.filesystem.getInfo('media/image/icon.png') then
love.window.setIcon(love.image.newImageData('media/image/icon.png'))
end
local _LOADTIMELIST_={}
local _LOADTIME_=TIME()
@@ -200,9 +189,11 @@ Z.setOnFnKeys({
function() if love['_openConsole'] then love['_openConsole']() end end,
})
Z.setOnGlobalKey('f11',function()
SETTING.fullscreen=not SETTING.fullscreen
applySettings()
saveSettings()
if not MOBILE then
SETTING.fullscreen=not SETTING.fullscreen
applySettings()
saveSettings()
end
end)
Z.setVersionText(VERSION.string)
Z.setDebugInfo{