You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
SDLActivity MUST be initiated in the right order to work.
Let's take a look at DK.java. We can call OpenActivity("SplashActivity"); and it works.
If we try to call CallJavaFunction("OpenActivity","SDLActivity"); inside of DKSDLWindow. The native side will crash. The reason is DKCreate("DKSDLWindow") will happen before SDLActivity get's to call initSDL(mSingleton.getArguments());
We can't call DK.CallCppFunction("DKAndroid_init"); before initSDL(mSingleton.getArguments());
When we call "DKAndroid_init", it will eventually run User.js.. and if User.js has a DKCreate("DKWindow") in it.... BAM!, we just tried to initialize DKSDLWindow before initSDL(mSingleton.getArguments());
So at this point.. SDLActivity is always called first... it does the work in this function.
Notice how initSDL(mSingleton.getArguments()); is called first to create an available context.
Then DK.CallCppFunction("DKAndroid_init"); that will eventually call DKCreate("DKSDLWindow");
DKSDLWindow will successfully join to SDLActivity.
If you didn't get it in the right order, you crash right here
Later we Call "DKAndroid_onResize" and "DKAndroid_loop"
Trying to get C++ to play well with Android Java is key.
We will eventually be asking Android to do what our desktops do, via javascript.
The text was updated successfully, but these errors were encountered:
SDLActivity MUST be initiated in the right order to work.
Let's take a look at DK.java. We can call OpenActivity("SplashActivity"); and it works.
If we try to call CallJavaFunction("OpenActivity","SDLActivity"); inside of DKSDLWindow. The native side will crash. The reason is DKCreate("DKSDLWindow") will happen before SDLActivity get's to call initSDL(mSingleton.getArguments());
We can't call DK.CallCppFunction("DKAndroid_init"); before initSDL(mSingleton.getArguments());
When we call "DKAndroid_init", it will eventually run User.js.. and if User.js has a DKCreate("DKWindow") in it.... BAM!, we just tried to initialize DKSDLWindow before initSDL(mSingleton.getArguments());
So at this point.. SDLActivity is always called first... it does the work in this function.
Notice how initSDL(mSingleton.getArguments()); is called first to create an available context.
Then DK.CallCppFunction("DKAndroid_init"); that will eventually call DKCreate("DKSDLWindow");
DKSDLWindow will successfully join to SDLActivity.
If you didn't get it in the right order, you crash right here
Later we Call "DKAndroid_onResize" and "DKAndroid_loop"
Trying to get C++ to play well with Android Java is key.
We will eventually be asking Android to do what our desktops do, via javascript.
The text was updated successfully, but these errors were encountered: