Android device verification: forced landscape, fullscreen, data layering
- Ava2Activity passes the "args" intent extra as the command line (build.sh forwards AVA2_ARGS); it also always requests sensor landscape. - app_loop sets SDL_HINT_ORIENTATIONS to landscape and creates the window fullscreen on Android/iOS (SDL requested FULL_USER for the resizable window, overriding the manifest; the status bar drew over the HUD). - push_assets.py: pack-manifest test-rundir now wins over assets/loose (~1000 differing files; half-size tree atlases broke SpeedTree UVs), pushes in batches of <=20k files, and chmods shell-owned files so the app can read them on Android 17. - PORT-PLAN: device verification results and outstanding gaps. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
6244b1d860
commit
8f96e7a143
@@ -0,0 +1,29 @@
|
||||
package com.metin2.ava2;
|
||||
|
||||
import android.content.pm.ActivityInfo;
|
||||
|
||||
import org.libsdl.app.SDLActivity;
|
||||
|
||||
/**
|
||||
* SDLActivity with command-line arguments for development runs:
|
||||
* {@code adb shell "am start -n com.metin2.ava2/.Ava2Activity --es args '--phase game --preview-data'"}.
|
||||
* A normal launch (no extra) passes none, as before.
|
||||
*/
|
||||
public class Ava2Activity extends SDLActivity {
|
||||
@Override
|
||||
protected String[] getArguments() {
|
||||
String args = getIntent() != null ? getIntent().getStringExtra("args") : null;
|
||||
if (args == null || args.trim().isEmpty()) return new String[0];
|
||||
return args.trim().split("\\s+");
|
||||
}
|
||||
|
||||
/**
|
||||
* The game is landscape-only. SDL re-requests an orientation whenever a window is created or
|
||||
* resized (FULL_USER for a resizable window without SDL_HINT_ORIENTATIONS), which would override
|
||||
* the manifest's sensorLandscape; keep both landscape directions regardless of the hint.
|
||||
*/
|
||||
@Override
|
||||
public void setOrientationBis(int w, int h, boolean resizable, String hint) {
|
||||
setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_SENSOR_LANDSCAPE);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user