SDL: new method SDL_ANDROID_RestartMyself() that will restart current app

This commit is contained in:
Sergii Pylypenko
2015-06-25 23:07:25 +03:00
parent c026bea0bb
commit 97c256b03d
5 changed files with 27 additions and 0 deletions

View File

@@ -923,6 +923,14 @@ class DemoRenderer extends GLSurfaceView_SDL.Renderer
}
}
public void restartMyself(String restartParams)
{
Intent intent = new Intent(context, RestartMainActivity.class);
intent.putExtra(RestartMainActivity.SDL_RESTART_PARAMS, restartParams);
context.startActivity(intent);
System.exit(0);
}
private int PowerOf2(int i)
{
int value = 1;