Commit Graph

326 Commits

Author SHA1 Message Date
Mike Harris
94ed30b055 Use the fragment backstack properly, and use fragment animations.
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-16 20:36:12 -07:00
Mike Harris
c4d7814afa Collapse layouts with a framelayout root then another viewgroup.
There's no point to this, and it just slow things down (technically).
2017-10-15 16:44:56 -07:00
Mike Harris
4cab718065 Move emulation lifecycle handling into EmulationFragment.
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-15 16:44:56 -07:00
Mike Harris
80d51c97ab Add dummy View that works around a bug with the nVidia Shield.
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-15 16:44:56 -07:00
Mike Harris
e4c2d75198 Combine SaveStateFragment and LoadStateFragment into one.
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-03 17:51:08 -07:00
Mike Harris
487591c760 Change from using tags in ImageCardView to setting a per-platform background.
This allows us to use a real ImageCardView instead of extending the
class.
2017-09-29 09:38:14 -07:00
JosJuice
85ab968136 Android: Adjust position of floating action button 2017-09-21 15:48:17 +02:00
JosJuice
7fa20cb1be Remove trailing spaces from Android files
Android Studio wants to correct these automatically when editing files.
2017-09-09 11:34:28 +02:00
mahdihijazi
9918d6e333 [Android] Show the version number on the title for the Android TV UI
- Stop reading version number from native code and use the one from BuildConfig
- Show the version number on the title for the Android TV UI
2017-08-21 22:00:56 +02:00
mahdihijazi
a1d713c589 [Android] Cleanup unused resources & code 2017-08-20 15:49:39 +02:00
JosJuice
1fc910b3ea Convert to/from old EFB scale numbering 2017-08-08 12:09:50 +02:00
JosJuice
f090a94319 Remove non-integer IRs 2017-08-08 12:09:50 +02:00
Stenzek
901bf9c257 VideoConfig: Add config options for ubershaders 2017-07-30 17:43:59 +10:00
shuffle2
b9b3b1dc19 Merge pull request #5347 from JosJuice/do-not-translate-button-names
Don't translate button names
2017-06-05 19:05:09 -07:00
Sean Maas
d4728807e0 Android: Add pressed dpad images for other DPIs 2017-05-15 08:32:22 -04:00
Mahdi Hijazi
216a7ceea8 Android: Add pressed state to the on-screen controllers
Now the buttons will be shown in different color to indicate a press event
2017-05-14 18:41:04 +02:00
JosJuice
0146456af0 Don't translate button names
Since these button names are printed on all real controllers,
we should show them in the same way as they are printed on
the controllers, regardless of the user's language. It seems
like this was intended all along (except for "Start"), but the
_ markers in TASInputDlg.cpp (accidentally?) led to the button
names in the controller configs also becoming translatable.

I'm making exceptions for "L" and "R" because translators
may want to mark them in some way (for instance "L-Digital")
to clarify the difference from "L-Analog" and "R-Analog".

I'm also making an exception for START/PAUSE because it's
referred to as スタート in Japanese games.

I'm changing "Home" and "Start" to uppercase for consistency
with how Nintendo refers to those buttons, and because someone
who isn't familiar with the Latin script might not know the
connection between the lowercase and uppercase letters (most
users likely do know the connection, but we shouldn't assume it),
and because leaving "Start" as "Start" makes it "collide" with
unrelated strings, such as the string for the button that starts
a netplay session.

To rename "Start" and "Home" without breaking INI
compatibility, I added a ui_name variable like in f5c82ad.
2017-05-06 16:29:10 +02:00
Tim Mutton
6b704f5059 Update to latest libraries, use correct version name 2017-05-04 17:13:30 +10:00
Mahdi Hijazi
ed30caa3dd [Android] Fix crash on the Android TV
Whenever the EmulationActivity crashes and the app gets back to the
TvMainActivity, dolphin will crash tring to restor the mBrowseFragment
since we don't save the adapter data in the bundle.

This is quick hack to avoid the crash. The proper fix would be to save the
adapter data in the bundle and restore it before restoring the fragment
when the activity gets recreated.

Crash Stacktrace:
Process: org.dolphinemu.dolphinemu.debug, PID: 30353
java.lang.RuntimeException: Unable to start activity ComponentInfo{org.dolphinemu.dolphinemu.debug/org.dolphinemu.dolphinemu.ui.main.TvMainActivity}: java.lang.IllegalArgumentException: Invalid position 1 requested
    at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2691)
    at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2752)
    at android.app.ActivityThread.-wrap12(ActivityThread.java)
    at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1461)
    at android.os.Handler.dispatchMessage(Handler.java:102)
    at android.os.Looper.loop(Looper.java:154)
    at android.app.ActivityThread.main(ActivityThread.java:6120)
    at java.lang.reflect.Method.invoke(Native Method)
    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:865)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:755)
    Caused by: java.lang.IllegalArgumentException: Invalid position 1 requested
    at android.support.v17.leanback.app.BrowseFragment.createMainFragment(BrowseFragment.java:509)
    at android.support.v17.leanback.app.BrowseFragment.replaceMainFragment(BrowseFragment.java:1454)
    at android.support.v17.leanback.app.BrowseFragment.setAdapter(BrowseFragment.java:764)
    at org.dolphinemu.dolphinemu.ui.main.TvMainActivity.buildRowsAdapter(TvMainActivity.java:183)
    at org.dolphinemu.dolphinemu.ui.main.TvMainActivity.onCreate(TvMainActivity.java:59)
    at android.app.Activity.performCreate(Activity.java:6664)
    at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1118)
    at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2644)
    at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2752) 
    at android.app.ActivityThread.-wrap12(ActivityThread.java) 
    at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1461) 
    at android.os.Handler.dispatchMessage(Handler.java:102) 
    at android.os.Looper.loop(Looper.java:154) 
    at android.app.ActivityThread.main(ActivityThread.java:6120) 
    at java.lang.reflect.Method.invoke(Native Method) 
    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:865) 
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:755)
2017-05-03 23:58:40 +02:00
Mahdi Hijazi
796039e340 [Android] Add the missing Stereoscopic options 2017-05-03 11:56:09 +02:00
MerryMage
ee7e6edf31 Android: Add audio stretch setting 2017-04-18 18:42:02 +01:00
JosJuice
9cd9ae902a x86-64 support on Android
We can do this now that the x86-64 JIT supports PIE.

JITIL is deliberately excluded from the GUI because it
doesn't support PIE yet. (JITIL will be used if it's
set in the INI, though.)
2017-04-16 11:53:33 +02:00
Stenzek
105be9b514 Android: Add option for enabling GPU texture decoding 2017-04-01 12:32:57 +10:00
Mat M
542fb347f1 Merge pull request #5160 from mahdihijazi/enhance_style
android: Change the color of the selected slot to make it more visible
2017-03-31 03:57:32 -04:00
Mahdi Hijazi
8f2f833f9d Update to Android SDK 25
This handles the new permission system in Android M.
2017-03-25 14:55:15 +01:00
Mahdi Hijazi
f1fd336a03 Change the color of the selected slot to make it more visible
On Android TV the selected slot is not cleary hilighted, this is to fix
that but changing the selected slot text color to blue.
2017-03-25 09:55:53 +01:00
Mahdi Hijazi
ecf2eaac99 Remove obselete game menu settings button 2017-03-18 22:08:49 +01:00
Sean Maas
cc29691875 Android: Change Exit Without Saving to Save and Exit 2017-01-10 17:12:42 -05:00
Sean Maas
a90731e2ae Android: Add input binding menus 2016-11-26 18:29:33 -05:00
Sean Maas
d10b336b0a Android: Add InputBindingSetting class
Also update MotionAlertDialog to work with the new setting, and remove the
old InputBindingPreference.
2016-11-26 18:29:25 -05:00
Pringo
4bd5674b85 Change "Wiimote" to "Wii Remote" in Interface
The usage of "Wii Remote" and "Wiimote" in the interface is inconsistent. "Wiimote" is also not a real word nor is it an official product name. Therefore I have changed instances of "Wiimote" in the UI to instead say "Wii Remote". I also made a couple of minor grammatical changes as well.

This is mostly a resubmission of #4338 but there are some minor other changes as well.
2016-10-25 19:49:41 -07:00
Sean Maas
9eb0ab936f Android: Remove Japanese strings
These were very outdated and unmaintained.
2016-10-25 14:20:19 -04:00
Sean Maas
68affd37a1 Android: Remove unused stuff 2016-10-25 14:20:15 -04:00
Sean Maas
3b28fe11d6 Android: Cleanup formatting 2016-10-25 14:18:06 -04:00
Sean Maas
12db4e4882 Android: Fix "up one level" button 2016-10-24 23:16:51 -04:00
Sean Maas
f981098438 Android: On-screen classic controller + Wii controller select
It's now possible to switch between a horizontal or vertical Wiimote
with no extension, a Wiimote with a Nunchuk, a Classic Controller,
or a GameCube Controller when running a Wii game.
2016-10-13 21:31:36 -04:00
Sean Maas
126117cdf7 Android: Use the light theme for emulation 2016-10-12 22:45:03 -04:00
Sean Maas
05f78a7707 Android: Add custom control scaling
Also put all touch control settings under a "Configure Controls" submenu
so the in-game menu isn't so cluttered.
2016-10-09 19:00:32 -04:00
sigmabeta
01b8a937ff Fix games being invisible in the game list on non-TV devices 2016-10-08 08:57:32 -04:00
degasus
05eff01229 Android: Update the gradle file to use android studio 2.2 cmake. 2016-10-05 23:44:10 +02:00
Stenzek
4a4f6cc135 Android: Add video backend choice to settings 2016-10-01 02:40:02 +10:00
Sean Maas
313be655f4 Android: Option to toggle on/off individual buttons 2016-09-29 20:06:59 -04:00
Sean Maas
50b44fa337 Android: More on-screen buttons
GameCube now has a c-stick. For Wii games, there is now a Wiimote + Nunchuk setup.
2016-09-29 20:06:59 -04:00
MaJoR
daac4c4ae9 Adding forgotten wiimote home button
Ooops, forgot something. This adds the home button, that's all.
2016-09-28 23:28:44 -07:00
MaJoR
df5ea3d292 Adds Android Wiimote button images.
These were made when the button images were first remade many months ago, but they were never committed since there was no use for them at the time (and laziness :P). BUT now there is a PR that finally has use for these images, so it's time to get this into Dolphin and available for use!
2016-09-23 02:25:31 -07:00
Ironthighs
3dfeea01da -Implemented ability to configure game controls by moving them around individually. Controls save locations once they are placed. 2016-07-22 23:01:45 -05:00
Ryan Houdek
baee7f0d15 Update to MaJoR1's latest on screen buttons 2016-03-08 20:27:03 -06:00
Pierre Bourdon
265c6408d6 Merge pull request #3686 from Armada651/revert-3578
Revert "Merge pull request #3578 from Armada651/forced-slow-depth"
2016-03-03 02:03:03 +01:00
Alcaro
da68dfc2f4 Use optipng too. 2016-02-29 17:08:18 +01:00
Jules Blok
6d1628eda4 Revert "Merge pull request #3578 from Armada651/forced-slow-depth"
This reverts commit e2a1a085b6, reversing
changes made to 2aea549eef.
2016-02-29 00:55:51 +01:00
Alcaro
a79d9ccfa1 Run pngout and zopflipng on every single PNG in this repo. 2016-02-27 22:25:51 +01:00
Jules Blok
e2a1a085b6 Merge pull request #3578 from Armada651/forced-slow-depth
VideoConfig: Replace FastDepthCalc by ForcedSlowDepth.
2016-02-22 11:29:09 +01:00
sigmabeta
c2d03e62e7 Add Wiimote graphic 2016-02-08 21:23:16 -05:00
sigmabeta
dd4082f216 Add Wiimote Speaker option 2016-02-08 21:23:16 -05:00
sigmabeta
85cf07e87e Add Wiimote Input menu 2016-02-08 21:23:16 -05:00
Jules Blok
fb2f8e49bb Android: Remove FastDepthCalc option. 2016-02-08 12:26:56 +01:00
Ryan Houdek
fe53461611 [Android] Implement support for real Wiimotes with the DolphinBar
This is the only way to get Wiimotes working under Android now.
This, just like the Wii U Gamecube Controller Adapter, completely goes around Android's limitations and talks with the device directly through USBManager.

Couple notes.
Continuous scanning must be enabled otherwise the Wiimotes won't be seen.
The UI doesn't expose support for this yet. One must change the Wiimote source and continuous scanning settings manually.

Testing up to two wiimotes in Taiko No Tatsujin, no reason to believe all four won't work.
2016-02-07 05:31:48 -06:00
sigmabeta
7542eafd58 Fix capitalization on "GameCube" strings 2016-01-31 10:17:30 -05:00
sigmabeta
93056e3988 Change SettingsActivity label to "Settings" instead of "CPU Settings" 2016-01-31 10:06:00 -05:00
sigmabeta
6115d39a7a Implement Gamecube Input setting screen 2016-01-29 23:33:06 -05:00
sigmabeta
28bcd2636b Fix CPU Core selection on x86-64 devices (really, just the Android emulator) 2016-01-25 09:28:57 -05:00
sigmabeta
fb04622039 Fix bugs in Setting screen & add a way to exit without saving 2016-01-24 19:31:34 -05:00
sigmabeta
04974835d6 Add fragment transition animations to the Settings UI screen 2016-01-23 17:00:54 -05:00
sigmabeta
2190496ce8 Fix special case for XFB & update EFB to match desktop 2016-01-23 12:28:51 -05:00
sigmabeta
d90dce6d12 Implement video settings + support for missing files / settings 2016-01-23 12:28:51 -05:00
sigmabeta
c8e4008b83 Implement Seekbar dialog and SingleChoice dialog 2016-01-23 12:28:50 -05:00
sigmabeta
ce8a3d9bfb Implement basic framework for new Settings UI 2016-01-23 12:28:50 -05:00
Ryan Houdek
e3da564418 Merge pull request #3440 from Sonicadvance1/Android_WiiU_Adapter
[Android] Disable screen lock when a title is running.
2016-01-06 15:42:25 -05:00
Phatcat
b2ad0d0793 Android: 4k Internal Resolution support
Adds two more internal resolution options (including 4k) to the Android
configurations
2016-01-04 13:36:06 +01:00
Phatcat
f62054e467 Android: More analog input configurations
Lets the user set the following in intervals of 10 between 10 and 100;
- Stick/Radius (default 100,000000)
- Triggers/Threshold (default 90,000000)
- Tilt/Modifier/Range (default 50,000000) + mapped Tilt/Modifier button
to the configurations for wiimotes & nunchuks
2016-01-04 13:35:04 +01:00
Phatcat
158f0e8102 Android: Added categories to input controls
- Seperates input configurations into categories
- Reworked input configurations to reuse more strings
2016-01-04 13:19:44 +01:00
Phatcat
cfe8400cdd Android: Revision of PR 3253 (Wiimote controls)
- Fix small error in NativeLibrary (line 141)
- Fix faulty indentment in arrays.xml
- Rework numbering system to be more accessible.
2016-01-04 13:19:42 +01:00
sigmabeta
b882a79322 Add support for the CPU Clock Override feature to Android UI 2016-01-03 16:46:29 -05:00
Ryan Houdek
6e60dc60e0 [Android] Disable screen lock when a title is running.
Encountered this when testing out the Wii U Gamecube Adapter.
2016-01-03 09:42:41 -06:00
Phatcat
ca9c9b7135 Wiimote + Extensions for Android 2015-12-02 21:58:54 +01:00
JosJuice
cbd539eb3d Use official names for GameCube controller sticks
Main Stick is changed to Control Stick and C-Stick is changed to C Stick.

A new ui_name variable is added to ControlGroup so that the UI strings
in DolphinWX can be updated without breaking backwards compatibility
with config INIs and other things that use names as IDs.
2015-09-12 22:45:06 +02:00
Ryan Houdek
c319fbb98d Merge pull request #3013 from aserna3/Security101
Removed fastmem from Android UI
2015-09-11 09:14:50 -04:00
Anthony Serna
cbd7b0793f Removed fastmem from Android UI 2015-09-09 14:46:20 -07:00
degasus
74b20e627c VideoCommon: Drop "Disable destAlpha" hack
This option has no use any more, neither performance nor driver workaround.
2015-09-09 21:31:54 +02:00
Ryan Houdek
9bb63bf2eb [Android] Fix multi-gamecube controller input, config changes 2015-09-04 20:06:01 -05:00
sigmabeta
6d6cb12b15 Android: Remove "fitSystemWindows" flag from MainActivity layout 2015-08-06 08:34:21 -04:00
sigmabeta
6f27ad67e7 Android: Allow usage of Cached Interpreter core. 2015-07-28 17:16:14 -04:00
Ryan Houdek
e805e05ff5 Merge pull request #2773 from sigmabeta/android_wiimote_main
Android: Add Wiimote support, including configuration UI.
2015-07-26 16:54:45 -05:00
sigmabeta
245b58124e Android TV: Add settings row, enabling access to other screens. 2015-07-25 12:26:31 -04:00
sigmabeta
7c14996e3e Android TV: Implement game selector activity in new Android TV UI 2015-07-25 12:26:31 -04:00
sigmabeta
a8aa19f1fa Android: Implement UI for configuration of all 4 Wiimotes. 2015-07-25 11:26:18 -04:00
sigmabeta
1cb07b1c48 Android: Wiimote UI Fixup 2015-07-23 23:17:16 -04:00
sigmabeta
008ac0eeb0 Android: Add UI for Wiimote configuration. 2015-07-23 22:11:11 -04:00
sigmabeta
12fd46e12d Android TV: Add title text to in-game menu, and make the menu scrollable. 2015-07-14 17:45:00 -04:00
sigmabeta
c0315fcf78 Android TV: Implement Save and Load state menus 2015-07-14 17:45:00 -04:00
sigmabeta
d191d8851a Android TV: Visual tweaks & glitch fixes 2015-07-14 17:45:00 -04:00
sigmabeta
9dd4cee1b7 Android TV: Fix a layering issue on the ingame menu 2015-07-14 17:45:00 -04:00
sigmabeta
957691444d Android TV: Replace toolbar on EmulationActivity with a full-screen menu. 2015-07-14 17:45:00 -04:00
sigmabeta
3ad151062b Android TV: Game selection screen highlights games with accent color. 2015-07-03 13:46:54 -04:00
sigmabeta
fd82f90fce Android: Show transition animation when exiting game. 2015-06-26 15:01:23 -04:00
sigmabeta
0fcf0e1d21 Android: Show transition animation while game loads. 2015-06-26 08:32:51 -04:00
sigmabeta
0679e43efe Android: Show screenshot on EmulationActivity before game starts. 2015-06-25 21:43:00 -04:00
sigmabeta
6b24b604e5 Android: MainActivity now contains a tab switcher separating games by platform. 2015-06-23 21:54:09 -04:00
sigmabeta
8b5b83c29a Android Refactor: GameGridActivity is now MainActivity, and uses a Toolbar that reacts to the game grid scrolling. 2015-06-23 21:54:09 -04:00
sigmabeta
fa2d06e7a4 Android: Switch all activities to AppCompat-based Material themes, and use Support Library version of Floating Action Button. 2015-06-23 21:54:02 -04:00
Ryan Houdek
bb89a81053 Merge pull request #2635 from sigmabeta/android-seriously-now
Android: Remove Low and Medium DPI versions of all images.
2015-06-23 20:47:16 -05:00
sigmabeta
ac1f309b2c Android: Remove Low and Medium DPI versions of all images. 2015-06-20 18:18:06 -04:00
sigmabeta
92c954c463 Android: Add Quicksave/Load functionality, and cleanup in-game menu. 2015-06-20 12:34:03 -04:00
sigmabeta
0c993ad4a9 Android: Fix a bug making Input Overlay config screen only work in release OR debug builds, but not in both. 2015-06-16 15:42:11 -04:00
sigmabeta
82dea170cf Android: Don't delete the Input Overlay configuration screen. 2015-06-16 10:12:51 -04:00
sigmabeta
5d5fc88a70 Android: Persist previously-set controller bindings on the Settings menu. 2015-06-09 10:31:15 -04:00
sigmabeta
d56f27857b Android: Don't remove input configuration related files from old UI. 2015-06-08 20:07:43 -04:00
Eder Bastos
f197b5e7d5 Android: Remove the old UI. 2015-06-08 19:43:07 -04:00
Ryan Houdek
51b440fbcf Merge pull request #2449 from sigmabeta/android-decouple-surfaceview
\Android: Decouple SurfaceView initialization and emulation start.
2015-06-07 23:18:56 -04:00
sigmabeta
8c843d98b6 Android: Add refresh library function. 2015-06-07 21:15:28 -04:00
Eder Bastos
920a85b846 Android TV: Add TV banner + some metadata. 2015-06-03 19:42:15 -04:00
Eder Bastos
ed39876cb0 Android TV: Make file selector screen usable with d-pads 2015-06-01 16:42:54 -04:00
Eder Bastos
4faff3cf62 Android: Decouple SurfaceView initialization and emulation start. 2015-05-24 19:40:11 -04:00
Eder Bastos
286af8be50 Android: Implement new EmulationActivity. 2015-05-21 20:14:03 -04:00
Eder Bastos
4f6a5e0293 Android: Make floating action buttons use the correct accent color programmatically. 2015-05-20 19:46:48 -04:00
Eder Bastos
5b0c047e0b Android: Remove inheritance from Game model, and improve the relevance of its content 2015-05-20 19:46:19 -04:00
Eder Bastos
4c786cb70c Android: Implement reading country value from game files. 2015-05-20 19:44:31 -04:00
Eder Bastos
ba591ea1ee Android: Add Settings Activity to new UI. 2015-05-15 10:45:00 -04:00
Eder Bastos
4710c3e0eb Android: Build separate APKs for each native platform. 2015-05-13 22:45:12 -04:00
Eder Bastos
06b7b20e5f Android: Scale number of columns in game grid according to screen width. 2015-05-11 17:06:54 -04:00
Eder Bastos
3f1465196c Add touch feedback to GameGridActivity and AddDirectoryActivity. 2015-05-10 10:30:09 -04:00
Eder Bastos
24c6be9d0f Add File Browser screen to new UI. 2015-05-09 12:36:17 -04:00
Eder Bastos
700225f8c8 Add floating action button to GameGridActivity. 2015-05-08 19:57:44 -04:00
Eder Bastos
a4395ecd75 Have Picasso load images into memory at the size they will be displayed. 2015-05-08 19:56:25 -04:00
Eder Bastos
b47835fc07 Implement first few screens of Android 5.0-based UI. 2015-05-07 22:27:42 -04:00
Eder Bastos
c80225ea4d Convert the Android source code to the directory structure of a Gradle-based Android Studio project. 2015-05-02 21:49:17 -04:00