Open gen2brain opened 6 years ago
New Android example is here https://github.com/veandco/go-sdl2-examples/tree/master/examples/android . Thanks to static libs now it is really simple to build apk.
User needs to import "C" to export "main" function, https://github.com/veandco/go-sdl2-examples/blob/master/examples/android/main.go#L182 , and is used then in Java https://github.com/veandco/go-sdl2-examples/blob/master/examples/android/android/src/main/java/com/example/android/MyGame.java#L16 . Perhaps that can be somehow solved, i.e. with some function like SetMain.
import "C"
Great work @gen2brain!
New Android example is here https://github.com/veandco/go-sdl2-examples/tree/master/examples/android . Thanks to static libs now it is really simple to build apk.
User needs to
import "C"
to export "main" function, https://github.com/veandco/go-sdl2-examples/blob/master/examples/android/main.go#L182 , and is used then in Java https://github.com/veandco/go-sdl2-examples/blob/master/examples/android/android/src/main/java/com/example/android/MyGame.java#L16 . Perhaps that can be somehow solved, i.e. with some function like SetMain.