[Android] Spawn a message if someone's phone doesn't support NEON. NEON is a requirement for Dolphin Mobile on ARM, CPU core will crash without it.
This commit is contained in:
parent
c712fb7356
commit
0e415467c4
|
@ -86,4 +86,9 @@ public final class DolphinEmulator extends Activity
|
|||
UserPreferences.LoadIniToPrefs(this);
|
||||
}
|
||||
}
|
||||
protected void onRestart()
|
||||
{
|
||||
super.onRestart();
|
||||
finish(); // If we are ever returning to this activity then we are exiting.
|
||||
}
|
||||
}
|
|
@ -104,6 +104,13 @@ public final class NativeLibrary
|
|||
*/
|
||||
public static native String GetVersionString();
|
||||
|
||||
/**
|
||||
* Returns if the phone supports NEON or not
|
||||
*
|
||||
* @return if it supports NEON
|
||||
*/
|
||||
public static native boolean SupportsNEON();
|
||||
|
||||
/**
|
||||
* Saves a game state to the slot number.
|
||||
*
|
||||
|
|
|
@ -13,16 +13,16 @@ import android.app.FragmentManager;
|
|||
import android.content.DialogInterface;
|
||||
import android.content.Intent;
|
||||
import android.content.res.Configuration;
|
||||
import android.os.Build;
|
||||
import android.os.Bundle;
|
||||
import android.support.v4.app.ActionBarDrawerToggle;
|
||||
import android.support.v4.widget.DrawerLayout;
|
||||
import android.view.*;
|
||||
import android.view.Menu;
|
||||
import android.view.MenuInflater;
|
||||
import android.view.MenuItem;
|
||||
import android.view.View;
|
||||
import android.widget.AdapterView;
|
||||
import android.widget.ListView;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import org.dolphinemu.dolphinemu.AboutFragment;
|
||||
import org.dolphinemu.dolphinemu.NativeLibrary;
|
||||
import org.dolphinemu.dolphinemu.R;
|
||||
|
@ -31,6 +31,9 @@ import org.dolphinemu.dolphinemu.settings.PrefsActivity;
|
|||
import org.dolphinemu.dolphinemu.sidemenu.SideMenuAdapter;
|
||||
import org.dolphinemu.dolphinemu.sidemenu.SideMenuItem;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* The activity that implements all of the functions
|
||||
* for the game list.
|
||||
|
@ -104,6 +107,26 @@ public final class GameListActivity extends Activity
|
|||
mCurFragment = new GameListFragment();
|
||||
FragmentManager fragmentManager = getFragmentManager();
|
||||
fragmentManager.beginTransaction().replace(R.id.content_frame, mCurFragment).commit();
|
||||
|
||||
// Create an alert telling them that their phone sucks
|
||||
if (Build.CPU_ABI.contains("arm") && !NativeLibrary.SupportsNEON())
|
||||
{
|
||||
AlertDialog.Builder builder = new AlertDialog.Builder(this);
|
||||
builder.setTitle("ALERT!");
|
||||
builder.setMessage("Your phone doesn't support NEON which makes it incapable of running Dolphin Mobile?\nDo you want to try anyway?");
|
||||
builder.setPositiveButton(R.string.yes, new DialogInterface.OnClickListener() {
|
||||
public void onClick(DialogInterface dialog, int which) {
|
||||
// Do Nothing. Just create the Yes button
|
||||
}
|
||||
});
|
||||
builder.setNegativeButton(R.string.no, new DialogInterface.OnClickListener() {
|
||||
public void onClick(DialogInterface dialog, int which)
|
||||
{
|
||||
finish();
|
||||
}
|
||||
});
|
||||
builder.show();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -282,6 +282,12 @@ JNIEXPORT jstring JNICALL Java_org_dolphinemu_dolphinemu_NativeLibrary_GetVersio
|
|||
{
|
||||
return env->NewStringUTF(scm_rev_str);
|
||||
}
|
||||
|
||||
JNIEXPORT jboolean JNICALL Java_org_dolphinemu_dolphinemu_NativeLibrary_SupportsNEON(JNIEnv *env, jobject obj)
|
||||
{
|
||||
return cpu_info.bNEON;
|
||||
}
|
||||
|
||||
JNIEXPORT jstring JNICALL Java_org_dolphinemu_dolphinemu_NativeLibrary_GetConfig(JNIEnv *env, jobject obj, jstring jFile, jstring jKey, jstring jValue, jstring jDefault)
|
||||
{
|
||||
IniFile ini;
|
||||
|
|
Loading…
Reference in New Issue