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
|
callbackHolder = callback
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// SetMainLoop - Sets main loop function
|
||||||
|
func SetMainLoop(f func(), fps, simulateInfiniteLoop int) {
|
||||||
|
}
|
||||||
|
|
||||||
//export androidMain
|
//export androidMain
|
||||||
func androidMain(app *C.struct_android_app) {
|
func androidMain(app *C.struct_android_app) {
|
||||||
if callbackHolder != nil {
|
if callbackHolder != nil {
|
||||||
|
|
|
@ -32,6 +32,10 @@ func SetCallbackFunc(func(unsafe.Pointer)) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// SetMainLoop - Sets main loop function
|
||||||
|
func SetMainLoop(f func(), fps, simulateInfiniteLoop int) {
|
||||||
|
}
|
||||||
|
|
||||||
// ShowCursor - Shows cursor
|
// ShowCursor - Shows cursor
|
||||||
func ShowCursor() {
|
func ShowCursor() {
|
||||||
C.ShowCursor()
|
C.ShowCursor()
|
||||||
|
|
|
@ -32,6 +32,10 @@ func SetCallbackFunc(func(unsafe.Pointer)) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// SetMainLoop - Sets main loop function
|
||||||
|
func SetMainLoop(f func(), fps, simulateInfiniteLoop int) {
|
||||||
|
}
|
||||||
|
|
||||||
// ShowCursor - Shows cursor
|
// ShowCursor - Shows cursor
|
||||||
func ShowCursor() {
|
func ShowCursor() {
|
||||||
C.ShowCursor()
|
C.ShowCursor()
|
||||||
|
|
|
@ -19,6 +19,11 @@ func InitWindow(width int32, height int32, t interface{}) {
|
||||||
func SetCallbackFunc(func(unsafe.Pointer)) {
|
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
|
// ShowCursor - Shows cursor
|
||||||
func ShowCursor() {
|
func ShowCursor() {
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue