Skip to content

ANDROID PORT AND FIXES - #43

Open
nexus382 wants to merge 6 commits into
RikkiGibson:mainfrom
nexus382:Nexus/android-port-and-fixes
Open

ANDROID PORT AND FIXES#43
nexus382 wants to merge 6 commits into
RikkiGibson:mainfrom
nexus382:Nexus/android-port-and-fixes

Conversation

@nexus382

Copy link
Copy Markdown

What this does

This brings DreamPotato over to Android, and fixes the rough spots we found while testing it on real hardware.

This is not just a project file tossed in and called done. The app now builds as an Android APK, launches on device, loads the real VMU BIOS from Android storage, keeps DreamLink on localhost, and has Android touch/UI work so it can actually be used with fingers.

Main changes

Added the Android head project for net9.0-android.

Added Android startup, activity wiring, manifest basics, content packaging, and native Android cimgui libs.

Added Android app-private storage setup for BIOS, saves, imported files, configs, screenshots, and save states.

Added Android file picker flows for first run BIOS import, opening vmu/bin/vms files, and Save As export.

Added platform services so desktop keeps using its normal native dialogs, while Android uses the Android document picker.

Hid desktop-only menu stuff on Android, like Open Data Folder and Set Window Size.

Added touch controls for the VMU buttons.

Made the Android menu bar bigger so its not miserable to tap with a finger.

Fixes from real phone testing

Fixed Android menu tapping so the top menu actually selects items correctly.

Fixed text getting chopped apart in menus and mapping screens. The real issue was the ImGui renderer not applying per-command vertex and index offsets.

Fixed Slot 2 open/close breaking the screen size on Android. That was desktop window resize logic touching the Android backbuffer, which is not ok on a phone.

Made BIOS import safer so a bad selected BIOS does not trash the existing valid one.

Added better Android picker failure handling, so it doesnt just silently hang if Android refuses a picker action.

Tested

Tested on a Samsung S25 Ultra.

Checked APK build, install, launch, real BIOS load, portrait and landscape, Slot 2 open and close, menu tapping, Gamepad Config text, and crash logs.

Also checked Windows desktop build still works, and the test project still passes.

Notes

There are a few original code warnings I did not touch becuase they are outside the Android port scope. I wrote those up in the out of scope findings doc so Rikki can decide what he wants to do with them.

Android can now build as its own head project and run DreamPotato on device with the same shared MonoGame front end. This adds the Android activity, manifest, content packaging, native cimgui libs, app private storage setup, and the Debug APK path we have been testing.

The port now has Android file picker flows for the VMU BIOS, opening vmu bin vms files, and Save As export. Desktop still keeps its normal native dialogs through platform services.

The phone UI got the work it needed too. Touch input now feeds ImGui properly, the VMU overlay buttons are usable, Android menus are bigger for fingers, and desktop only actions like Open Data Folder and Set Window Size are hidden on Android.

Fixed the stuff we hit while testing on the S25. Text was getting cut apart because ImGui draw commands were missing their vertex and index offsets. Slot 2 open close was also using desktop resize logic and breaking the Android backbuffer, so Android now keeps the device surface size clean.

Validation done with Android build and install on the S25, Windows desktop build, and the test project. There are a few original XML doc warnings left alone and written up in the out of scope findings doc.
@RikkiGibson

Copy link
Copy Markdown
Owner

Test job failure is not surprising, I think there's some limitation which keeps it from working right across forks.

I'll plan on checking out this PR when I have time, and just editing things till it's in a state I'm happy with. Thanks

The Ubuntu jobs were doing a plain dotnet restore at the repo root, which made them pick up the new Android head project and fail because the android workload is not installed there.

This scopes the Test job to DreamPotato.Tests and the Linux publish restore to DreamPotato.MonoGame with linux x64, so those jobs only prepare the projects they actually run.

No app behavior changes here. This is just keeping Android workload requirements out of the desktop and test CI paths.
@nexus382

Copy link
Copy Markdown
Author

the fix was because linux was trying to build android and it was being messy. simple fix pushing now

@nexus382

Copy link
Copy Markdown
Author

I think this is much closer to ready then it may have appeared. I have a lkot of sucess with tunnelling to android from pc, so when this gets merdged i can set that up too

@RikkiGibson

Copy link
Copy Markdown
Owner

Sounds good. I am basically going to be going through all the code and potentially refactoring things until I understand everything and I’m happy with how everything works.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants