mirror of
https://github.com/libretro/RetroArch.git
synced 2024-11-26 01:30:51 +00:00
(Android/Phoenix)expand on ROM load error message
This commit is contained in:
parent
653ae663a2
commit
232706d665
@ -474,21 +474,18 @@ public class RetroArch extends Activity implements
|
||||
}
|
||||
break;
|
||||
case ACTIVITY_NATIVE_ACTIVITY:
|
||||
Log.i(TAG, "native return");
|
||||
AlertDialog.Builder builder = new AlertDialog.Builder(this).setNeutralButton("OK", null);
|
||||
try {
|
||||
DataInputStream cacheStream = new DataInputStream(new FileInputStream(return_file));
|
||||
int value = cacheStream.readInt();
|
||||
cacheStream.close();
|
||||
Log.i(TAG, "native return value");
|
||||
Log.i(TAG, "native return value:" + value);
|
||||
if (value != 0) {
|
||||
builder.setTitle("Error").setMessage("RetroArch Could not load the chosen ROM").show();
|
||||
throw new IOException();
|
||||
}
|
||||
} catch (FileNotFoundException e) {
|
||||
builder.setTitle("Crash").setMessage("RetroArch Crashed").show();
|
||||
} catch (IOException e) {
|
||||
builder.setTitle("Error").setMessage("RetroArch Could not load the chosen ROM").show();
|
||||
builder.setTitle("Error").setMessage("RetroArch Could not load the chosen ROM.\n\nCheck the Cores Guide for details on valid ROMs for this emulator.").show();
|
||||
}
|
||||
new File(return_file).delete();
|
||||
break;
|
||||
|
Loading…
Reference in New Issue
Block a user