mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-12-26 03:38:55 +01:00
jni: Add more comment
This commit is contained in:
parent
ed09dddf09
commit
2884e92041
@ -11,7 +11,7 @@ package jni
|
|||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
|
|
||||||
// These definitions are duplicated with those in ctx_android.go of golang.org/x/mobile/internal/mobileinit package.
|
// These definitions are duplicated with those in ctx_android.go of golang.org/x/mobile/internal/mobileinit package.
|
||||||
// To be exact, this might cause undefined behavior, but some compilers including GCC work as a common extension.
|
// To be exact, this might cause undefined behavior, but some compilers including GCC and Clang work as a common extension.
|
||||||
// (J.5.11 Multiple external definitions)
|
// (J.5.11 Multiple external definitions)
|
||||||
JavaVM* current_vm;
|
JavaVM* current_vm;
|
||||||
jobject current_ctx;
|
jobject current_ctx;
|
||||||
@ -72,6 +72,9 @@ import (
|
|||||||
"unsafe"
|
"unsafe"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
// RunOnJVM executes fn on the current VM context.
|
||||||
|
//
|
||||||
|
// RunOnJVM should not be called on init function since the current VM might not be initialized yet.
|
||||||
func RunOnJVM(fn func(vm, env, ctx uintptr) error) error {
|
func RunOnJVM(fn func(vm, env, ctx uintptr) error) error {
|
||||||
errch := make(chan error)
|
errch := make(chan error)
|
||||||
go func() {
|
go func() {
|
||||||
|
Loading…
Reference in New Issue
Block a user