diff --git a/mobile/ebitenmobileview/funcs.go b/mobile/ebitenmobileview/funcs.go index 5e411563e..e5977ee66 100644 --- a/mobile/ebitenmobileview/funcs.go +++ b/mobile/ebitenmobileview/funcs.go @@ -76,11 +76,3 @@ func Update() error { return update() } - -func UpdateTouchesOnAndroid(action int, id int, x, y int) { - updateTouchesOnAndroid(action, id, x, y) -} - -func UpdateTouchesOnIOS(phase int, ptr int64, x, y int) { - updateTouchesOnIOSImpl(phase, ptr, x, y) -} diff --git a/mobile/ebitenmobileview/impl_notmobile.go b/mobile/ebitenmobileview/impl_notmobile.go index ccc9e4431..61f17886e 100644 --- a/mobile/ebitenmobileview/impl_notmobile.go +++ b/mobile/ebitenmobileview/impl_notmobile.go @@ -21,11 +21,8 @@ func update() error { return nil } -func updateTouchesOnAndroid(action int, id int, x, y int) { +func UpdateTouchesOnAndroid(action int, id int, x, y int) { } -func updateTouchesOnIOSImpl(phase int, ptr int64, x, y int) { -} - -func setUIView(uiview uintptr) { +func UpdateTouchesOnIOS(phase int, ptr int64, x, y int) { } diff --git a/mobile/ebitenmobileview/touches_android.go b/mobile/ebitenmobileview/touches_android.go index 24365d055..50745fcc6 100644 --- a/mobile/ebitenmobileview/touches_android.go +++ b/mobile/ebitenmobileview/touches_android.go @@ -14,7 +14,7 @@ package ebitenmobileview -func updateTouchesOnAndroid(action int, id int, x, y int) { +func UpdateTouchesOnAndroid(action int, id int, x, y int) { switch action { case 0x00, 0x05, 0x02: // ACTION_DOWN, ACTION_POINTER_DOWN, ACTION_MOVE touches[id] = position{x, y} @@ -25,6 +25,6 @@ func updateTouchesOnAndroid(action int, id int, x, y int) { } } -func updateTouchesOnIOSImpl(phase int, ptr int64, x, y int) { +func UpdateTouchesOnIOS(phase int, ptr int64, x, y int) { panic("ebitenmobileview: updateTouchesOnIOSImpl must not be called on Android") } diff --git a/mobile/ebitenmobileview/touches_ios.go b/mobile/ebitenmobileview/touches_ios.go index 53794cf44..a7f0fa512 100644 --- a/mobile/ebitenmobileview/touches_ios.go +++ b/mobile/ebitenmobileview/touches_ios.go @@ -43,11 +43,11 @@ func getIDFromPtr(ptr int64) int { return id } -func updateTouchesOnAndroid(action int, id int, x, y int) { +func UpdateTouchesOnAndroid(action int, id int, x, y int) { panic("ebitenmobileview: updateTouchesOnAndroid must not be called on iOS") } -func updateTouchesOnIOSImpl(phase int, ptr int64, x, y int) { +func UpdateTouchesOnIOS(phase int, ptr int64, x, y int) { switch phase { case C.UITouchPhaseBegan, C.UITouchPhaseMoved, C.UITouchPhaseStationary: id := getIDFromPtr(ptr)