Change crash dialog to crash toast message
Some of the errors are easily bypassed, but a popup stops gameplay simply to be dismissed.
This commit is contained in:
parent
f4698fc3d7
commit
7d3ba6f539
|
@ -20,7 +20,7 @@
|
|||
<string name="missing_flash">The Dreamcast Flash is missing. A dump of the Dreamcast Flash is required for this emulator to work. Make sure the Flash file is named "dc_flash.bin" and is in %1$s/data/dc_flash.bin</string>
|
||||
<string name="require_bios">You have to provide a Dreamcast BIOS.</string>
|
||||
<string name="data_folder">The current data folder is assumed.</string>
|
||||
<string name="emu_crash">Error!</string>
|
||||
<string name="emu_crash">Emulator Error:\n %1$s</string>
|
||||
|
||||
<string name="folder_bios">Boot BIOS</string>
|
||||
<string name="folder_select">Select current folder</string>
|
||||
|
|
|
@ -10,9 +10,7 @@ import javax.microedition.khronos.opengles.GL10;
|
|||
|
||||
import android.annotation.TargetApi;
|
||||
import android.app.Activity;
|
||||
import android.app.AlertDialog;
|
||||
import android.content.Context;
|
||||
import android.content.DialogInterface;
|
||||
import android.content.SharedPreferences;
|
||||
import android.content.res.Configuration;
|
||||
import android.graphics.Paint;
|
||||
|
@ -33,10 +31,12 @@ import android.view.ScaleGestureDetector;
|
|||
import android.view.ScaleGestureDetector.SimpleOnScaleGestureListener;
|
||||
import android.view.View;
|
||||
import android.view.WindowManager;
|
||||
import android.widget.Toast;
|
||||
|
||||
import com.android.util.FileUtils;
|
||||
import com.reicast.emulator.GL2JNIActivity;
|
||||
import com.reicast.emulator.GL2JNINative;
|
||||
import com.reicast.emulator.MainActivity;
|
||||
import com.reicast.emulator.R;
|
||||
import com.reicast.emulator.config.Config;
|
||||
import com.reicast.emulator.emu.OnScreenMenu.FpsPopup;
|
||||
|
@ -692,25 +692,9 @@ public class GL2JNIView extends GLSurfaceView
|
|||
handler.post(new Runnable() {
|
||||
public void run() {
|
||||
Log.d(context.getApplicationContext().getPackageName(), msg);
|
||||
AlertDialog.Builder alertDialogBuilder = new AlertDialog.Builder(context);
|
||||
// set title
|
||||
alertDialogBuilder.setTitle(context.getString(R.string.emu_crash));
|
||||
// set dialog message
|
||||
alertDialogBuilder
|
||||
.setMessage(msg)
|
||||
.setCancelable(false)
|
||||
.setPositiveButton(context.getString(R.string.dismiss),
|
||||
new DialogInterface.OnClickListener() {
|
||||
public void onClick(DialogInterface dialog,int id) {
|
||||
// if this button is clicked, close
|
||||
// current activity
|
||||
//MainActivity.this.finish();
|
||||
}
|
||||
});
|
||||
// create alert dialog
|
||||
AlertDialog alertDialog = alertDialogBuilder.create();
|
||||
// show it
|
||||
alertDialog.show();
|
||||
MainActivity.showToastMessage(context,
|
||||
context.getString(R.string.emu_crash, msg),
|
||||
Toast.LENGTH_LONG);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue