1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-06 12:20:30 +00:00

Small batch of fixes

-=-=-=-=-=-=-=-=-=-=
-Fixed looping error in AudioStreamResampled
-winrt port progress
-fixes in material in ambient light
This commit is contained in:
Juan Linietsky
2014-12-15 15:42:58 -03:00
parent be4e40e90a
commit 089d7fa171
21 changed files with 348 additions and 46 deletions

View File

@@ -438,8 +438,26 @@ public class GodotIO {
try {
Log.v("MyApp", "TRYING TO OPEN URI: " + p_uri);
Intent myIntent = new Intent(Intent.ACTION_VIEW, Uri.parse(p_uri));
activity.startActivity(myIntent);
String path = p_uri;
String type="";
if (path.startsWith("/")) {
//absolute path to filesystem, prepend file://
path="file://"+path;
if (p_uri.endsWith(".png") || p_uri.endsWith(".jpg") || p_uri.endsWith(".gif") || p_uri.endsWith(".webp")) {
type="image/*";
}
}
Intent intent = new Intent();
intent.setAction(Intent.ACTION_VIEW);
if (!type.equals("")) {
intent.setDataAndType(Uri.parse(path), type);
} else {
intent.setData(Uri.parse(path));
}
activity.startActivity(intent);
return 0;
} catch (ActivityNotFoundException e) {