Add SetMainLoop() function
This commit is contained in:
parent
2bfca1f330
commit
1fec9fe2f0
4 changed files with 17 additions and 0 deletions
|
@ -41,6 +41,10 @@ func SetCallbackFunc(callback func(unsafe.Pointer)) {
|
|||
callbackHolder = callback
|
||||
}
|
||||
|
||||
// SetMainLoop - Sets main loop function
|
||||
func SetMainLoop(f func(), fps, simulateInfiniteLoop int) {
|
||||
}
|
||||
|
||||
//export androidMain
|
||||
func androidMain(app *C.struct_android_app) {
|
||||
if callbackHolder != nil {
|
||||
|
|
|
@ -32,6 +32,10 @@ func SetCallbackFunc(func(unsafe.Pointer)) {
|
|||
return
|
||||
}
|
||||
|
||||
// SetMainLoop - Sets main loop function
|
||||
func SetMainLoop(f func(), fps, simulateInfiniteLoop int) {
|
||||
}
|
||||
|
||||
// ShowCursor - Shows cursor
|
||||
func ShowCursor() {
|
||||
C.ShowCursor()
|
||||
|
|
|
@ -32,6 +32,10 @@ func SetCallbackFunc(func(unsafe.Pointer)) {
|
|||
return
|
||||
}
|
||||
|
||||
// SetMainLoop - Sets main loop function
|
||||
func SetMainLoop(f func(), fps, simulateInfiniteLoop int) {
|
||||
}
|
||||
|
||||
// ShowCursor - Shows cursor
|
||||
func ShowCursor() {
|
||||
C.ShowCursor()
|
||||
|
|
|
@ -19,6 +19,11 @@ func InitWindow(width int32, height int32, t interface{}) {
|
|||
func SetCallbackFunc(func(unsafe.Pointer)) {
|
||||
}
|
||||
|
||||
// SetMainLoop - Sets main loop function
|
||||
func SetMainLoop(f func(), fps, simulateInfiniteLoop int) {
|
||||
js.Global.Get("Module").Call("_emscripten_set_main_loop", f, fps, simulateInfiniteLoop)
|
||||
}
|
||||
|
||||
// ShowCursor - Shows cursor
|
||||
func ShowCursor() {
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue