Android: remove unused EGL14 config option

This will require an entire proprietary view, as the packaged helper classes are strictly EGL10.
This commit is contained in:
Ender's Games 2018-08-08 09:52:55 -04:00
parent a9ea64f36a
commit 4b1c4ae446
3 changed files with 5 additions and 32 deletions

View File

@ -15,7 +15,6 @@ public class Config {
public static final String pref_showfps = "show_fps";
public static final String pref_rendertype = "render_type";
public static final String pref_renderdepth = "depth_render";
public static final String pref_egl14 = "use_egl14";
public static final String pref_touchvibe = "touch_vibration_enabled";
public static final String pref_vibrationDuration = "vibration_duration";

View File

@ -522,38 +522,13 @@ public class OptionsFragment extends Fragment {
fps_opt.setChecked(counter);
fps_opt.setOnCheckedChangeListener(fps_options);
final CompoundButton use_egl14_opt = (CompoundButton) getView().findViewById(R.id.force_gpu_option);
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN_MR2) {
OnCheckedChangeListener force_gpu_options = new OnCheckedChangeListener() {
public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {
mPrefs.edit().putBoolean(Config.pref_egl14, isChecked).apply();
}
};
boolean enhanced = mPrefs.getBoolean(Config.pref_egl14, false);
use_egl14_opt.setChecked(enhanced);
use_egl14_opt.setOnCheckedChangeListener(force_gpu_options);
} else {
use_egl14_opt.setEnabled(false);
}
CompoundButton force_software_opt = (CompoundButton) getView().findViewById(
R.id.software_option);
OnCheckedChangeListener force_software = new OnCheckedChangeListener() {
public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {
mPrefs.edit()
.putInt(Config.pref_rendertype, isChecked
? GL2JNIView.LAYER_TYPE_SOFTWARE : GL2JNIView.LAYER_TYPE_HARDWARE
).apply();
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN_MR1) {
if (isChecked) {
use_egl14_opt.setEnabled(false);
mPrefs.edit().putBoolean(Config.pref_egl14, false).apply();
} else {
use_egl14_opt.setEnabled(true);
}
}
mPrefs.edit().putInt(Config.pref_rendertype, isChecked ?
GL2JNIView.LAYER_TYPE_SOFTWARE : GL2JNIView.LAYER_TYPE_HARDWARE).apply();
}
};
int software = mPrefs.getInt(Config.pref_rendertype, GL2JNIView.LAYER_TYPE_HARDWARE);

View File

@ -191,10 +191,9 @@ public class GL2JNIView extends GLSurfaceView
// our surface exactly. This is going to be done in our
// custom config chooser. See ConfigChooser class definition
// below.
setEGLConfigChooser(
translucent?
new GLCFactory.ConfigChooser(8, 8, 8, 8, depth, stencil)
: new GLCFactory.ConfigChooser(5, 6, 5, 0, depth, stencil)
setEGLConfigChooser(translucent?
new GLCFactory.ConfigChooser(8, 8, 8, 8, depth, stencil)
: new GLCFactory.ConfigChooser(5, 6, 5, 0, depth, stencil)
);
// Set the renderer responsible for frame rendering