mobile/ebitenmobileview: Bug fix: Compile error on Android

This commit is contained in:
Hajime Hoshi 2019-10-09 22:55:42 +09:00
parent 3c976eae02
commit 01cb6e67b8
3 changed files with 11 additions and 10 deletions

View File

@ -81,7 +81,3 @@ func UpdateTouchesOnAndroid(action int, id int, x, y int) {
func UpdateTouchesOnIOS(phase int, ptr int64, x, y int) { func UpdateTouchesOnIOS(phase int, ptr int64, x, y int) {
updateTouchesOnIOSImpl(phase, ptr, x, y) updateTouchesOnIOSImpl(phase, ptr, x, y)
} }
func SetUIView(uiview int64) {
setUIView(uintptr(uiview))
}

View File

@ -20,6 +20,6 @@ import (
"github.com/hajimehoshi/ebiten/internal/graphicsdriver/metal" "github.com/hajimehoshi/ebiten/internal/graphicsdriver/metal"
) )
func setUIView(uiview uintptr) { func SetUIView(uiview int64) {
metal.Get().SetUIView(uiview) metal.Get().SetUIView(uintptr(uiview))
} }

View File

@ -12,11 +12,16 @@
// See the License for the specific language governing permissions and // See the License for the specific language governing permissions and
// limitations under the License. // limitations under the License.
// +build darwin,ios,!arm // +build darwin,ios
// +build darwin,ios,!arm64 // +build !arm
// +build !arm64
package ebitenmobileview package ebitenmobileview
func setUIView(uiview uintptr) { import (
panic("ebitenmobileview: setUIView is not available on this platform") "runtime"
)
func SetUIView(uiview int64) {
panic("ebitenmobileview: SetUIView is not available on GOARCH=" + runtime.GOARCH)
} }