pelya wrote:shishanjiu wrote:On my android phone, when return from suspend, my app's screen is splitted to two frames
I've fixed a similar bug few months ago, it was caused by screen orientation not changing immediately to landscape during suspend, and it happened only during initialization.
Are you using latest Git revision of the SDL? On what device did you test it? Are you using software SDL screen surface or OpenGL? Can you reproduce the bug with some minimal application, Ballfield for example?
Can you add some logs to the MainActivity.onResume(), and check that isCurrentOrientationHorizontal() returns true?
I'm not similiar with Git.I always get the whole of it and this will use too much time. How can I get only the changes of git? Any instructions or parameters can do this with git? Thanks a lot.
I'm using xiaomi phone and software SDL screen. Ballfield doesn't reproduce the bug, but I think it's due to SDL_Flip(SDL_GetVideoSurface()) in while(1) loop. In my app there're not SDL_Flip every second. After EACH return from suspend, the screen is splitted to two same parts, which are both the left half of normal screen.
pelya wrote:shishanjiu wrote:Another question. An apk may have some entries or functions to execute different works, and may have some icons created on desktop to launch different functions after it's installed, just like settings of Android.
SDL does not support that. If you want to add that functionality, you'll need to edit Java files and AndroidManifest.xml/AndroidManifestTemplate.xml by yourself.
I know I need to edit Jave files and AndroidManifest.xml to implement this. But how can I link java funtion to SDL function, for example, to call a SDL's subfuntion after clicking one icon of desktop or call main function with different parameters?