SDL: show download error dialog for SDL2

This commit is contained in:
Sergii Pylypenko
2022-01-09 18:45:54 +02:00
parent 91e6c9f28e
commit 821196ab38
2 changed files with 17 additions and 2 deletions

View File

@@ -96,6 +96,23 @@ public class MainActivity extends org.libsdl.app.SDLActivity {
}
public void downloadFinishedInitSDL() {
if (!this.dataDownloader.downloadCompete)
{
Log.i("SDL", "Data download failed!");
AlertDialog.Builder dlgAlert = new AlertDialog.Builder(this);
dlgAlert.setMessage(res.getString(R.string.error_dl_from, Globals.DataDownloadUrl));
dlgAlert.setTitle("SDL Error");
dlgAlert.setPositiveButton("Exit",
new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialog,int id) {
System.exit(0);
}
});
dlgAlert.setCancelable(false);
dlgAlert.create().show();
return;
}
Log.i("SDL", "Data download finished, starting native thread");
this.dataDownloader = null;
if (this.nativeThreadResumeCaptured)