mirror of
https://github.com/izzy2lost/WeeU.git
synced 2026-07-06 00:19:59 -07:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
32795e1e25 |
@@ -1,6 +1,5 @@
|
|||||||
package info.cemu.Cemu.emulation;
|
package info.cemu.Cemu.emulation;
|
||||||
|
|
||||||
import android.content.DialogInterface;
|
|
||||||
import android.content.Intent;
|
import android.content.Intent;
|
||||||
import android.net.Uri;
|
import android.net.Uri;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
@@ -53,7 +52,8 @@ public class EmulationActivity extends AppCompatActivity implements Observer<Emu
|
|||||||
String launchPath = null;
|
String launchPath = null;
|
||||||
if (extras != null) {
|
if (extras != null) {
|
||||||
launchPath = extras.getString(LAUNCH_PATH);
|
launchPath = extras.getString(LAUNCH_PATH);
|
||||||
} else if (data != null) {
|
}
|
||||||
|
if (launchPath == null && data != null) {
|
||||||
launchPath = data.toString();
|
launchPath = data.toString();
|
||||||
}
|
}
|
||||||
if (launchPath == null) {
|
if (launchPath == null) {
|
||||||
|
|||||||
@@ -22,11 +22,15 @@ public class FileUtil {
|
|||||||
private static String toCppPath(Uri uri) {
|
private static String toCppPath(Uri uri) {
|
||||||
String uriPath = uri.toString();
|
String uriPath = uri.toString();
|
||||||
int delimiterPos = uriPath.lastIndexOf(COLON_ENCODED);
|
int delimiterPos = uriPath.lastIndexOf(COLON_ENCODED);
|
||||||
|
if (delimiterPos == -1)
|
||||||
|
return uriPath;
|
||||||
return uriPath.substring(0, delimiterPos) + uriPath.substring(delimiterPos).replace(PATH_SEPARATOR_ENCODED, PATH_SEPARATOR_DECODED);
|
return uriPath.substring(0, delimiterPos) + uriPath.substring(delimiterPos).replace(PATH_SEPARATOR_ENCODED, PATH_SEPARATOR_DECODED);
|
||||||
}
|
}
|
||||||
|
|
||||||
private static Uri fromCppPath(String cppPath) {
|
private static Uri fromCppPath(String cppPath) {
|
||||||
int delimiterPos = cppPath.lastIndexOf(COLON_ENCODED);
|
int delimiterPos = cppPath.lastIndexOf(COLON_ENCODED);
|
||||||
|
if (delimiterPos == -1)
|
||||||
|
return Uri.parse(cppPath);
|
||||||
return Uri.parse(cppPath.substring(0, delimiterPos) + cppPath.substring(delimiterPos).replace(PATH_SEPARATOR_DECODED, PATH_SEPARATOR_ENCODED));
|
return Uri.parse(cppPath.substring(0, delimiterPos) + cppPath.substring(delimiterPos).replace(PATH_SEPARATOR_DECODED, PATH_SEPARATOR_ENCODED));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user