|
237 | 237 | --! @brief Disable screen sleep
|
238 | 238 | --! @note Should be called only in Start function
|
239 | 239 | function AquaShine.DisableSleep()
|
240 |
| - love.window.setDisplaySleepEnabled(false) |
| 240 | + -- tail call |
| 241 | + return love.window.setDisplaySleepEnabled(false) |
241 | 242 | end
|
242 | 243 |
|
243 | 244 | --! @brief Gets cached data from cache table, or execute function to load and store in cache
|
@@ -294,27 +295,18 @@ end
|
294 | 295 | --------------------------------------
|
295 | 296 | local LoadedShelshaObject = {}
|
296 | 297 | local LoadedImage = {}
|
297 |
| -local ConstImageFlags |
298 | 298 |
|
299 | 299 | --! @brief Load image without caching
|
300 | 300 | --! @param path The image path
|
301 | 301 | --! @param pngonly Do not load .png.imag file even if one exist
|
302 | 302 | --! @returns Drawable object
|
303 | 303 | --! @note The ShelshaObject texture bank will ALWAYS BE CACHED!.
|
304 | 304 | function AquaShine.LoadImageNoCache(path, pngonly)
|
305 |
| - if not(ConstImageFlags) then |
306 |
| - ConstImageFlags = {} |
307 |
| - ConstImageFlags.mipmaps = AquaShine.IsDesktopSystem() |
308 |
| - end |
309 |
| - |
310 | 305 | assert(path:sub(-4) == ".png", "Only PNG image is supported")
|
311 | 306 | local _, img = pcall(love.graphics.newImage, path, ConstImageFlags)
|
312 | 307 |
|
313 | 308 | if _ then
|
314 | 309 | -- .png image loaded
|
315 |
| - img:setFilter("linear", "linear", 16) |
316 |
| - img:setMipmapFilter("linear", 16) |
317 |
| - |
318 | 310 | return img
|
319 | 311 | elseif not(pngonly) then
|
320 | 312 | -- Try .png.imag
|
@@ -652,9 +644,9 @@ function love.load(arg)
|
652 | 644 | assert(love.filesystem.load("AquaShineFileDialog.lua"))(AquaShine)
|
653 | 645 | love.resize(wx, wy)
|
654 | 646 |
|
655 |
| - -- JIT is disabled in Android. Enable it |
| 647 | + -- JIT is disabled in Android for performance reasons. |
656 | 648 | if AquaShine.OperatingSystem == "Android" then
|
657 |
| - jit.on() |
| 649 | + jit.off() |
658 | 650 | end
|
659 | 651 |
|
660 | 652 | if jit and AquaShine.GetCommandLineConfig("interpreter") then
|
|
0 commit comments