main() must not run real_main on android. The library's DT_INIT points at Odin's _odin_entry_point, which the loader runs the moment NativeActivity dlopens libmain.so -- before the glue calls android_main, so context.user_ptr is nil and backend_init faults writing app.onAppCmd. The proc still has to exist: package main requires it and it is the desktop entry point. The insets retry now uses request_render_at. A plain request_render made before the build is consumed by the frame it is running in, so it schedules nothing and the loop parks with insets unresolved; it only appeared to work because the first frames redraw anyway while the tree settles. Guards the JNI-only paths (show_toast, refresh_insets) behind the android subtarget so the shared real_main is usable on desktop. refresh_insets returns true there rather than false: zero insets are correct where there are no system bars, and returning false would retry every frame forever. Also declares appCategory=game, and enables the engine's frame timings. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
41 lines
1.4 KiB
XML
41 lines
1.4 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
|
package="com.illusionman1212.dogfood2"
|
|
android:versionCode="1"
|
|
android:versionName="1.0">
|
|
|
|
<uses-sdk android:minSdkVersion="24" android:targetSdkVersion="37" />
|
|
<uses-feature android:glEsVersion="0x00030002" android:required="true" />
|
|
|
|
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
|
|
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
|
|
<uses-permission android:name="android.permission.MANAGE_EXTERNAL_STORAGE" />
|
|
|
|
<application
|
|
android:label="Dogfooding"
|
|
android:appCategory="game"
|
|
android:hasCode="false"
|
|
android:icon="@mipmap/ic_launcher"
|
|
android:roundIcon="@mipmap/ic_launcher_round"
|
|
android:debuggable="true">
|
|
|
|
<activity android:name="android.app.NativeActivity"
|
|
android:configChanges="orientation|keyboardHidden"
|
|
android:exported="true"
|
|
android:theme="@android:style/Theme.NoTitleBar">
|
|
|
|
<meta-data android:name="android.app.lib_name"
|
|
android:value="main" />
|
|
|
|
<intent-filter>
|
|
<action android:name="android.intent.action.MAIN" />
|
|
<category android:name="android.intent.category.LAUNCHER" />
|
|
</intent-filter>
|
|
|
|
</activity>
|
|
|
|
</application>
|
|
|
|
</manifest>
|
|
|