Skip to content

Commit d00b9d7

Browse files
committed
Fixed touch effect not compensate letterboxing
Android: Fixed FFmpegExt causes it to read from private storage instead of external storage Fixed error if no beatmap is present - Although it still error if you swipe left or right
1 parent 529bd19 commit d00b9d7

File tree

4 files changed

+12
-8
lines changed

4 files changed

+12
-8
lines changed

AquaShine.lua

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -685,26 +685,27 @@ end
685685
-- Inputs
686686
function love.mousepressed(x, y, button, istouch)
687687
if istouch == true then return end
688+
x, y = AquaShine.CalculateTouchPosition(x, y)
688689

689690
if AquaShine.TouchEffect then
690691
AquaShine.TouchEffect.Start()
692+
AquaShine.TouchEffect.SetPosition(x, y)
691693
end
692694

693695
if AquaShine.CurrentEntryPoint and AquaShine.CurrentEntryPoint.MousePressed then
694-
x, y = AquaShine.CalculateTouchPosition(x, y)
695696
AquaShine.CurrentEntryPoint.MousePressed(x, y, button, istouch)
696697
end
697698
end
698699

699700
function love.mousemoved(x, y, dx, dy, istouch)
700701
if istouch == true then return end
702+
x, y = AquaShine.CalculateTouchPosition(x, y)
701703

702704
if AquaShine.TouchEffect then
703705
AquaShine.TouchEffect.SetPosition(x, y)
704706
end
705707

706708
if AquaShine.CurrentEntryPoint and AquaShine.CurrentEntryPoint.MouseMoved then
707-
x, y = AquaShine.CalculateTouchPosition(x, y)
708709
AquaShine.CurrentEntryPoint.MouseMoved(x, y, dx / AquaShine.LogicalScale.ScaleOverall, dy / AquaShine.LogicalScale.ScaleOverall, istouch)
709710
end
710711
end

AquaShineFFmpegExtension.lua

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,14 @@ if AquaShine.OperatingSystem == "iOS" or has_ffi == false then
1515
elseif AquaShine.OperatingSystem == "Android" then
1616
-- We have to find our "internal" save directory at first
1717
-- so we can determine our "lib" dir
18-
-- This assume external storage mode is enabled
18+
-- This assume external storage mode is enabled. If not, edit accordingly
1919
love.filesystem._setAndroidSaveExternal(false)
2020
love.filesystem.setIdentity(love.filesystem.getIdentity(), true)
2121

2222
local lib_dir = love.filesystem.getSaveDirectory().."/../../../lib"
2323

2424
-- Reset back to external storage mode
25-
love.filesystem._setAndroidSaveExternal(false)
25+
love.filesystem._setAndroidSaveExternal(true)
2626
love.filesystem.setIdentity(love.filesystem.getIdentity(), true)
2727

2828
function load_ffmpeg_library(libname, ver)

beatmap_select.lua

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -347,7 +347,10 @@ end
347347

348348
function BeatmapSelect.Draw()
349349
BeatmapSelect.MainUIComposition:Draw()
350-
BeatmapSelect.CompositionList[BeatmapSelect.Page]:Draw()
350+
351+
if #BeatmapSelect.CompositionList > 0 then
352+
BeatmapSelect.CompositionList[BeatmapSelect.Page]:Draw()
353+
end
351354
end
352355

353356
function BeatmapSelect.Exit()

noteloader/load_depls.lua

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ function DEPLSBeatmap.GetBackgroundID(this)
154154

155155
local bgidname = this.project_dir.."/background.txt"
156156
if not(this.bgid_loaded) and love.filesystem.isFile(bgidname) then
157-
this.bgid = tonumber(love.filesystem.read(bgidname))
157+
this.bgid = tonumber((love.filesystem.read(bgidname)))
158158
this.bgid_loaded = true
159159
end
160160

@@ -181,12 +181,12 @@ function DEPLSBeatmap.GetCustomBackground(this)
181181

182182
if not(this.background[1] and this.background[2]) then
183183
AquaShine.Log("NoteLoader2/load_depls", "Non-balanced background (only contain left or right part). Removed")
184-
this.backgound[1], this.background[2] = nil, nil
184+
this.background[1], this.background[2] = nil, nil
185185
end
186186

187187
if not(this.background[3] and this.background[4]) then
188188
AquaShine.Log("NoteLoader2/load_depls", "Non-balanced background (only contain top or bottom part). Removed")
189-
this.backgound[3], this.background[4] = nil, nil
189+
this.background[3], this.background[4] = nil, nil
190190
end
191191

192192
break

0 commit comments

Comments
 (0)