mirror of
https://github.com/wheremyfoodat/Panda3DS.git
synced 2025-04-08 23:25:40 +12:00
use dialog instead of using toast when a rom is failed to load
This commit is contained in:
parent
f5d3cc9fbf
commit
f37bd9363f
1 changed files with 22 additions and 20 deletions
|
@ -9,6 +9,7 @@ import android.opengl.GLSurfaceView;
|
|||
import android.os.Handler;
|
||||
import android.util.Log;
|
||||
import android.widget.Toast;
|
||||
import androidx.appcompat.app.AlertDialog;
|
||||
import com.panda3ds.pandroid.AlberDriver;
|
||||
import com.panda3ds.pandroid.data.SMDH;
|
||||
import com.panda3ds.pandroid.data.config.GlobalConfig;
|
||||
|
@ -98,11 +99,11 @@ public class PandaGlRenderer implements GLSurfaceView.Renderer, ConsoleRenderer
|
|||
Runnable runnable = new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
Toast
|
||||
.makeText(
|
||||
context, "Failed to load ROM! Make sure it's a valid 3DS ROM and that storage permissions are configured properly.",
|
||||
Toast.LENGTH_LONG
|
||||
)
|
||||
AlertDialog.Builder builder = new AlertDialog.Builder(context);
|
||||
builder.setTitle("Failed to load ROM")
|
||||
.setMessage("Make sure it's a valid 3DS ROM and that storage permissions are configured properly.")
|
||||
.setPositiveButton("OK", null)
|
||||
.setCancelable(false)
|
||||
.show();
|
||||
}
|
||||
};
|
||||
|
@ -113,6 +114,7 @@ public class PandaGlRenderer implements GLSurfaceView.Renderer, ConsoleRenderer
|
|||
return;
|
||||
}
|
||||
|
||||
|
||||
// Load the SMDH
|
||||
byte[] smdhData = AlberDriver.GetSmdh();
|
||||
if (smdhData.length == 0) {
|
||||
|
|
Loading…
Add table
Reference in a new issue