diff --git a/mobile/ebitenmobileview/funcs.go b/mobile/ebitenmobileview/funcs.go index a4adcf7dc..27851f88a 100644 --- a/mobile/ebitenmobileview/funcs.go +++ b/mobile/ebitenmobileview/funcs.go @@ -81,7 +81,3 @@ func UpdateTouchesOnAndroid(action int, id int, x, y int) { func UpdateTouchesOnIOS(phase int, ptr int64, x, y int) { updateTouchesOnIOSImpl(phase, ptr, x, y) } - -func SetUIView(uiview int64) { - setUIView(uintptr(uiview)) -} diff --git a/mobile/ebitenmobileview/impl_metal.go b/mobile/ebitenmobileview/impl_metal.go index 8a696af87..93768c37f 100644 --- a/mobile/ebitenmobileview/impl_metal.go +++ b/mobile/ebitenmobileview/impl_metal.go @@ -20,6 +20,6 @@ import ( "github.com/hajimehoshi/ebiten/internal/graphicsdriver/metal" ) -func setUIView(uiview uintptr) { - metal.Get().SetUIView(uiview) +func SetUIView(uiview int64) { + metal.Get().SetUIView(uintptr(uiview)) } diff --git a/mobile/ebitenmobileview/impl_notmetal.go b/mobile/ebitenmobileview/impl_notmetal.go index d5b52c033..2d500a29f 100644 --- a/mobile/ebitenmobileview/impl_notmetal.go +++ b/mobile/ebitenmobileview/impl_notmetal.go @@ -12,11 +12,16 @@ // See the License for the specific language governing permissions and // limitations under the License. -// +build darwin,ios,!arm -// +build darwin,ios,!arm64 +// +build darwin,ios +// +build !arm +// +build !arm64 package ebitenmobileview -func setUIView(uiview uintptr) { - panic("ebitenmobileview: setUIView is not available on this platform") +import ( + "runtime" +) + +func SetUIView(uiview int64) { + panic("ebitenmobileview: SetUIView is not available on GOARCH=" + runtime.GOARCH) }