mirror of
https://github.com/elasota/Aerofoil.git
synced 2025-09-23 23:00:42 +00:00
Lots of Android fixes and stubs. Increase SDL log level on Android. Add GL context loss handling.
This commit is contained in:
@@ -9,7 +9,7 @@
|
||||
android:installLocation="auto">
|
||||
|
||||
<!-- OpenGL ES 2.0 -->
|
||||
<uses-feature android:glEsVersion="0x00020000" />
|
||||
<uses-feature android:glEsVersion="0x00020000" android:required="true" />
|
||||
|
||||
<!-- Touchscreen support -->
|
||||
<uses-feature
|
||||
|
@@ -1,8 +1,17 @@
|
||||
package org.thecodedeposit.aerofoil;
|
||||
|
||||
import org.libsdl.app.SDLActivity;
|
||||
|
||||
import android.content.ContentResolver;
|
||||
import android.content.ContentValues;
|
||||
import android.content.Intent;
|
||||
import android.content.res.AssetManager;
|
||||
import android.net.Uri;
|
||||
import android.os.Bundle;
|
||||
import android.os.Environment;
|
||||
import android.provider.MediaStore;
|
||||
|
||||
|
||||
|
||||
public class GpActivity extends SDLActivity
|
||||
{
|
||||
@@ -27,4 +36,28 @@ public class GpActivity extends SDLActivity
|
||||
return new String[0];
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onActivityResult(int requestCode, int resultCode, Intent intent)
|
||||
{
|
||||
if (requestCode == 1111 && resultCode == RESULT_OK && intent != null)
|
||||
{
|
||||
Uri uri = intent.getData();
|
||||
int n = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
super.onActivityResult(requestCode, resultCode, intent);
|
||||
}
|
||||
}
|
||||
|
||||
public String selectSourceExportPath(String fname)
|
||||
{
|
||||
Intent intent = new Intent(Intent.ACTION_CREATE_DOCUMENT)
|
||||
.setType("application/zip")
|
||||
.addCategory(Intent.CATEGORY_OPENABLE)
|
||||
.putExtra(Intent.EXTRA_TITLE, "SourceCode.zip");
|
||||
startActivityForResult(intent, 1111);
|
||||
return "";
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user