summaryrefslogtreecommitdiff
path: root/Source/Android/app/src/main/java
AgeCommit message (Collapse)Author
2017-12-28Android: Always run HandleInit logic on app startJosJuice
Note: By "HandleInit" in this commit message, I mean the code that is in HandleInit in master except the part that launches EmulationActivity. In other words, I mean the call to SetUserDirectory and the call to DirectoryInitializationService.startService. Couldn't think of something more accurate to call that than "HandleInit"... In master, HandleInit only runs when the main activity is launched. This is a problem if the app ends up being launched in some other way, such as resuming EmulationActivity after the app has been killed in order to reclaim memory. It's important that we run HandleInit, because otherwise the native code won't know where the User and Sys folders are. In order to implement this, I'm dropping the ability to set a custom User folder in an intent. I don't think anyone is using that anyway. It's not impossible to support it, but I can't see a way to support it that doesn't involve something ugly like having code for calling HandleInit in every activity (or at least MainActivity + TvMainActivity + EmulationActivity, with more activities potentially needing it in the future if we expand the usage of native code for e.g. settings). If we want to support setting a custom user directory, we should consider another way to do it, such as a setting that's stored in getFilesDir() or getExternalStorageDirectory(). Intents are intended to control the behavior of a specific activity, not the whole app.
2017-12-26Android: Fix race condition with writing files before setting User pathJosJuice
2017-12-26Android: Don't extract Sys if it already is extractedJosJuice
2017-12-26Android: Extract Sys to a different folder than the User folderJosJuice
2017-12-24Merge pull request #6258 from mahdihijazi/extract_serviceJosJuice
[Android] Refactor AssetCopyService and the way we extract resources …
2017-12-23Fix a bug when you open the gc pad settings after fresh install of Dolphinmahdihijazi
You will see an empty gc pad settings screen until you open any other settings screen and change something, at that moment the Dolphin.ini will be created and the gc pad settings will be loaded successfully the next time you open the screen. This fixes the bug by putting the default gc pad settings section even if the Dolphin.ini file doesn't exist
2017-12-23Don't override the WiimoteNew.ini so the user don't loose the selected sourcemahdihijazi
2017-12-20Fix default value for Show FPS in Android GUIJosJuice
https://bugs.dolphin-emu.org/issues/10728
2017-12-19Merge pull request #6224 from hackbar/input-fix-mogaMarkus Wick
Android: Handle missing mappings for the Moga Pro 2 HID controller.
2017-12-18Update Android GUI settings for Hybrid XFBJosJuice
2017-12-18[Android] Refactor AssetCopyService and the way we extract resources from ↵mahdihijazi
the assets This solves the following issues: 1. If user uninstall Dolphin and install it again the resources will not be copied unless the user manually clear the app cache because we are enabling the allowBackup flag in the manifest which will make the app restore the settings saved in the shared prefernces including the flag assetsCopied. This PR always copy the files everytime you open Dolphin. 2. If the AssetCopyService took long time and you tried to open the settings screen or start a game the behaviour was not expected or the emulator will crash, this PR make sure that whatever we add to the DirectoryInitializationService or how long it will take will still work as expected by blocking both the settings screen and the emulaion screen to wait untill all resources needed are copied. 3. Better communication between the DirectoryInitializationService and the UI screens using brocast messages.
2017-12-18Replace all Anonymouse class with lambdas or method refernce where applicablemahdihijazi
2017-11-28Android: Handle missing mappings for the Moga Pro 2 HID controller.Mike
It seems to report the GENERIC_1 axis stuck at 1.
2017-11-09Android: Handle a database downgrade.Mike
This has no effect now, as we've never bumped the database version. Instead, it adds future proofing, and makes moving between a future version with a bump and master clean.
2017-11-07Android: Ignore joystick axis movements in the flat area.Mike
Now that all inputs are corrected to zero-centered, we can use getFlat() to ignore movements that are just noise. This eliminates a lot of drift when the controller is at rest, notably on the character select screen in Melee.
2017-11-07Android: Handle duplicate axis, and fix known bad axis.Mike
Android reports the same physical axis multiple times for analog triggers, and this handles this case. There are also some controllers with broken mappings (eg the analog triggers on a PS4 DualShock 4). These axis don't center correctly. There are also some controllers (again, the PS4) that send both a button press and an axis movement. This ignores the buttons so we can use the analog axis. Otherwise, since the button comes before the axis moves far we would always take the button.
2017-11-03Merge pull request #6142 from gwicks/android-settingsLeo Lam
Android: Add Slot A and B Device settings to the settings UI
2017-11-03Merge pull request #6163 from JosJuice/simple-ini-irLeo Lam
Revert "Convert to/from old EFB scale numbering"
2017-11-02Revert "Convert to/from old EFB scale numbering"JosJuice
This reverts commit 1fc910b3ea9eafcc3cc5132bdfc51731ba5fa9fd, replacing the old INI setting EFBScale with a new INI setting called InternalResolution, which has a simpler mapping: | EFBScale | InternalResolution ----------------- | -------------------- | -------------------- Auto (fractional) | 0 | Auto (integral) | 1 | 0 1x | 2 | 1 1.5x | 3 | 2x | 4 | 2 2.5x | 5 | 3x | 6 | 3 4x | 7 | 4 5x | 8 | 5 6x | 9 | 6 All the fractional IRs were removed in f090a943.
2017-11-02Merge pull request #6140 from hackbar/cleanup2Anthony
Android: minor UI changes
2017-11-01Android: Destroy the surface in EmulationFragment onStop.Mike
Emulation needs to be running when the surface is destroyed, but we want to pause in onStop. So call the surfaceDestroyed callback, as this accomplished both.
2017-11-01Android: Use the newInstance pattern for EmulationFragment.Mike
2017-11-01Android: Use the system "immersive" mode for fullscreen, and simplify how it'sMike
called. The user will get a brief system popup tutorial the first time it's used, so we don't need to show them the menu every time. Once they enable it by pulling down, hide again after 3s.
2017-10-30Android: Add Slot A and B device settings to UIGreg Wicks
2017-10-21Android: Refactor onMotionEvent.Mike Harris
This works the same, but only looks for the initial event and ignores the keyup / return to home. It handles joystick diagonals smarter, in that it ignore diagonals until the stick moves in a more cardinal direction. This fixes an odd bug where the dpad up/down were switched (thread post I think found it - https://forums.dolphin-emu.org/Thread-arm64-version-on-shield-tv-x1-local-multiplayer-not-working-d-pad-mappings?pid=379918#pid379918)
2017-10-21Android: Refactor the saveInput function.Mike Harris
In its prior state, it had xor parameters, which is confusing.
2017-10-16Rename the param to setGamePath.Mike Harris
2017-10-16Minor cleanup in EmulationActivity.Mike Harris
Move the parameter extraction earlier on in onCreate. Mostly this moves setting sIsGameCubeGame to before setContentView, which means EmulationFragment will always see it in a consistent state. Previously, there was a race, which mean the controller overlay would randomly be Wii controls for a GameCube game (since the default is false). Use the correct support version of things, ActivityOptionsCompat and transitions Rename static var mIsGameCubeGame to sIsGameCubeGame. s is static, m is member.
2017-10-16Use the fragment backstack properly, and use fragment animations.Mike Harris
Make the MenuFragment added and removed by fragment transactions only, instead of being initially present in the XML. This fixes a glitch where it doesn't animate correctly the first time it's used.
2017-10-15Move emulation lifecycle handling into EmulationFragment.Mike Harris
The Activity is responsible for just its views and menus and such. It signals the Fragment via setGamePath, StartEmulation and StopEmulation. The Fragment manages the actual emulation lifecycle. It is solely responsible for calling the NativeLibrary lifecycle methods. With this lifecycle simplification, the NativeLibrary no longer needs to kill the Activity. It happens normally now. This simplifies a lot of things, live handling rotation.
2017-10-15Start the postponed activity transition as soon as Picasso loads theMike Harris
image. Doing it on the preDraw for the View is too complicated. This works just as well.
2017-10-15Only postpone transistions on Activity creation.Mike Harris
This is causing bugs (no UI is rendered) when the Activity is rotated.
2017-10-15Use weak references for the static Activity in NativeLibrary.Mike Harris
Add in null checks as well.
2017-10-15Remove EmulationActivity.MenuType. This should have been removed whenMike Harris
SaveLoadStateFragment was refactored.
2017-10-15Add dummy View that works around a bug with the nVidia Shield.Mike Harris
Without this View, the emulation SurfaceView acts like it has the highest Z-value, blocking any other View. This includes the menu fragments and the screenshot ImageView.
2017-10-15Add a clearEmulation method.Mike Harris
This makes it clear that the Activity is being cleared and removes null as a valid param. This improves readability (and logging slightly). Fix spacing between [Tag] and message. This matches the rest of the log messages.
2017-10-15Move all Activities and Fragments to the support library versions.Mike Harris
In the support lib, the code comes from the SDK, not the device like the framework version. This means we're shipping a more recent and less buggy version. It's also a good idea to keep the entire project on one version. We have a bit of a mix now. I think some of the Fragment animation issues were because of this mixing. For the leanback activities, AppCompatActivity requires AppCompat themes, which they don't ship for Theme.Leanback. So use FragmentActivity instead (that's the parent of AppCompatActivity, but still in the support library). For passed around Activities, use FragmentActivity to work with both.
2017-10-03Combine SaveStateFragment and LoadStateFragment into one.Mike Harris
Other than what action they send back to EmulationActivity.handleMenuAction(), they are the same. Change the menu-handling logic in EmulationActivity to keep track of a boolean for whether the submenu is visible, rather than keeping the fragment tag. There's only one fragment visible, so this makes more sense.
2017-10-03Move newInstance and launch to the top of the file.Mike Harris
Following the style guide, constructors go before public methods. newInstance and launch are basically constructors.
2017-09-29Remove 'all' as a Platform enum.Mike Harris
This will remove the 'all games' row on the TV view.
2017-09-29Convert platform ints to a proper enum Platform.Mike Harris
This is good practice (see Effective Java chapter 6), and adds compile-time checks.
2017-09-29Change from using tags in ImageCardView to setting a per-platform background.Mike Harris
This allows us to use a real ImageCardView instead of extending the class.
2017-09-29remove dupe log tagMike Harris
2017-09-26Remove prefix of tag, args and keys with packagename.Mike Harris
Prefixing everything with a constant packagename is not needed for internal keys, and just adds complexity. Rename ARGUMENT_ prefix to ARG_ to match (most) of the rest of the codebase. Restrict visiblity of above as much as possible.
2017-09-26Move Save/LoadFragment's layout ID inline and private.Mike Harris
Fix the hack of using the layout resource ID as a save/load ID, and instead use a proper enum.
2017-09-25Remove unused FRAGMENT_TAG, and move the fragment's layout ID inline.Mike Harris
FRAGMENT_ID wasn't actually the fragment's ID (that's misleading, and sounds like the tag). It's actually the layout resource ID. There's no point in making that a static constant.
2017-09-10Merge pull request #6034 from JonnyH/WIP/fix-android-null-SettingsSection-crashMarkus Wick
Fix some Android UI crashes opening 'settings' menus
2017-09-09Remove trailing spaces from Android filesJosJuice
Android Studio wants to correct these automatically when editing files.
2017-09-08Android UI: remove some unnecessary null pointer catchesJonathan Hamilton
These can no longer happen during 'normal' use (IE if the setting was missing)
2017-09-08Android SettingsFragmentParser - remove ad-hoc SettingSection constructionJonathan Hamilton
Now the SettingsSection map constructs a new SettingsSection at .get() time, these are no longer needed