Commit graph

22856 commits

Author SHA1 Message Date
Stenzek
39559f6358 VideoConfig: Remove bSupportsInternalResolutionFrameDumps
Field is unused as of Hybrid XFB.
2017-11-21 17:19:43 +10:00
Stenzek
18c1bf19ca VideoCommon: Use constant for number of color channels in XFMemory 2017-11-20 23:18:44 +10:00
Michael M
ebc547030d BootManager: RestoreSYSCONF without resetting all other config
This was causing an issue where DolphinQt couldn't save graphics options
(DolphinWX doesn't hit this code path), because this function was being
called before the in-memory config was flushed to disk.

With this PR, the in-memory config isn't reset, and only SYSCONF-related
variables may get changed.
2017-11-19 17:17:59 -08:00
Michael M
5dc3ecdb72 Qt: show "Immediately present XFB" option 2017-11-19 15:37:24 -08:00
spycrab
474b1c2d5c Qt: Implement FIFO Player 2017-11-19 22:06:32 +01:00
spycrab
aa8bf71333 FifoRecorder: Implement IsRecordingDone() 2017-11-19 21:49:29 +01:00
spycrab
aac1b386b9 FifoPlayer: Implement IsPlaying() 2017-11-19 21:49:29 +01:00
Michael M
6b7d5bb80c DeviceQualifier: small cleanup 2017-11-19 12:46:39 -08:00
Michael M
ac855e2c93 MappingWindow: don't store devq separately from controller default device 2017-11-19 12:46:39 -08:00
Michael M
9551fe1c73 MappingWindow: m_controller is never nullptr
Since GCPadWiiUConfigDialog was made its own class, m_controller will
never be nullptr.
2017-11-19 12:46:38 -08:00
JosJuice
b3b58b586c
Merge pull request #5943 from leoetlino/features
IOS: Check for available features when adding devices
2017-11-19 21:43:54 +01:00
JosJuice
d0b9923b0a Move XFB settings in DTM header back to where they were
7f0834c9 moved the locations of the Real XFB (now XFB to RAM) and
Disabled XFB (now Immediate Mode) settings. There are programs
other than Dolphin that parse DTM headers, so this is not good.

Note that Immediate XFB actually is the inversion of Disabled XFB.
I hope that's not too much of a problem...
2017-11-19 19:03:03 +01:00
Lioncash
d6f10fdc15 D3DUtil: Remove unused defines 2017-11-19 12:14:18 -05:00
Lioncash
01a92af014 D3DUtil: Make file-scope variables internally linked where applicable
All file scope variables are able to be made internally linked.

CD3DFont is essentially used as an extension to the utility interface, so
this is able to be made internal as well, removing a global from
external view.
2017-11-19 12:12:39 -05:00
spycrab
9388852e05 Qt: Fix blackscreen 2017-11-19 17:49:51 +01:00
Michael Maltese
c62d83a34b GCPadEmu: only connected if default device connected
This lets Dolphin know if a configured GameCube Controller should actually
be treated as connected or not.

Talked to @JMC47 a bit about this last night. My use-case is that all of
my controllers are the same hardware (Xbox One controllers) so share the
same configuration (modulo device number). Treating them all as always
connected isn't a problem for most games, but in some (Smash Bros.) it
forces me to go find a keyboard/mouse and unconfigure any controllers
that I don't actually have connected. Hotplugging devices (works on macOS,
at least) + this patch remove my need to ever touch the Controller Config
dialog while in a game.

This patch makes the following changes:

- A new `BooleanSetting` in `GCPadEmu` called "Always Connected", which
  defaults to false.
- `ControllerEmu` tracks whether the default device is connected on every
  call to `UpdateReferences()`.
- `GCPadEmu.GetStatus()` now sets err bit to `PAD_ERR_NO_CONTROLLER` if
  the default device isn't connected.
- `SIDevice_GCController` handles `PAD_ERR_NO_CONTROLLER` by imitating the
  behaviour of `SIDevice_Null` (as far as I can tell, this is the only use
  of the error bit from `GCPadStatus`).

I wanted to add an OSD message akin to the ones when Wiimotes get
connected/disconnected, but I haven't yet found where to put the logic.
2017-11-19 16:07:00 +01:00
Michael Maltese
379e28b58c Add GCPadStatus.isConnected boolean 2017-11-19 16:01:08 +01:00
Michael Maltese
bb1c794657 Remove unused GCPadStatus.err 2017-11-19 16:01:07 +01:00
Leo Lam
80bcc0d58d
Merge pull request #6186 from lioncash/enum-class
VideoConfig: Make AspectMode and StereoMode enum classes
2017-11-19 15:08:16 +01:00
Leo Lam
a75546747e
Merge pull request #6164 from leoetlino/usb-hid
IOS/USB: Implement HIDv5
2017-11-19 14:13:57 +01:00
JosJuice
b8c83dd5f3
Merge pull request #5973 from ligfx/renamefifoqueue
Rename Common::FifoQueue to Common::SPSCQueue
2017-11-19 13:51:22 +01:00
Markus Wick
9178a6e636
Merge pull request #6197 from degasus/GP
Jit: Optimize gather pipe usage.
2017-11-19 11:52:20 +01:00
Markus Wick
40ed0e4251
Merge pull request #6198 from lioncash/cmake
D3D: Remove non-existent files from CMakeLists.txt
2017-11-19 10:41:32 +01:00
JosJuice
2ead31c769
Merge pull request #6203 from lioncash/missing-braces-warn
VideoCommon: Resolve -Wmissing-brace warnings
2017-11-19 08:45:13 +01:00
JosJuice
2385a03c2b
Merge pull request #6201 from lioncash/headers
VideoBackends: Remove header inclusions made unnecessary with Hybrid XFB
2017-11-19 08:44:48 +01:00
JosJuice
4c23516b16
Merge pull request #6202 from lioncash/reorder-warn
AbstractTexture: Remove a redundant constructor initializer list entry
2017-11-19 08:44:29 +01:00
Lioncash
518f6a3624 VideoCommon: Resolve -Wmissing-brace warnings
Resolves around 5 -Wmissing-brace warnings on macOS.
2017-11-19 01:49:39 -05:00
Lioncash
2bd88bdb9f AbstractTexture: Remove a redundant constructor initializer list entry
This is already initialized in the class definition. This would
previously cause a -Wreorder warning on macOS, as m_config is
defined after m_currently_mapped.
2017-11-19 01:25:55 -05:00
Lioncash
16a0a58b91 VolumeGC: Correct printf specifier in LoadBannerFile()
Gets rid of a warning when compiling on macOS.
2017-11-19 00:54:47 -05:00
Lioncash
364eaadfe5 VideoBackends: Remove header inclusions made unnecessary with Hybrid XFB
Just some inclusions that weren't removed in the initial Hybrid XFB PR.
2017-11-19 00:53:10 -05:00
Lioncash
05d0d184d7 DolphinQt2: Fix incorrect description string for the immediate XFB option 2017-11-19 00:40:46 -05:00
Lioncash
2ef8ded8ce D3D: Remove non-existent files from CMakeLists.txt
Just a leftover that was missed in the Hybrid XFB PR.
2017-11-19 00:29:23 -05:00
Lioncash
5337e58284 VideoConfig: Make StereoMode an enum class
Makes for more strongly-typed identifiers (and doesn't pollute
surrounding namespaces)
2017-11-18 23:19:53 -05:00
Lioncash
10697bcbe3 VideoConfig: Make AspectMode an enum class
Makes for more strongly-typed identifiers (and doesn't pollute
surrounding namespaces)
2017-11-18 23:17:56 -05:00
Pierre Bourdon
609a17a0cd
Merge pull request #5498 from iwubcode/hybrid_xfb
Hybrid xfb
2017-11-19 04:58:59 +01:00
degasus
6ea3f538b4 JitArm64: Inline GP check in Cleanup.
We're calling this function up to 2M times per second. Let's inline the pre-check.
2017-11-18 17:43:38 +01:00
degasus
6c9bb67ca0 JitArm64: Optimize gather pipe writes. 2017-11-18 17:43:38 +01:00
degasus
6ad63c1b35 Jit64: Inline GP fast check in Cleanup. 2017-11-18 17:43:38 +01:00
degasus
36ad887a19 Jit64: Inline GP writes.
As we're down to 4 instructions now, it is always worth to inline those writes.
2017-11-18 14:45:09 +01:00
degasus
4feddd7748 PowerPC: Include the gather pipe pointer in the ppc state. 2017-11-18 14:14:45 +01:00
iwubcode
dd54617a08 TextureCacheBase: Set uninitialized XFB memory to fuchsia color 2017-11-17 22:11:34 -06:00
iwubcode
8d1cbeb25e Hybrid XFB: Fix lint errors 2017-11-17 22:11:34 -06:00
iwubcode
61541ab243 Enhance xfb dumping to distinguish between the xfbs created from memory and the xfbs created from overlapping copies 2017-11-17 22:11:34 -06:00
iwubcode
8678e8ddd3 Texture Cache Base: Optimization to allow stitched or memory xfb textures to be looked up from cache directly if they were defined previously and their hash hasn't changed 2017-11-17 22:11:33 -06:00
iwubcode
bf7db3f888 Software Backend: Remove reinterpret_cast which violates the strict aliasing rule 2017-11-17 22:11:33 -06:00
iwubcode
332af8aa49 TextureCacheBase: Fix issue in Rogue Squadron 2 where overlapping textures caused a hash change which would cause us to do a lookup from memory that gave us an incorrect result in XFB2Ram 2017-11-17 22:11:33 -06:00
iwubcode
ada37ec642 TextureCacheBase: Remove vertical scaling from EFB path and have copy checks only check EFBs 2017-11-17 22:11:33 -06:00
iwubcode
1a1c3560ce Software Backend: Rename 'copy_region' to 'CopyRegion' 2017-11-17 22:11:33 -06:00
iwubcode
0f7f4ccaf9 Software Backend: allow screenshots/video to be taken with valid data 2017-11-17 22:11:33 -06:00
iwubcode
7248dd47d5 Hybrid XFB: Fix lint errors 2017-11-17 22:11:32 -06:00
iwubcode
2c87a53f11 TextureCacheBase: make sure stitching rectangle bounds don't exceed the
texture size they are meant to represent
2017-11-17 22:11:32 -06:00
iwubcode
74610646ce TextureCacheBase: Add XFB specific functions 2017-11-17 22:11:32 -06:00
iwubcode
4964fc87ae Video Backends: Remove the right of the xfb region for games where the
VI stride does not match the VI width
2017-11-17 22:11:32 -06:00
iwubcode
a129a53e56 Video Common: Improve texture dumping to work with fifoci and
fifo_comparer
2017-11-17 22:11:32 -06:00
iwubcode
53684701fa HybridXFB: Fix lint errors 2017-11-17 22:11:31 -06:00
iwubcode
65418a76f5 Video Common: Use correct aspect ratio when saving screenshots / video 2017-11-17 22:11:31 -06:00
iwubcode
1090549552 Software Backend: Force EFB/XFB to copy to ram 2017-11-17 22:11:31 -06:00
iwubcode
6e686f6ea1 Software Backend: Fix xfb output and add vertical scaling support 2017-11-17 22:11:31 -06:00
iwubcode
e6d85b0915 Video Common: Avoid 'presenting' duplicate frames by detecting when swap
hasn't changed since the last frame
2017-11-17 22:11:31 -06:00
iwubcode
2295d60fdc VideoCommon: Output gamma now comes from the xfb copy 2017-11-17 22:11:30 -06:00
iwubcode
7f0834c919 Add 'immediate xfb' which reduces xfb latency at the cost of graphical errors 2017-11-17 22:11:30 -06:00
iwubcode
a71bc9ebbf Move XFB UI option to be under XFB group 2017-11-17 22:11:30 -06:00
iwubcode
e33ab4117d Video Common: Make auto IR work with HybridXFB 2017-11-17 22:11:30 -06:00
iwubcode
76b775d5be Video Common: Add XFB decoding via the GPU 2017-11-17 22:11:30 -06:00
iwubcode
4d13f69dc1 Remove TODOs 2017-11-17 22:11:29 -06:00
iwubcode
33bc286baa Remove old XFB logic 2017-11-17 22:11:29 -06:00
iwubcode
081b92b8a7 Video Common: Only update FPS when frame is renderered which yields more
accurate results
2017-11-17 22:11:29 -06:00
iwubcode
b285188de1 Video Backends: Implement vertical scaling for xfb copies. This fixes the
display of PAL games that run in 50hz mode.
2017-11-17 22:11:29 -06:00
iwubcode
5a372020ea FifoPlayer: Generate fake VideoInterface updates 2017-11-17 22:11:29 -06:00
iwubcode
2cd9565b18 Add an additional flag fo 'XFB Copy' 2017-11-17 22:11:29 -06:00
iwubcode
65cd085f9b Add new GUI option to skip XFBToRam and remove old XFB options 2017-11-17 22:11:28 -06:00
iwubcode
198d3b69b4 Add ability to dump xfb copies to texture for debugging purposes 2017-11-17 22:11:28 -06:00
iwubcode
a9f0d1783b Support frame and video dumping from VideoCommon 2017-11-17 22:11:23 -06:00
iwubcode
79387dddb2 Add support for hybrid XFB 2017-11-17 19:47:56 -06:00
Anthony
aa4088a494 [UI] Remove fullscreen resolution UI. 2017-11-17 13:05:50 -08:00
MerryMage
37419b9a57 Config/Layer: Allow all keys of a section to be iterated over 2017-11-15 18:04:40 +00:00
MerryMage
4c24629b95 Config: Flatten structures
Originally, Layer contained a std::map of Sections, which containted a std::map
containing the (key, value) pairs. Here we flattern this structure so that only
one std::map is required, reducing the number of indirections required and
vastly simplifying the code.
2017-11-15 18:04:40 +00:00
MerryMage
f3b52c07d7 CommandLineParser: Use ConfigLocation 2017-11-15 18:04:40 +00:00
MerryMage
e331a76176 ConfigInfo: Switch to doing case-insensitive comparison 2017-11-15 18:04:40 +00:00
MerryMage
ec7b84c5f2 Config: Extract ConfigInfo into own header 2017-11-15 18:04:40 +00:00
MerryMage
c8f970e2b0 Config: Remove recursive layer 2017-11-15 18:04:40 +00:00
Pierre Bourdon
169028e8f5 IOS: Warn on blocking IPC handlers.
This should help us identify them and figure out which ones need to be
fixed.
2017-11-15 15:34:10 +01:00
Tom Boshoven
1fc7cf3cb4 Off-by-one in SDHC detection
Also update name and description of SDHC constant.
2017-11-14 18:46:41 +01:00
JosJuice
72b7b96571 Remove IsTriviallyCopyable hack for VS 2017-11-13 19:51:16 +01:00
JosJuice
8ad5ea2ede Call Do for every member of SCPFifoStruct individually
We need this because VS currently doesn't consider
std::is_trivially_copyable<typename
std::remove_volatile<SCPFifoStruct>::type>::value
to be true and because no compiler should consider it
to be true if we replace the volatiles with atomics.
2017-11-13 19:51:16 +01:00
JosJuice
983b986303 Don't delete BitField copy assignment operator on VS 2017-11-13 19:51:11 +01:00
Lioncash
2a782b8f16 D3D/main: Remove unused variable in InitBackendInfo() 2017-11-12 13:24:02 -05:00
Lioncash
3dbd6a53cc D3DUtil: Remove unused file-scope variables
These used to be used when the drawShadedTexSubQuad() function existed,
but since it's been removed they now have no use.
2017-11-11 18:56:44 -05:00
JosJuice
2c10ba9be1 Simplify StringUtil::UTF16ToUTF8 2017-11-11 20:30:06 +01:00
JosJuice
65c1df094f Remove unneeded check in StringUtil::UTF16ToUTF8
No code is relying on this unexplained null byte check, since
the only code that calls UTF16ToUTF8 on non-Windows systems
is UTF16BEToUTF8, which explicitly strips null bytes.
2017-11-11 20:30:06 +01:00
Leo Lam
1e24a5f309
Merge pull request #6167 from ligfx/encapsulatedefaultdevice
EmulatedController: encapsulate default device behind getters/setters
2017-11-11 17:11:56 +01:00
Rael Gugelmin Cunha
3b2b2de159 Exit on Esc, pause on F10 2017-11-11 12:51:54 -02:00
Leo Lam
338bffd1e7
Merge pull request #6168 from ligfx/movegccwiiu
Qt: make GCPadWiiU a standalone dialog
2017-11-11 12:14:55 +01:00
Leo Lam
41c2618b10
Merge pull request #6175 from ligfx/qtinputupdateclear
Qt Mapping*: make logic around setting/loading settings more consistent
2017-11-11 12:11:26 +01:00
Scott Pleb
0bede93daa evdev: Correctly calculate axis range for min values greater than 0.
Axis range was previously calculated as max + abs(min), which relies on the assumption that
min will not exceed 0. For (min, max) values like (0, 255) or (-128, 127), which I assume to
be the most common cases, the range is correctly calculated as 255. However, given (20,
235), the range is erroneously calculated as 255, leading to axis values being normalized
incorrectly.

SDL already handles this case correctly. After changing the range calculation to max - min,
the axis values received from the evdev backend are practically identical to the values
received from the SDL backend.
2017-11-11 02:07:04 -05:00
Lioncash
8e654528fc VideoConfig: Add const specifier to IsVSync() member function
This member function doesn't alter VideoConfig's state.
2017-11-10 22:23:15 -05:00
Michael M
8e6677be90 ControllerInterface: don't call InvokeDevicesChangedCallbacks more than once when refreshing 2017-11-10 13:37:42 -08:00
Michael M
fd7cbd633e ControllerInterface: add mutex around callbacks vector 2017-11-10 13:37:42 -08:00
Michael M
1ed7532af8 ControllerInterface: HotplugCallbacks -> DevicesChangedCallbacks 2017-11-10 13:37:42 -08:00
Michael M
7355b5f70d ControllerInterface: invoke callbacks in AddDevice/RemoveDevice
Some backends already cause this to happen, so make it consistent across
systems.
2017-11-10 13:37:41 -08:00
Mike
74ae2522fe Android: Handle a database downgrade.
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-09 18:54:04 -08:00
Anthony
4dc425b9c9
Merge pull request #6158 from Tomcc/master
Improved arbitrary mipmap detection (Mario Sunshine water fix)
2017-11-09 18:06:58 -08:00
Anthony
356896d8bc
Merge pull request #6179 from JosJuice/extract-forbidden-characters
Avoid forbidden characters when extracting disc partitions
2017-11-08 15:32:35 -08:00
Anthony
965b5b6b0a
Merge pull request #6156 from hackbar/input-fix-trigger
Android: Handle duplicate axis, and ignore known bad axis.
2017-11-08 15:31:30 -08:00
JosJuice
b28e5fa347 Avoid forbidden characters when extracting disc partitions
We shouldn't try to create folder names that contain characters
such as : or / since they are forbidden or have special meanings.
(No officially released disc uses such characters, though.)
2017-11-08 12:04:59 +01:00
Markus Wick
7e7b5af4c7
Merge pull request #6173 from JosJuice/dtk-savestate
Fix DTK audio not working after loading a savestate
2017-11-08 12:03:05 +01:00
Mike
1f81e13d81 Android: Ignore joystick axis movements in the flat area.
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-07 17:39:56 -08:00
Mike
6787fcb712 Android: Handle duplicate axis, and fix known bad axis.
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-07 17:39:56 -08:00
LAGonauta
9e63c65c36 Also hide latency control on Qt GUI 2017-11-07 14:59:23 -02:00
LAGonauta
e7f0279ffc The latency setting now appears only if there is at least one backend
that supports it.
2017-11-07 14:56:43 -02:00
Greg Wicks
c2dcb97d06 Android: Fix NDK r16b2 build 2017-11-07 11:02:27 -05:00
Anthony
835eff15a1
Merge pull request #6162 from JosJuice/nand-check-save-game-name
When NAND is damaged, show title names from save files
2017-11-06 23:11:34 -08:00
Anthony
d378811271
Merge pull request #6165 from JosJuice/auto-ir-handling
Fix incorrect handling of auto IR
2017-11-06 23:10:53 -08:00
Anthony
66ad40074d
Merge pull request #6172 from JosJuice/remove-force-ntsc-j
Remove "Force Console as NTSC-J"
2017-11-06 23:01:27 -08:00
Anthony
98ffaf9661
Merge pull request #6151 from MayImilae/adjust-cpu-override-text
Adjust CPU Override Text
2017-11-06 22:55:36 -08:00
MaJoR
4112936bae Adjust CPU Override Text
There has been a lot of confusion about what the CPU clock override
section does among users, and looking at it… I’m not surprised! It
doesn’t directly state which CPU clock rate is being overridden!

This small change adjusts the language to clarify that the emulated CPU
is being adjusted.
2017-11-06 22:39:12 -08:00
Tommaso Checchi
aa23684d66 Improved detection: it doesn't desaturate the input anymore (woops) also it makes its own whole chain! This way it "notices" much better gradual divergences. Fixes Mario Sunshine, moss on the window in Zelda TP 2017-11-06 21:49:48 -08:00
JosJuice
b00ef39c1c Fix DTK audio not working after loading a savestate
The main problem was that the volume of the mixer wasn't savestated.
The volume is typically 0 at the beginning of a game, so loading a
savestate at the beginning of a game would lead to silent DTK audio.

I also added savestating to StreamADPCM.cpp.
2017-11-06 09:15:14 +01:00
JosJuice
88d851ca45 Remove "Force Console as NTSC-J"
Nowadays that Dolphin detects regions of discs properly and doesn't
force programs with unknown regions (such as homebrew) into running
under a certain region, the "Force Console as NTSC-J" option is
practically useless for making anything run correctly. Enabling it
is however an easy way to totally break many non-Japanese games.
2017-11-06 08:23:30 +01:00
JosJuice
5e70af1ce5
Merge pull request #6109 from t27duck/missing_wiiware_makers_2
Update maker information to match the wiki
2017-11-06 08:05:19 +01:00
Michael M
14f22ad829 Qt Mapping*: make logic around setting/loading settings more consistent
Changes:
- signal for widget value changed: sets controller setting, saves
  settings
- Update(): only updates widget from existing controller setting
- Clear(): sets controller setting, saves settings, and calls Update()
2017-11-05 11:32:23 -08:00
Michael M
cb47857e8a Rename GCPadWiiU -> GCPadWiiUConfigDialog
This name better reflects its new standalone functionality.
2017-11-05 08:04:16 -08:00
Michael M
a8b5eab4c4 Qt GCPadWiiU: standalone dialog, not subclass of MappingWidget
It uses none of the functionality of MappingWidget or the parent MappingWindow, and complicates the definition of the MappingWidget interface.
2017-11-05 08:04:16 -08:00
Michael M
27e1577da9 Qt MappingWindow: move controller type into constructor 2017-11-05 08:04:16 -08:00
Pierre Bourdon
bb38b39952
Merge pull request #6170 from JosJuice/qt-language-encoding
DolphinQt2: Fix broken language encodings on Windows
2017-11-05 16:51:01 +01:00
degasus
3a36c964f5 WiimoteEmu: Don't set pack pragma for STL objects. 2017-11-05 13:13:25 +01:00
JosJuice
c39778395c DolphinQt2: Fix broken language encodings on Windows 2017-11-05 11:07:41 +01:00
degasus
47f7e5b454 WiiUtils: Be more explicit about packing. 2017-11-05 10:52:37 +01:00
Michael M
1b1dd1d749 EmulatedController: encapsulate default device behind getters/setters 2017-11-04 17:08:55 -07:00
Pierre Bourdon
bb0794715c
Merge pull request #6111 from stenzek/enable-vk-nv-glsl
Vulkan: Use VK_NV_glsl extension where available, and skip glslang
2017-11-04 17:14:28 +01:00
JosJuice
1dc2a85ccc Avoid UB when reading Wii volume names 2017-11-03 23:17:40 +01:00
JosJuice
6902bbb696 When NAND is damaged, show title names from save files
The earlier code always tried to use TitleDatabase for getting
title names, but that didn't work for disc-based games, because
there was no way to get the maker ID.
2017-11-03 23:17:36 +01:00
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
Léo Lam
18a947a1bc USB: Work around a gcc bug that affects lambdas
https://stackoverflow.com/questions/32097759
2017-11-03 19:01:49 +01:00
Léo Lam
5d82635449 USB_HIDv5: Implement CancelEndpoint 2017-11-03 19:01:48 +01:00
Léo Lam
22310dfc3e USBv5: Read transfer parameters from the correct vector
This is why static analysis is essential.
2017-11-03 19:01:48 +01:00
Léo Lam
ac3b866083 USB_HIDv5: Submit interrupt transfers to the correct endpoint
Unlike VEN, the endpoint is determined by the value at 8-12.
If it's non-zero, HID submits the request to the interrupt OUT
endpoint. Otherwise, the request is submitted to the IN endpoint.

This commit changes HIDv5 to keep track of endpoints (like IOS does)
and use them when submitting interrupt transfers.
2017-11-03 19:01:48 +01:00
Léo Lam
ff52333b14 USB: Implement HIDv5
This implements /dev/usb/hid v5, found in IOS57, IOS58 and IOS59.

This is an initial implementation that ignores some differences
with VEN because I lack understanding of what IOS is actually doing
sometimes. These are documented on the WiiBrew article:
https://wiibrew.org/wiki//dev/usb/hid_(v5)

One major difference that this implementation handles is about IDs.
It turns out Nintendo has decided to include the interface number in
the top byte of HIDv5 device IDs, unlike VEN -- even though everything
else about ioctl 1 is otherwise the same!
2017-11-03 19:01:48 +01:00
Léo Lam
180ad8076c USB: Move common USBv5 IOS code to prepare for HIDv5
USBv5 IOS resource managers share most of their code. Some ioctls
are even completely the same! So let's separate the common code
from the VEN specific stuff to make HIDv5 easier to implement.
2017-11-03 19:01:48 +01:00
Léo Lam
6bb03d900c USB: Separate the descriptor copy logic
The descriptor copy code is not actually the same in HIDv4 and VEN,
so it did not make a lot of sense to put it in USB/Common.cpp.
Separate and move it to HIDv4 and VEN.

This cleanup is important because there are even more differences
between HIDv4 and HIDv5.
2017-11-03 19:01:48 +01:00
Léo Lam
c6038155cc USB_VEN: Move internal constant to .cpp 2017-11-03 19:01:47 +01:00
Léo Lam
ef8b3cb960 USB_VEN: Construct device IDs properly
Fix the device ID struct to reflect the actual structure used by IOS.

It turns out that offset 2 is the internal device index. The reason
that field seemed to be "0x1e - interface_number" is that IOS only
keeps track of 32 devices and always looks for free entries from
the end of the internal array. With each USB interface being exposed
as a separate USBv5 device, "0x1e - interface_number" was mostly
correct... but wrong!

We also made the assumption that the interface number can be
identified from just a USBV5 device ID, which is definitely not true.
VEN (and HID) keep track of the interface number in the internal struct
instead of "reconstructing" it from the device ID (which is normally
not possible if we were generating IDs correctly)

This commit fixes all of these inaccuracies.
2017-11-03 19:01:47 +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