Commit Graph

22660 Commits

Author SHA1 Message Date
JosJuice 5a6d90900e Add WiiSaveBanner class
This class is similar to the BannerLoaderWii class that was
removed in ee694e32.
2017-11-03 23:00:43 +01:00
JosJuice a310cbec8e Fix incorrect handling of auto IR
Some lines of code in Dolphin just plainly grabbed the value of
g_ActiveConfig.iEFBScale, which resulted in Auto being treated as
0x rather than the actual automatically selected scale.
2017-11-03 16:04:46 +01:00
Leo Lam c8710d0861
Merge pull request #6142 from gwicks/android-settings
Android: Add Slot A and B Device settings to the settings UI
2017-11-03 14:25:40 +01:00
Leo Lam 53f0974372
Merge pull request #6159 from JosJuice/consistent-gui-strings
Make GUI strings more consistent
2017-11-03 14:18:54 +01:00
Leo Lam 9e4590b2b2
Merge pull request #6160 from JosJuice/gecko-na
Don't show "N/A" as description when there is no Gecko code
2017-11-03 14:16:59 +01:00
Leo Lam a58df9fe3d
Merge pull request #6163 from JosJuice/simple-ini-ir
Revert "Convert to/from old EFB scale numbering"
2017-11-03 13:46:40 +01:00
Anthony 423cde2b9c
Merge pull request #6161 from leoetlino/nand-check-improvements
Improvements and important fix for NAND checks
2017-11-02 16:50:02 -07:00
JosJuice 2d3dd5ede7 Revert "Convert to/from old EFB scale numbering"
This reverts commit 1fc910b3ea,
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-02 21:39:05 +01:00
Anthony ad8d885c1d
Merge pull request #6140 from hackbar/cleanup2
Android: minor UI changes
2017-11-02 11:53:54 -07:00
Léo Lam f2eee368e0 WiiUtils: Ignore missing contents for DLC titles
It is not possible to tell whether DLC contents are supposed to be
present on the NAND or not, because they're treated as "optional".
So this commit changes the NAND check to not consider missing
contents for DLC titles as an issue.
2017-11-02 17:59:53 +01:00
Léo Lam 71d4c47eb5 UI: Tweak the NAND check popup message
Inform the user that re-launching titles can also fix the issues.
2017-11-02 16:02:55 +01:00
JosJuice 7253c4bb52 Don't show "N/A" as description when there is no Gecko code
"N/A" can be awkward to handle in translations.

I don't think there's much point in showing "N/A" rather than
leaving the description box blank, so let's just leave it blank.
2017-11-02 14:37:45 +01:00
JosJuice d454e041b0 Make GUI strings more consistent
Most of the changes I've made here were because of small
differences between DolphinWX and DolphinQt2.
2017-11-02 14:32:16 +01:00
Léo Lam 1cd4be1d0f WiiUtils: Unify the check and repair functions
Makes it clearer what actions will be taken for every issue
that is found.
2017-11-02 11:34:13 +01:00
Mike 18cb68eb3c Android: Destroy the surface in EmulationFragment onStop.
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-01 23:39:56 -07:00
Mike 987d24fe87 Android: Use the newInstance pattern for EmulationFragment. 2017-11-01 22:39:48 -07:00
Mike 5cb1a08b13 Android: Only specify the transition name for the target Activity.
The source Views don't need the transition name. We could get the name
from the sharedView via getTransitionName, but since the TV
ImageCardView isn't inflated in XML it would be to be manually set.

I'm not sure if that would be any cleaner than this.
2017-11-01 18:54:54 -07:00
Mike 0fb3cb2f56 Android: Use the system "immersive" mode for fullscreen, and simplify how it's
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-11-01 18:54:54 -07:00
Leo Lam e29cd19f73
Merge pull request #6118 from Tomcc/master
Resolution independent mipmaps (high IR Super Mario Galaxy Fix)
2017-10-31 21:37:20 +01:00
Greg Wicks 0625cfc34b Android: Add Slot A and B device settings to UI 2017-10-30 15:07:29 -04:00
iwubcode b201777b83 D3D Backend: Change encoding parameter types from DWORD to our platform agnostic types 2017-10-30 10:27:02 -05:00
Leo Lam 91dac03c45
Merge pull request #6148 from leoetlino/null-bug
NANDImporter: Construct strings correctly
2017-10-29 10:30:03 +01:00
Leo Lam d6ac8ce928
Merge pull request #6147 from sepalani/send-log
Socket: Move IOCTLV_SO_SEND(TO) to INFO_LOG
2017-10-29 10:29:25 +01:00
Léo Lam 7aa083388b NANDImporter: Construct strings correctly
Use std::string(cstring, strnlen(cstring, max_length)) instead of
trying to remove extra null characters manually, which is a bit
ugly and error prone.

And indeed, the original code contained a bug which would cause
extra NULLs to not be removed at all if the string did not
end with a NULL -- causing issues down the road when constructing
paths for sub-entries.
2017-10-28 22:40:05 +02:00
Léo Lam 96d7c39891 NANDImporter: Add support for dumps that don't include keys
This adds support for NAND images that only include the NAND
(i.e. without the OTP/SEEPROM dump appended at the end of the file).
2017-10-28 21:27:18 +02:00
Sepalani d49e4044c6 Socket: Move IOCTLV_SO_SEND(TO) to INFO_LOG 2017-10-28 20:13:42 +02:00
Anthony 5d449c00e6
Merge pull request #6145 from gwicks/android-buildupdate
Android: Update gradle version to 4.1 and plugin to 3.0
2017-10-27 10:59:55 -07:00
Greg Wicks cf57e90986 Android: Update dependencies to use new format 2017-10-27 13:06:48 -04:00
Tommaso Checchi 5fb6ceac45 Fixed fog, lava, water in Mario Galaxy (and possibly other games) in higher IRs by detecting & fixing the mipmaps that aren't just used for downscaling, but are handmade to create a gradient. 2017-10-27 00:45:20 -07:00
Greg Wicks faad9ea5ab Android: Update gradle version 2017-10-26 20:59:18 -04:00
Markus Wick 802fda26ab Merge pull request #6093 from endrift/fix-efb-overflow
VideoCommon: Fix overflow trying to access outside of EFB bounds
2017-10-26 21:01:27 +02:00
Markus Wick 3f6017343b Merge pull request #6114 from leoetlino/fix
MemArena: Use names that are based on the PID
2017-10-26 20:56:22 +02:00
Leo Lam c4914fbb8b Merge pull request #6094 from leoetlino/drop-wad-hack
Drop the direct WAD launch hack
2017-10-26 17:15:02 +02:00
Leo Lam 5393575c55 Merge pull request #6130 from ligfx/emptynullsoundstream
NullSoundStream: don't call Mixer->Mix
2017-10-24 11:44:22 +02:00
Léo Lam 4cc1bd972a CommonTitles: Add a named constant for IOS TIDs 2017-10-24 11:41:55 +02:00
Léo Lam dedb61e5bf Boot: Install WADs temporarily
Because the Wii NAND size is finite, mark titles that were installed
only for booting as temporary, and remove them whenever we need to
install another title (to make room). This is exactly what the
System Menu does for temporary SD card title data.
2017-10-24 11:41:55 +02:00
Léo Lam 4b4a9a6486 UI: Implement a command line option to boot NAND title 2017-10-24 11:41:55 +02:00
Léo Lam 8e0869aff6 DiscIO: Remove comments that state obvious facts 2017-10-24 11:41:54 +02:00
Léo Lam 346ca009f9 Remove NANDContentManager 2017-10-24 11:41:54 +02:00
Léo Lam c03aa78c8f [Cleanup] WX: Remove usage of NANDContentManager
Also clean up the way the system menu label is updated. We don't want
to access the NAND while emulation is running, and especially not
that many times per second on an unpredictable timing.
2017-10-24 11:41:54 +02:00
Léo Lam ff6b3eb9ac [Cleanup] IOS: Clean up the way ARM binaries are loaded
This commit removes the last usage of NANDContentManager in IOS code.

Another cleanup change is that loading ARM (IOS) binaries is now done
by the kernel in the BootIOS syscall, instead of being handled as a
special case in the MIOS code. This is more similar to how console
works and lets us easily extend the same logic to other IOS binaries
in the future, if we decide to actually load them.
2017-10-24 11:41:54 +02:00
Léo Lam 63a52fa707 [Cleanup] IOS/ES: Remove usages of NANDContentManager 2017-10-24 11:41:54 +02:00
Léo Lam a7e21bca13 IOS/ES: Add a helper function to get a content path 2017-10-24 11:41:54 +02:00
Léo Lam 44fc6d878a IOS/ES: Fix a missing check in ReadCertStore
Without this, some operations can fail when trying to read an existing
cert store, as it may not exist when signature checks are disabled.
2017-10-24 11:41:54 +02:00
Léo Lam 689ed2a0ce [Cleanup] Move FindSignedTicket to IOS/ES
For consistency and because NANDContentManager is going to be removed.
2017-10-24 11:41:54 +02:00
Léo Lam 0476c0e60e [Cleanup] Remove static state in ES 2017-10-24 11:41:54 +02:00
Léo Lam 9000a042e4 Drop the direct WAD launch hack
This removes the hack that enables directly booting from WADs
without installing them first for the following reasons:

1. It makes the NAND content handling much more complicated than what
   it should be and makes future changes like permissions or booting
   NAND titles without a WAD more annoying to implement.

   Because of this hack, we needed an extra level of abstraction
   (NANDContent*) which has to read tons of things from the NAND, even
   most of the time it's useless. This in turn forces us to have
   caching, which is known to break titles and requires manual cache
   invalidations. Annoying and error prone.

2. It prevents the WAD boot code from being easily accurate. With this
   change, we can simply reuse the existing launch code, and ask IOS
   to launch the title from the NAND.

3. The hack did not work that well since it did not cover a lot of ES
   commands. And it works even less since the ES accuracy fixes.
   This results in Dolphin returning inconsistent results: a
   lot of the ES "DI" commands will just fail because the active title
   is not installed on the NAND. uid.sys is not changed, etc.

   And I'm not even talking about FS stuff -- where this would still
   totally fail, unless we add even more unnecessary hacks.

   This is not just theoretical -- the system menu and the Wii Shop are
   known to behave strangely because the hack damages the NAND
   structure, and we've already had several users report issues.

This commit makes it so WADs are always installed prior to launching.
A future commit will remove any code that was there only for the hack.
2017-10-24 11:41:54 +02:00
Léo Lam 60ba382799 Boot: Add support for booting NAND titles with just the ID 2017-10-24 11:41:54 +02:00
Léo Lam 62be010ac6 WiiUtils: Improve the error message on import failure
Now shows the import return code and also skips showing the message
altogether if the user cancelled the import for an unsigned WAD.
2017-10-24 11:41:54 +02:00
Léo Lam dd5c468c63 WiiUtils: Allow reusing existing IOS/WAD instance 2017-10-24 11:41:54 +02:00
Léo Lam 6a03a24822 WiiUtils: Warn before overwriting during WAD import 2017-10-24 11:41:54 +02:00
Léo Lam 0bdeb63894 WiiUtils: Skip WAD import if it's already installed
The check is fairly quick, and this allows saving a lot of time and
resources for larger WADs.
2017-10-24 11:41:54 +02:00
Anthony 5fdb19f3db Merge pull request #6108 from JosJuice/tgc-negative-file-area-shift
Fix TGC support for Zelda OoT Master Quest
2017-10-23 18:57:54 -07:00
JMC47 a8bf9c5cbe Fix GameCube Sample Rate
The GameCube's sample rate is slightly different due to a hardware bug.
The exact numbers are (54000000 / 1124) for GameCube and (54000000 / 1125)
on Wii.  I also modified 32KHz mode.  This fixes audio desyncs in several
GameCube games and severe issues in Sonic Mega Collection.
2017-10-23 13:16:40 -04:00
Tony Drake b66a72eb8f Update maker information to match the wiki
This updates the maker data to (mostly) mirror that of the Wiki:
https://wiki.dolphin-emu.org/index.php?title=GameIDs

Only maker ids from that page are now included in Dolphin. This
means no homebrew/unofficial makers.

Also, separate multiple maker names with a slash
2017-10-22 11:39:16 -04:00
Leo Lam 6e9e681438 Merge pull request #6124 from stenzek/vulkan-shutdown-vxfb
Vulkan: Fix crash on shutdown with Virtual XFB enabled
2017-10-22 16:42:24 +02:00
Leo Lam b002d9d94f Merge pull request #6132 from ligfx/updatecubeb
Externals: update cubeb to kinetiknz/cubeb@c2bd582
2017-10-22 15:39:39 +02:00
Leo Lam a596424dc2 Merge pull request #6133 from ligfx/soundstreamsetrunning
AudioCommon: rename ClearAudioBuffer(mute) to SetSoundStreamRunning(running)
2017-10-22 15:38:34 +02:00
Michael M 82129d30c9 TextureCache: don't create texture decoding resources if not enabled 2017-10-21 23:06:44 -07:00
Michael M b031d3316c SoundStream: rename Clear(mute) to SetRunning(running) 2017-10-21 16:28:04 -07:00
Michael M d6985fc3e8 AudioCommon: rename ClearAudioBuffer(mute) to SetSoundStreamRunning(running) 2017-10-21 16:28:04 -07:00
Michael M 7bcdd1a46a SoundStream: remove unused m_muted and IsMuted 2017-10-21 16:28:04 -07:00
Mat M 78d5dbe032 Merge pull request #6127 from mbc07/android-codestyle-fix
[Android] Don't install Genymotion plugin when importing Code Style preferences file
2017-10-21 18:50:31 -04:00
Michael M aa40c4a7ce Externals: update cubeb to kinetiknz/cubeb@c2bd582
A bunch of changes, looks mainly like bug fixes and code cleanup.

Notable changes:
- `cubeb_get_min_latency`'s signature was changed to take params via
  pointer, requiring Dolphin code to be tweaked in two places.
- A fix for kinetiknz/cubeb#320, as reported by @shuffle2
- Fixed build on FreeBSD (kinetiknz/cubeb#344), as contributed by @endrift
2017-10-21 14:28:39 -07:00
Michael M 6abd1c8c99 NullSoundStream: don't call Mixer->Mix 2017-10-21 13:32:33 -07:00
Mike Harris fb6274f7bc Android: Refactor onMotionEvent.
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-21 13:01:13 -07:00
Mike Harris b8d45ad4be Android: Refactor the saveInput function.
In its prior state, it had xor parameters, which is confusing.
2017-10-21 13:01:12 -07:00
Mateus B. Cassiano 9eaf95144f [Android] Don't install GenyMotion plugin when importing Code Style preferences file 2017-10-21 02:28:36 -03:00
Stenzek 271f1af8c9 Vulkan: Fix crash on shutdown with Virtual XFB enabled 2017-10-18 22:11:59 +10:00
Mike Harris 0d78545255 Rename the param to setGamePath. 2017-10-16 20:36:13 -07:00
Mike Harris d73100f0e4 Minor cleanup in EmulationActivity.
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-16 20:36:12 -07:00
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 d48c64457a Start the postponed activity transition as soon as Picasso loads the
image.

Doing it on the preDraw for the View is too complicated. This works just
as well.
2017-10-15 16:44:56 -07:00
Mike Harris 25a08fc5cc Only postpone transistions on Activity creation.
This is causing bugs (no UI is rendered) when the Activity is rotated.
2017-10-15 16:44:56 -07:00
Mike Harris 80e1cc56b3 Use weak references for the static Activity in NativeLibrary.
Add in null checks as well.
2017-10-15 16:44:56 -07:00
Mike Harris cde003c5cc Remove EmulationActivity.MenuType. This should have been removed when
SaveLoadStateFragment was refactored.
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 bb3f61296e Add a clearEmulation method.
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-15 16:44:56 -07:00
Mike Harris 9fb0d9a664 Move all Activities and Fragments to the support library versions.
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-15 16:44:56 -07:00
Mike Harris 9407d9ee0b Bump compile SDK and buildtools version to 26 (Oreo).
Bump the support lib version to 26. This allows for using property
animators (R.animator) in FragmentTransaction.setCustomAnimations.

Add the google maven repo, as from support lib 26 onwards, they're only
publishing it in there.

Bump the gradle version while we're at it, keep Android Studio quiet.
2017-10-15 16:44:56 -07:00
Léo Lam 28d648b802 MemArena: Use names that are based on the PID
Fixes a regression which broke running several Dolphin instances at the
same time on Windows. Thanks to exjam for spotting the issue
pretty much immediately. Sorry about that!

Also changes the file names to be more consistent on all platforms.
2017-10-11 17:40:05 +02:00
Dane Z. Bush 4dfe6c0875 MemArena: Name shared memory handle
Assign a name to the CreateFileMapping handle on Win32 so third party
applications can read from Dolphin's memory and integrate with the
current emulation.

Built and tested, multiple sessions are still possible without
collisions.
2017-10-11 16:35:32 +02:00
Stenzek 06bbf111d9 Vulkan: Improve readability of device/instance extension checks 2017-10-11 23:18:01 +10:00
Stenzek 79188d4f55 Vulkan: Use VK_NV_glsl extension where available, and skip glslang 2017-10-11 23:15:41 +10:00
Stenzek 90ca2e8042 Merge pull request #6066 from stenzek/vulkan-resize
Vulkan: Fixes for window resizing
2017-10-11 23:02:48 +10:00
Leo Lam d26eda3023 Merge pull request #6096 from leoetlino/wii-fsck
Add a way to check the NAND for issues and fix them
2017-10-11 13:01:39 +02:00
Leo Lam ceed4d6f93 Merge pull request #6101 from sepalani/symbol-map-data
PPCSymbolDB: Handle data symbols in SymbolMap properly
2017-10-11 13:00:40 +02:00
Leo Lam bc6846ce3b Merge pull request #5922 from sepalani/mem-base
MemoryWindow: base address search added
2017-10-11 12:17:57 +02:00
Leo Lam 1fb9e793ac Merge pull request #6104 from CyberShadow/pull-20171006-091319
CheatSearchTab: Add UI for manually adding an address
2017-10-11 11:51:49 +02:00
Vladimir Panteleev 3c51560857 CheatSearchTab: Add UI for manually adding an address
Sometimes an address is already known, e.g. from existing cheat
codes, and only inspecting the variable's value is desired.
2017-10-11 11:41:26 +02:00
Ethan Lee 322c395f33 Qt: Check showFileNameColumn, sort Hidden/ResizeMode calls by enum value 2017-10-11 11:40:07 +02:00
Leo Lam 53ccd41049 Merge pull request #6099 from leoetlino/activate
Qt: Don't crash when pressing the Return key
2017-10-11 11:32:09 +02:00
Leo Lam 8163fa1acc Merge pull request #6100 from leoetlino/vulkan-shutdown
Vulkan: Fix crash when Core initialisation fails
2017-10-11 11:31:16 +02:00
Leo Lam 1c14881cc1 Merge pull request #6105 from CyberShadow/pull-20171006-123219
ActionReplay: Fix implementation of memory-copy zero codes
2017-10-11 11:28:27 +02:00
Leo Lam 0eafb2f2a2 Merge pull request #6110 from lioncash/texture-config-hash
TextureConfig: Specialize std::hash for TextureConfig
2017-10-11 11:07:09 +02:00
Stenzek edb5f855c2 VideoConfig: Prevent race condition on g_Config when refreshing
There was a race condition between the video thread and the host thread,
if corrections need to be made by VerifyValidity(). Briefly, the config
will contain invalid values. Instead, pause emulation first, which will
flush the video thread, update the config and correct it, then resume
emulation, after which the video thread will detect the config has
changed and act accordingly.
2017-10-10 23:56:33 +10:00
Stenzek 4301b8538d Vulkan: Only use oldSwapchain in response to VK_ERROR_OUT_OF_DATE_KHR
Seems to be required on the latest NV driver, otherwise the presented
images are never shown.
2017-10-10 23:21:40 +10:00
Stenzek cdf34a79f7 Vulkan: Set a flag to resize the swap chain when presenting fails
Drivers can return VK_ERROR_OUT_OF_DATE_KHR from vkQueuePresentKHR, and
we should resize the image in this case, as well as when getting it back
from vkAcquireNextImageKHR.
2017-10-10 23:21:40 +10:00