Permalink
Browse files

front: No longer allowing selection of unsupported GLideN64 built in

profiles. Profiles are unsupported if they fail the OpenGL ES version
check.
  • Loading branch information...
fzurita committed Feb 14, 2016
1 parent 3faf1c1 commit 0be72286520aa90f75ca4b48dbf6df7963207439
@@ -23,6 +23,7 @@
import org.mupen64plusae.v3.alpha.R;
import paulscode.android.mupen64plusae.ActivityHelper;
import paulscode.android.mupen64plusae.persistent.AppData;
import paulscode.android.mupen64plusae.persistent.ConfigFile;
import paulscode.android.mupen64plusae.persistent.GlobalPrefs;
@@ -63,4 +64,22 @@ protected int getWindowTitleResource()
{
return R.string.ManageEmulationProfilesActivity_title;
}
@Override
protected void refreshList()
{
super.refreshList();
String openGlVersion = AppData.getOpenGlEsVersion(this);
if(openGlVersion.equals("2.0"))
{
RemoveProfile("GlideN64-GLES-3.0");
RemoveProfile("GlideN64-GLES-3.1");
}
else if(openGlVersion.equals("3.0"))
{
RemoveProfile("GlideN64-GLES-3.1");
}
}
}
@@ -45,6 +45,7 @@
import android.support.v4.app.FragmentManager;
import android.support.v7.preference.PreferenceManager;
import android.support.v7.widget.Toolbar;
import android.util.Log;
import android.view.LayoutInflater;
import android.view.Menu;
import android.view.MenuItem;
@@ -438,7 +439,7 @@ private String getBuiltinVisibilityKey()
return "builtinsVisible" + getClass().getSimpleName();
}
private void refreshList()
protected void refreshList()
{
// Get the profiles to be shown to the user
mProfileList.clear();
@@ -504,4 +505,10 @@ public View getView( int position, View convertView, ViewGroup parent )
return view;
}
}
protected void RemoveProfile(String profileName)
{
Profile profile = new Profile(true, profileName, null);
boolean test = mProfileList.remove(profile);
}
}
@@ -260,4 +260,13 @@ public int compareTo( Profile another )
{
return this.name.compareToIgnoreCase( another.name );
}
@Override
public boolean equals(Object obj) {
if (obj == null) {
return false;
}
return this.name.compareToIgnoreCase( ((Profile)obj).name ) == 0;
}
}

0 comments on commit 0be7228

Please sign in to comment.