Lime-3DS-Emulator icon indicating copy to clipboard operation
Lime-3DS-Emulator copied to clipboard

android: Implement option for emulation-orientation

Open newhinton opened this issue 1 year ago • 14 comments
trafficstars

See #267

This adds a setting in the theme-section to override and specify the desired orientation for the emulation.

newhinton avatar Jul 04 '24 14:07 newhinton

@OpenSauce04 Is it possible to extract the lime-library from the latest release and use it in debug-builds instead of building them myself? Currently i don't actually have a working emulator, just its frontend. It is enough for this PR, but in the future i might look into working on some other android-things, and it would be nice to have a fully working emulator, and i am not to keen to install all the required dep's in my already bloated system.

newhinton avatar Jul 05 '24 06:07 newhinton

Are you saying that you can't build the program yourself or that you can't test it? It's hard to tell.

OpenSauce04 avatar Jul 05 '24 12:07 OpenSauce04

I can build the android apk, but not lime-emulator itself.

So the resulting android apk is missing the liblime.so (i think thats what it is called) that actually contains the emulator.

That means my app can do everything, except running a game.

(I basically opened src/android/ with android studio and started building the app)

If i have to figure out how to build the entire stack, i will, but it would be nice to have a shortcut so that i can only focus on the frontend, in this case android.

newhinton avatar Jul 05 '24 12:07 newhinton

I'm not sure how you managed to do that, I've set up a development environment on multiple machines using both Linux and Windows and it's just as simple as installing Android Studio and running the project. You don't usually need to do anything else.

OpenSauce04 avatar Jul 05 '24 13:07 OpenSauce04

I've set up a development environment on multiple machines using both Linux and Windows and it's just as simple as installing Android Studio and running the project.

You mean the full dev-setup as described in the wiki? Yeah, i skipped that because i dont have the dependencies installed. I just opened the android-subfolder in android studio and build only that. That (obviously) leads to the lime-binaries missing in the android artifact. I'd like to use existing files as a drop in-replacement. At least for android, that simplifies the setup quite a bit

newhinton avatar Jul 07 '24 13:07 newhinton

You mean the full dev-setup as described in the wiki? Yeah, i skipped that because i dont have the dependencies installed.

This is the entirety of the Android section of the build documentation:

image

There are no other dependencies if you are building for Android. I would know because I use local Docker containers when building for Linux, and don't have the build dependencies installed directly to my system.

OpenSauce04 avatar Jul 07 '24 16:07 OpenSauce04

There are no other dependencies if you are building for Android. I would know because I use local Docker containers when building for Linux, and don't have the build dependencies installed directly to my system.

I did have to install llvm-15-linker-tools on ubuntu, but after that it was building fine.

Also, the emulator was the issue, i overlooked that it should have been an actual device.

newhinton avatar Jul 09 '24 16:07 newhinton

The issue i currently have is that moving the setting to an IntSetting() creates some kind of race condition. Only on exit the setting saves, but it takes a while. Before that has happened, the emulator calls the onReturn and re-initializes the orientation, but with the outdated value. And i guess then the saved value gets lost after quitting the game.

Should i not use an IntSetting in favor of the current "full implementation" like the other settings in the theme one?

newhinton avatar Jul 09 '24 16:07 newhinton

@newhinton You can also use Github Actions to build test programs on your fork. Click on the Actions tab, it'll give you the option to turn it on. Then whenever you push a change on a branch, it'll start building and you can download the various artifacts to test them out.

rtiangha avatar Jul 09 '24 17:07 rtiangha

Please mark the previous discussions as resolved once you have addressed the relevant feedback

OpenSauce04 avatar Jul 13 '24 10:07 OpenSauce04

I will provide a review for this tomorrow

OpenSauce04 avatar Jul 21 '24 16:07 OpenSauce04

You can probably wait with that, there is a bug in how the core deals with rotation: https://github.com/PabloMK7/citra/issues/193

newhinton avatar Jul 21 '24 17:07 newhinton

I will convert this to a draft until this is addressed

OpenSauce04 avatar Jul 22 '24 11:07 OpenSauce04

FYI you shouldn't be using master for PRs because it causes complications when you need to make a new branch. Always use feature branches for each PR.

OpenSauce04 avatar Jul 25 '24 22:07 OpenSauce04

Since this PR got stale and due to codebase changes of https://github.com/Lime3DS/Lime3DS/pull/349 and future related PRs I decided to implement something similar myself, If you have any suggestions related to this feature, move here

Thanks for your contribution nevertheless

ghost avatar Sep 06 '24 12:09 ghost