File tree Expand file tree Collapse file tree
src/main/java/com/jme3/app Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -18,8 +18,6 @@ dependencies {
1818}
1919
2020compileJava {
21- // The Android-Native Project requires the jni headers to be generated, so we do that here
22- options. compilerArgs + = [" -h" , " ${ project.rootDir} /jme3-android-native/src/native/headers" ]
2321 options. sourcepath = files(" src/androidx-stubs/java" )
2422 options. compilerArgs + = [" -implicit:none" ]
2523}
Original file line number Diff line number Diff line change @@ -366,20 +366,10 @@ private AndroidHarness harness() {
366366 protected LegacyApplication createApplication () throws Exception {
367367 AndroidHarness harness = harness ();
368368 Class <?> clazz = Class .forName (harness .appClass );
369- harness .app = (LegacyApplication ) clazz .getDeclaredConstructor ().newInstance ();
370- return harness .app ;
371- }
372-
373- @ Override
374- protected AppSettings createSettings () {
375- AppSettings settings = super .createSettings ();
376- settings .setAudioRenderer (harness ().audioRendererType );
377- return settings ;
378- }
369+ LegacyApplication application = (LegacyApplication ) clazz .getDeclaredConstructor ().newInstance ();
379370
380- @ Override
381- protected void configureSettings (AppSettings settings ) {
382- AndroidHarness harness = harness ();
371+ AppSettings settings = new AppSettings (true );
372+ settings .setAudioRenderer (harness .audioRendererType );
383373 settings .setEmulateMouse (harness .mouseEventsEnabled );
384374 settings .setEmulateMouseFlipAxis (harness .mouseEventsInvertX , harness .mouseEventsInvertY );
385375 settings .setUseJoysticks (harness .joystickEventsEnabled );
@@ -391,6 +381,10 @@ protected void configureSettings(AppSettings settings) {
391381 settings .setSamples (harness .eglSamples );
392382 settings .setStencilBits (harness .eglStencilBits );
393383 settings .setFrameRate (harness .frameRate );
384+
385+ application .setSettings (settings );
386+ harness .app = application ;
387+ return application ;
394388 }
395389
396390 @ Override
You can’t perform that action at this time.
0 commit comments