Commit graph

806 commits

Author SHA1 Message Date
Jonathan Hamilton
5a361fd6b3 Make the Android settings parser a bit more robust
It would fail on lines line "Value =" - IE a value set to emptystring.

This would cause the app to crash when trying to open the corresponding
settings window.
2017-08-23 15:50:21 -07:00
JosJuice
f8703f90e3 MainAndroid: Remove s_filename
This fits better as a function parameter than as global state.
2017-08-23 22:36:21 +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
Michael M
737651f298 MsgHandler: small cleanup 2017-08-03 13:29:59 -07:00
Stenzek
134b0ca940 Android: Fix ubershader hybrid setting 2017-08-01 00:38:26 +10:00
Stenzek
901bf9c257 VideoConfig: Add config options for ubershaders 2017-07-30 17:43:59 +10:00
Stenzek
1fccbd5be3 DolphinWX: Add a progress dialog host command
Allows feedback from backends to be communicated to the user when
long-running operation are performed (e.g. shader compilation).
2017-07-30 12:38:48 +10:00
Léo Lam
ee868e2362 Move the Wiimote connect code out of Host
I don't know who thought it would be a good idea to put the Wiimote
connect code as part of the Host interface, and have that called
from both the UI code and the core. And then hack around it by having
"force connect" events whenever Host_ConnectWiimote is called
from the core...
2017-07-23 15:47:32 +08:00
Léo Lam
91f8283a1d Remove Wii Remote connection status from status bar
Showing the Wii remote connection status leads to inconsistent UX,
because we don't do anything like that for GameCube controllers
or with Bluetooth passthrough.

It's also questionable how useful it is given that:

* it doesn't print the number of connected remotes, just that one
  remote is connected, connecting or not connected, so the only info
  it provides is actually wrong when using multiple remotes;

* this user-facing feature is actually broken in master and no one has
  complained AFAIK, which means people don't really rely on it;

* the status bar isn't visible most of the time unless the user is
  using render to main or deliberately keeping the main window's
  status bar visible by moving the render window and they're not too
  far away from their screen;

* emulated Wii remotes now reconnect on input, which means that there
  is less of a need to actually know at all times whether a remote
  is connected, since pressing any button will reconnect it and provide
  immediate, visible feedback via OSD messages and the Wii remote
  pointer appearing.
2017-07-15 13:01:56 +08:00
Michael Maltese
0019c34c73 DolphinWX: fix input bitmaps not working when background input is off 2017-07-12 00:12:07 -07:00
Léo Lam
22992ae41e Boot: Clean up the boot code
* Move out boot parameters to a separate struct, which is not part
  of SConfig/ConfigManager because there is no reason for it to
  be there.

* Move out file name parsing and constructing the appropriate params
  from paths to a separate function that does that, and only that.

* For every different boot type we support, add a proper struct with
  only the required parameters, with descriptive names and use
  std::variant to only store what we need.

* Clean up the bHLE_BS2 stuff which made no sense sometimes. Now
  instead of using bHLE_BS2 for two different things, both for storing
  the user config setting and as a runtime boot parameter,
  we simply replace the Disc boot params with BootParameters::IPL.

* Const correctness so it's clear what can or cannot update the config.

* Drop unused parameters and unneeded checks.

* Make a few checks a lot more concise. (Looking at you, extension
  checks for disc images.)

* Remove a mildly terrible workaround where we needed to pass an empty
  string in order to boot the GC IPL without any game inserted.
  (Not required anymore thanks to std::variant and std::optional.)

The motivation for this are multiple: cleaning up and being able to add
support for booting an installed NAND title. Without this change, it'd
be pretty much impossible to implement that.

Also, using std::visit with std::variant makes the compiler do
additional type checks: now we're guaranteed that the boot code will
handle all boot types and no invalid boot type will be possible.
2017-06-06 16:27:52 +02:00
JosJuice
b2af07a7b7 DiscIO: Remove C/I/S prefixes from class names
These prefixes were inconsistent with the rest of Dolphin.

I'm also renaming VolumeWiiCrypted to VolumeWii because of 1113b13.
2017-06-06 12:31:59 +02: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
Léo Lam
d9fd056803 Fix minor formatting issues
These were not caught by the lint script while it was broken.
2017-06-05 02:32:19 +02:00
Leo Lam
f4190ab1c4 Merge pull request #5465 from sepalani/gc-bios
Tools: Load GameCube BIOS added
2017-05-26 10:23:03 +02:00
Sepalani
95ea721f06 Tools: Load GameCube BIOS added 2017-05-22 22:44:21 +01:00
Léo Lam
cf0c4455cd Fix indirect includes 2017-05-22 10:39:36 +02:00
Pierre Bourdon
d486904e9b build.gradle: do not change the output filename, our CI relies on it 2017-05-20 05:54:55 +02:00
JosJuice
ac5c82b36b DiscIO: Remove VolumeCreator
This file is pretty small now that it doesn't handle Wii
partitions anymore, so let's move its contents to Volume.cpp.
This is also more consistent with how blob creation works.
2017-05-19 18:33:21 +02:00
Lioncash
35aa55931f MainAndroid: Resolve -Wmissing-variable-declarations warnings 2017-05-18 19:55:05 -04:00
Sean Maas
3e33c99f4c Android: Initialize video backend setting on first run 2017-05-18 08:44:45 -04:00
Sean Maas
d4728807e0 Android: Add pressed dpad images for other DPIs 2017-05-15 08:32:22 -04:00
Sean Maas
3bd8890486 Android: Prevent stuck on-screen buttons 2017-05-15 08:32:07 -04:00
Sean Maas
6190b1c4e2 Android: Animate onscreen joystick
Invalidate more often, display nub as pressed when in use, and implement
basic nub bounds.
2017-05-14 15:29:47 -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
3dde12af13 Update support version 2017-05-04 17:21:31 +10:00
Tim Mutton
61aa507d23 Make apk name more descriptive 2017-05-04 17:13:31 +10:00
Tim Mutton
1fe1e11e0e Use try/catch with logging for version number 2017-05-04 17:13:31 +10:00
Tim Mutton
c8d66fa246 Nix and windows variant of getting tag 2017-05-04 17:13:31 +10:00
Tim Mutton
8908d10028 Use different git command for version name 2017-05-04 17:13:31 +10:00
Tim Mutton
3d95bf0837 Revert change to version code until I can work out why its 13 2017-05-04 17:13:31 +10: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
Mahdi Hijazi
ff475a2c02 [Android] Fix edit controls layout
Not checking the none existing key in the buttonsActionsMap
leads to break the sub menu of the configure controls menu
on Android phones.
2017-04-30 01:46:32 +02:00
Mahdi Hijazi
1e73f3c76e [Android] Fix game banners
Use Bitmap.setPixels() instead of Bitmap.copyPixelsFromBuffer() the former
use non pre-multiplied values of the colors which is what we expect to
come from the native code.
2017-04-27 20:41:55 +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
Markus Wick
9b1e2c2b1e Merge pull request #5118 from mahdihijazi/master
[Android] Load the game banner from the ROM and use it if no screenshot is available
2017-04-03 16:20:34 +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
ba935d40ba [Android] Load the game banner from the iso and use if no screenshot is available
It doesn't look that good since the banners are 96x32 but it still better
than nothing.
2017-03-24 21:26:48 +01:00
Mahdi Hijazi
ecf2eaac99 Remove obselete game menu settings button 2017-03-18 22:08:49 +01:00
Mahdi Hijazi
4c0e5dedb4 Fix loading the saved screen shots for Android version
Apparently the path was changed from using "/thump.png" to using
"/gameId-#.png". We will always use the first screenshot for the game
broswer wich will be "/gameId-1.png"
2017-03-18 22:08:41 +01:00
Mahdi Hijazi
d19f9038da Fix menu actions on Android TV
Saving screenshot was not working due to 2 problems. The first one is that
the view id of the save screenshot in the Android TV fragment doesnt match
the one declared inside the menu_emulation. Second Problem will be fixed
in another commit.

This commit chnage the code to not depend on reusing the ids of the menu
everywhere in the emulator inorder for the onMenuItemClicked to work.
Instead you need to call EmulationActivity.handleMenuAction passing
the action to handle regardless of the ids you are using in the view.
2017-03-18 22:08:32 +01:00
Markus Wick
489d90b6f3 Merge pull request #4999 from stenzek/renderer-statics
VideoCommon: Eliminate static state in Renderer
2017-03-08 11:02:20 +01:00
degasus
a3f79f88cd Android: Update android studio + gradle.
Android studio 2.3 finally displays the result of the native compilation, so C++ warnings are now shown in the build log.
2017-03-04 15:53:40 +01:00
Stenzek
459a5ab554 Android: Move screenshot waiting logic to Renderer 2017-03-04 16:53:16 +10:00
Stenzek
afc25fdca0 VideoCommon: Rename Renderer s_ prefixes to m_ 2017-03-04 16:42:21 +10:00
Markus Wick
56afabb9a8 Merge pull request #4919 from ntruhan/master
Android: Sort configuration ini files
2017-03-03 00:39:12 +01:00
Lioncash
beec40f178 IniFile: Handle s64/u64 values 2017-02-25 00:03:20 -05:00
ntruhan
3d8ab184ac Android: Sort configuration ini files 2017-02-16 13:08:00 -05:00
Lioncash
e07383a783 Core: Convert State enum into an enum class 2017-02-05 08:32:23 -05:00
Florent Castelli
fa04c1479e cmake: Remove PCH support
Compilers are very picky and don't use PCH when they have been compiled
with different flags. I even got some ICE in MSVC, so removing them for now.

Modules are the solution.
2017-01-24 03:22:03 +01:00
Michael Maltese
21ae6afa73 Android: remove unused android.toolchain.cmake
Gradle automatically sets up the CMake build and this file isn't referenced
anywhere.
2017-01-22 16:54:08 -08:00
Sarkie
8c5c7f8d2a Updated gradle to latest version 2017-01-17 10:19:39 +00:00
Sean Maas
cc29691875 Android: Change Exit Without Saving to Save and Exit 2017-01-10 17:12:42 -05:00
Tillmann Karras
7284c7a954 Android: fix software renderer 2nd edition 2017-01-09 11:58:19 +00:00
Tillmann Karras
7e21732b53 Android: fix software renderer settings string 2017-01-08 17:28:14 +00:00
JosJuice
9bd514ed1c Add TGC disc image compatibility 2016-12-18 18:57:36 +01:00
Sean Maas
8647639746 Android: Fix Wii bindings resetting everything 2016-11-29 22:27:40 -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
Sean Maas
128c1f04ad Android: Specify ini file for every setting
Load all the inis at once, choose which one to write to, and save them all
at the same time. This allows us to modify settings from different files
on the same settings page.
2016-11-14 18:34:06 -05:00
Markus Wick
6a2e1e9986 Merge pull request #4429 from SeannyM/android-invert-settings
Android: Fix inverted EFB settings
2016-11-14 10:07:10 +01:00
Jules Blok
aab6b70868 MainAndroid: Remove obsolete Host_RequestFullscreen() function 2016-11-11 20:48:19 +01:00
Jules Blok
8203ea929b BlockingLoop: Yield to UI message pump while waiting. 2016-11-11 13:37:02 +01:00
Sean Maas
beff65854a Android: Fix inverted EFB settings 2016-11-06 12:50:56 -05:00
Pringo
93bdab64fa Change "Wiimote" to "Wii Remote" in Logs 2016-11-03 17:58:28 -07:00
Markus Wick
1c9ed79c6a Merge pull request #4409 from sigmabeta/android-tv-screenshot-errors
[Android TV] Fix a screenshot glitch on game selector
2016-10-31 23:34:41 +01:00
Markus Wick
4f5d0cd450 Merge pull request #4391 from Pringo/wii-remote
Change "Wiimote" to "Wii Remote" in Interface
2016-10-31 12:49:16 +01:00
Markus Wick
d5ca153c26 Merge pull request #4401 from JosJuice/rename-getuniqueid
DiscIO/SConfig: Rename GetUniqueID to GetGameID
2016-10-31 12:39:27 +01:00
sigmabeta
64cf56dda3 Clear screenshot in game grid before attempting to render on Android TV devices 2016-10-30 18:53:57 -04:00
JosJuice
1081497cad DiscIO/SConfig: Rename GetUniqueID to GetGameID
We call this "game ID" everywhere else, and it's not
actually completely unique.
2016-10-29 15:24:02 +02:00
Markus Wick
838b234317 Merge pull request #4389 from SeannyM/android-dir-restrict
Android: Allow accessing all folders
2016-10-26 08:49:27 +02: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
f257c3385b Android: Fix screenshots on game list 2016-10-25 22:25:34 -04:00
Sean Maas
351825aa10 Android: Allow accessing all folders 2016-10-25 21:55:31 -04: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
shuffle2
720cb34573 Merge pull request #4347 from SeannyM/android-wii-control
Android: On-screen classic controller + Wii controller select
2016-10-15 22:51:27 -07:00
Sean Maas
662cedfb78 Android: Fix some settings 2016-10-15 23:14:48 -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
Stenzek
6a99cbd9fc VideoCommon: Call Renderer::SurfaceChanged on render parent resize
This is needed because for some reason the WSI for NV Vulkan drivers
doesn't return VK_ERROR_OUT_OF_DATE_KHR, so there is no other way to know
that a resize has occured apart from polling, which is a poor solution for
X11 (since it is blocking).
2016-10-01 01:09:12 +10:00
Sean Maas
a317953ad4 Android: More accurate button scaling
Also scale based on button ID for consistency.
2016-09-29 21:46:46 -04: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