Skip to content

Commit 805873b

Browse files
committed
Android update to interface changes
1 parent 72c495c commit 805873b

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

graphics-by-opengl-android/src/main/java/com/nucleus/android/NucleusActivity.java

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@
55
import java.io.InputStreamReader;
66

77
import com.nucleus.CoreApp;
8+
import com.nucleus.J2SEWindow.Configuration;
9+
import com.nucleus.J2SEWindow.VideoMode;
810
import com.nucleus.SimpleLogger;
911
import com.nucleus.common.Constants;
1012
import com.nucleus.common.Environment;
@@ -101,6 +103,7 @@ public abstract class NucleusActivity extends Activity
101103
protected boolean backgroundTaskOnBackPressed = true;
102104

103105
protected SurfaceConfiguration surfaceConfig;
106+
protected Configuration configuration;
104107

105108
@Override
106109
public void onCreate(Bundle savedInstanceState) {
@@ -375,7 +378,10 @@ public boolean onSurfaceCreated(int width, int height) {
375378
}
376379
NucleusRenderer renderer = RendererFactory.getRenderer(gles);
377380
if (coreApp == null) {
378-
coreApp = CoreApp.createCoreApp(width, height, renderer, surfaceConfig);
381+
if (configuration == null) {
382+
configuration = new Configuration(minVersion, surfaceConfig, new VideoMode(width, height));
383+
}
384+
coreApp = CoreApp.createCoreApp(renderer, configuration);
379385
return true;
380386
}
381387
return false;

0 commit comments

Comments
 (0)