Commit Graph

743 Commits

Author SHA1 Message Date
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