mirror of
https://github.com/TeamVanced/VancedMicroG
synced 2024-12-25 04:05:51 +01:00
Java 5 migration
This commit is contained in:
parent
5b711fcec6
commit
7df0c1824a
@ -59,6 +59,6 @@ public class WebImage extends AutoSafeParcelable {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public String toString() {
|
public String toString() {
|
||||||
return String.format(Locale.getDefault(), "Image %dx%d %s", new Object[]{Integer.valueOf(width), Integer.valueOf(height), uri.toString()});
|
return String.format(Locale.getDefault(), "Image %dx%d %s", width, height, uri.toString());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -117,7 +117,7 @@ public class DeviceConfiguration {
|
|||||||
if (egl10 != null) {
|
if (egl10 != null) {
|
||||||
EGLDisplay display = egl10.eglGetDisplay(EGL10.EGL_DEFAULT_DISPLAY);
|
EGLDisplay display = egl10.eglGetDisplay(EGL10.EGL_DEFAULT_DISPLAY);
|
||||||
egl10.eglInitialize(display, new int[2]);
|
egl10.eglInitialize(display, new int[2]);
|
||||||
int cf[] = new int[1];
|
int[] cf = new int[1];
|
||||||
if (egl10.eglGetConfigs(display, null, 0, cf)) {
|
if (egl10.eglGetConfigs(display, null, 0, cf)) {
|
||||||
EGLConfig[] configs = new EGLConfig[cf[0]];
|
EGLConfig[] configs = new EGLConfig[cf[0]];
|
||||||
if (egl10.eglGetConfigs(display, configs, cf[0], cf)) {
|
if (egl10.eglGetConfigs(display, configs, cf[0], cf)) {
|
||||||
@ -147,8 +147,8 @@ public class DeviceConfiguration {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private static void addExtensionsForConfig(EGL10 egl10, EGLDisplay egldisplay, EGLConfig eglconfig, int ai[],
|
private static void addExtensionsForConfig(EGL10 egl10, EGLDisplay egldisplay, EGLConfig eglconfig, int[] ai,
|
||||||
int ai1[], Set<String> set) {
|
int[] ai1, Set<String> set) {
|
||||||
EGLContext eglcontext = egl10.eglCreateContext(egldisplay, eglconfig, EGL10.EGL_NO_CONTEXT, ai1);
|
EGLContext eglcontext = egl10.eglCreateContext(egldisplay, eglconfig, EGL10.EGL_NO_CONTEXT, ai1);
|
||||||
if (eglcontext != EGL10.EGL_NO_CONTEXT) {
|
if (eglcontext != EGL10.EGL_NO_CONTEXT) {
|
||||||
javax.microedition.khronos.egl.EGLSurface eglsurface =
|
javax.microedition.khronos.egl.EGLSurface eglsurface =
|
||||||
@ -157,12 +157,8 @@ public class DeviceConfiguration {
|
|||||||
egl10.eglMakeCurrent(egldisplay, eglsurface, eglsurface, eglcontext);
|
egl10.eglMakeCurrent(egldisplay, eglsurface, eglsurface, eglcontext);
|
||||||
String s = GLES10.glGetString(7939);
|
String s = GLES10.glGetString(7939);
|
||||||
if (s != null && !s.isEmpty()) {
|
if (s != null && !s.isEmpty()) {
|
||||||
String as[] = s.split(" ");
|
String[] as = s.split(" ");
|
||||||
int i = as.length;
|
set.addAll(Arrays.asList(as).subList(0, as.length));
|
||||||
for (int j = 0; j < i; j++) {
|
|
||||||
set.add(as[j]);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
egl10.eglMakeCurrent(egldisplay, EGL10.EGL_NO_SURFACE, EGL10.EGL_NO_SURFACE, EGL10.EGL_NO_CONTEXT);
|
egl10.eglMakeCurrent(egldisplay, EGL10.EGL_NO_SURFACE, EGL10.EGL_NO_SURFACE, EGL10.EGL_NO_CONTEXT);
|
||||||
egl10.eglDestroySurface(egldisplay, eglsurface);
|
egl10.eglDestroySurface(egldisplay, eglsurface);
|
||||||
|
Loading…
Reference in New Issue
Block a user