Commit graph

21484 commits

Author SHA1 Message Date
Léo Lam
0ee9b884ca
Merge pull request #7123 from lioncash/enum
DSPCore: Convert core type enum into an enum class
2018-06-15 19:52:57 +02:00
Lioncash
6f473b96d0 PowerPC: Convert CPUCore enum into an enum class
Makes the enum values strongly-typed and prevents the identifiers from
polluting the PowerPC namespace. This also cleans up the parameters of
some functions where we were accepting an ambiguous int type and
expecting the correct values to be passed in.

Now those parameters accept a PowerPC::CPUCore type only, making it
immediately obvious which values should be passed in. It also turns out
we were storing these core types into other structures as plain ints,
which have also been corrected.

As this type is used directly with the configuration code, we need to
provide our own overloaded insertion (<<) and extraction (>>) operators
in order to make it compatible with it. These are fairly trivial to
implement, so there's no issue here.

A minor adjustment to TryParse() was required, as our generic function
was doing the following:

N tmp = 0;

which is problematic, as custom types may not be able to have that
assignment performed (e.g. strongly-typed enums), so we change this to:

N tmp;

which is sufficient, as the value is attempted to be initialized
immediately under that statement.
2018-06-15 10:27:59 -04:00
Lioncash
161dffe2f9 DSPCore: Rename JIT core type to JIT64
This changes the identifier to represent the x86-64 DSP emitter. If any
other JITs for the DSP are added in the future, they all can't use the
same generic identifier.
2018-06-15 07:59:05 -04:00
Lioncash
98af5e4c10 DSPCore: Convert core type enum into an enum class
Prevents pollution of the surrounding scope and makes the values
strongly-typed.
2018-06-15 07:55:31 -04:00
spycrab
daebbabb35 Qt/GameList: Greatly improve performance (List view) 2018-06-15 12:05:11 +02:00
Léo Lam
58606702f7
Merge pull request #7107 from lioncash/mac
Common/Network: Get rid of out parameters for MAC address utilities
2018-06-14 19:44:09 +02:00
Léo Lam
c7280707ec
Merge pull request #7113 from lioncash/mask
Gekko: Centralize bitmasking of the FPSCR within UReg_FPSCR
2018-06-14 18:28:11 +02:00
Léo Lam
59cd9a5af7
Merge pull request #7118 from lioncash/hotkey-str
HotkeyManager: Minor changes
2018-06-14 18:26:03 +02:00
Lioncash
189d277cfc Common/Random: Add convenience template for simple arithmetic values
In cases where we just want a random value for a primitive arithmetic
type, we can wrap this in a template to allow convenient direct
assignment instead of keeping declaration and initialization separate
(making it more difficult to use values uninitialized). This also allows
the use of Common::Random with functions such as std::generate, making
it more flexible in how random values can be generated.
2018-06-14 10:31:13 -04:00
spycrab
e69c6cdaab
Merge pull request #7114 from Techjar/patch-3
Qt/GameCubePane: Fix memcard browsing starting in working directory instead of User/GC/ directory
2018-06-14 16:13:21 +02:00
Lioncash
410792d922 HotkeyManager: Add missing s_ prefixes to internally-linked file-scope variables
Previously there was an intermixing of no prefixing and prefixing. This
makes the notation consistent.
2018-06-14 10:07:22 -04:00
Lioncash
d22d32372e HotkeyManager: Use std::array where applicable 2018-06-14 10:07:01 -04:00
Lioncash
aae06f1cf7 HotkeyManager: Move HotkeyGroupInfo struct into the cpp file
This is only ever used internally. Also change the std::string name over
to a const char*, so that we don't need to potentially allocate anything
on the heap at immediate runtime.
2018-06-14 09:12:19 -04:00
Techjar
027fc6efd5 Qt/GameCubePane: Fix memcard browsing starting in working directory instead of User/GC/ directory 2018-06-14 09:11:54 -04:00
Lioncash
d459470fee HotkeyManager: Convert file-scope std::string array to constexpr const char* array
Previously, a total of 114 std::string instances would need to construct
(allocating on the heap for larger strings that can't be stored with
small string optimizations). We can just use an array of const char*
strings instead, which allows us to avoid this.
2018-06-14 09:04:57 -04:00
Markus Wick
1f49a9c87c
Merge pull request #7116 from lioncash/log
JitCommon/JitBase: Rename x86-specific logging define to be platform agnostic
2018-06-14 15:00:34 +02:00
Lioncash
065aba43e2 JitBase: Remove unused rewriteStart data member from JitState 2018-06-14 08:46:34 -04:00
Lioncash
ace24c2932 JitCommon/JitBase: Rename x86-specific logging define to be platform agnostic
Given JitBase shouldn't include platform specifics, we can generalize this
preprocessor define and allow any JIT to use it to indicate that generated code should be logged.

While we're at it, also move these defines beneath the includes with the
rest of the defines.
2018-06-14 08:35:35 -04:00
spycrab
e8c1e5af63
Merge pull request #7112 from spycrab/qt_macos_layout
Qt/macOS: Make configuration layout consistent with other platforms
2018-06-14 12:29:24 +02:00
Sintendo
78bc9690e2 Eliminate branch in ConvertDoubleToSingle 2018-06-13 23:02:50 +02:00
degasus
03c88c83ac CachedInterpreter: Implement breakpoints.
There were missed on the initial implementation of the cached interpreter.
2018-06-13 08:33:57 +02:00
spycrab
09df03382d
Merge pull request #7094 from spycrab/qt_fs_fixes
Qt: Fix multiple fullscreen issues
2018-06-12 22:46:29 +02:00
Lioncash
0049ef3a2a Gekko: Centralize bitmasking of the FPSCR within UReg_FPSCR
Rather than introduce this handling in every system instruction that modifies
the FPSCR directly, we can instead just handle it within the data structure
instead, which avoids duplicating mask handling across instructions.

This also allows handling proper masking from the debugger register
windows themselves without duplicating masking behavior there either.
2018-06-12 14:15:50 -04:00
spycrab
f2c6a97916 Qt/macOS: Make configuration layout consistent with other platforms 2018-06-12 15:45:33 +02:00
Léo Lam
f3a18db9e0
Merge pull request #7106 from lioncash/name
WiimoteDevice: Amend variable naming
2018-06-11 11:12:08 +02:00
Lioncash
59846378b3 BTReal: Handle case where a link key may be invalid within LoadLinkKeys()
This can only occur if a user purposely corrupts their config file, but
still, we may as well protect users from themselves.
2018-06-10 16:11:36 -04:00
Lioncash
ce69201f33 Common/Network: Get rid of out parameters for MAC address utilities
Given we have std::array and std::optional, we can use these in
conjunction with one another to avoid the need for out parameters.
2018-06-10 15:43:26 -04:00
Mat M
b6592723a7
Merge pull request #7103 from leoetlino/master
BTReal: Fix unsafe reinterpret_casts
2018-06-10 14:27:19 -04:00
Lioncash
925348cdd1 WiimoteDevice: Amend variable naming for class member variables
Gets rid of inconsistencies related to class variables concerning casing
and the lack of prefixes on some variables, while others contain them.
2018-06-10 14:23:36 -04:00
Lioncash
eaace415d3 WiimoteDevice: Amend variable naming for non-class member variables
This file is quite out of sync when it comes to our naming conventions,
this brings it back in line with it.
2018-06-10 14:23:31 -04:00
Markus Wick
70417c8d16
Merge pull request #7096 from lioncash/jit-buffer
JitBase: Centralize location of code buffer
2018-06-10 17:59:41 +02:00
Lioncash
0d0f58005b WiimoteDevice: Make channel reference const qualified
This is only used for reading data, not modifying it, so make the type
system enforce that.
2018-06-10 09:08:33 -04:00
Lioncash
5548316d32 WiimoteDevice: Remove unnecessary cast in ExecuteL2capCmd()
pData is already a u8*, so a cast isn't necessary here.
2018-06-10 09:04:42 -04:00
Léo Lam
fca6d80740
Merge pull request #7101 from lioncash/ios
WiimoteDevice: Minor changes
2018-06-10 14:35:41 +02:00
Léo Lam
8bb08d1ca6 BTReal: Fix unsafe reinterpret_casts
Using reinterpret_cast like that is possibly UB.
Replace them with structs/memcpy calls where applicable.
2018-06-09 23:04:04 +02:00
Lioncash
c825eecbc9 ChunkFile: Remove unnecessary includes
ChunkFile doesn't use any of the file utilities, so we can drop these
headers to avoid pulling in unnecessary dependencies. This also
uncovered a few indirect inclusions.
2018-06-09 16:49:59 -04:00
Lioncash
647da59679 WiimoteDevice: Move channel state booleans into a struct
These were essentially duplicated for both channels, when they could be
implemented in terms of a struct, which allows for simplifying the reset
case.
2018-06-09 16:35:32 -04:00
Lioncash
94fd8505d6 WiimoteDevice: Make DoesChannelExist() a const member function
This only queries internal class state, it doesn't modify it.
2018-06-09 16:35:32 -04:00
Lioncash
f906785e88 WiimoteDevice: Make EventPagingChanged() a const member function
This only queries internal state, it doesn't modify it. With minor
adjustments to BTEmu, this also allows us to make its usage instance a
constant reference.
2018-06-09 16:35:32 -04:00
Lioncash
38d155f993 WiimoteDevice: Make ConnectionState enum an enum class
Avoids polluting class scope and makes it strongly typed.
2018-06-09 16:35:27 -04:00
Léo Lam
f564c28040
Merge pull request #7099 from lioncash/compiler
Common: Add Compiler.h header for compiler-specifics
2018-06-09 20:19:49 +02:00
Lioncash
b5d89294f7 WiimoteHIDAttr: Make file-scope packet data arrays immutable
Given these are only ever returned from a function as const u8*, we can
go ahead and make these fully immutable.
2018-06-09 13:46:28 -04:00
Lioncash
7b11ce3dd2 Compiler: Use [[maybe_unused]] in the Windows DOLPHIN_UNUSED macro
The required version of MSVC already supports [[maybe_unused]], so we
can utilize this here. When GCC 7 and clang 3.9 become hard
requirements, we can eliminate this macro entirely and replace it with
[[maybe_unused]].
2018-06-09 12:20:29 -04:00
Lioncash
d8f6d60189 Compiler: Rename UNUSED macro to DOLPHIN_UNUSED
UNUSED is quite a generic macro name and has potential to clash with
other libraries, so rename it to DOLPHIN_UNUSED to prevent that, as well
as make its naming consistent with the force inline macro
2018-06-09 12:20:29 -04:00
Lioncash
3f210836ad Compiler: Rename __forceinline define to DOLPHIN_FORCE_INLINE
This is much better as prefixed double underscores are reserved for the
implementation when it comes to identifiers. Another reason its better,
is that, on Windows, where __forceinline is a compiler built-in, with
the previous define, header inclusion software that detects unnecessary
includes will erroneously flag usages of Compiler.h as unnecessary
(despite being necessary on other platforms). So we define a macro
that's used by Windows and other platforms to ensure this doesn't
happen.
2018-06-09 12:20:25 -04:00
Lioncash
03414e8e84 Common: Add header for compiler-specifics
Instead of globbing things under an ambiguous Common.h header, move
compiler-specifics over to Compiler.h. This gives us a dedicated home
for anything related to compilers that we want to make functional across
all compilers that we support.

This moves us a little closer to eliminating Common.h entirely.
2018-06-09 12:10:05 -04:00
Lioncash
e18824e3f3 PPCAnalyst: get rid of code buffer size variable
Rather than have a separate independent variable that we need to keep
track of in conjunction with the JIT code buffer size itself, amend the
analyst code to use the code buffer constant in JitBase.

Now if the size ever changes, then the analyst will automatically adjust
to handle it.
2018-06-09 08:17:17 -04:00
Lioncash
a3f2941173 JitBase: Centralize location of code buffer
Given the code buffer is something truly common to all JIT
implementations, we can centralize it in the base class and avoid
duplicating it all over the place, while still allowing for differently
sized buffers.
2018-06-09 08:16:53 -04:00
Léo Lam
1d87584d69
Merge pull request #7097 from lioncash/dsp-disas
DSPDisassembler: Remove unnecessary includes
2018-06-09 07:58:39 +02:00
Lioncash
61ff11c266 DSPDisassembler: Remove unnecessary includes
Gets rid of an inclusion dependency with the DSP interpreter, as well as
a header-based dependency on the DSP opcode tables. This also uncovered
an indirect inclusion on the logger within DSPSymbols.cpp
2018-06-08 18:55:57 -04:00
Lioncash
d1e278218e Common/CMakeLists: Link in libraries privately for traversal_server
Without this, CMake script errors can occur, as explicit linkage
specifiers and non-explicit specifier commands aren't compatible with
one another.
2018-06-08 17:40:44 -04:00
spycrab
0273cae3a2 Qt: Restore fullscreen resolution when regaining focus 2018-06-08 20:47:15 +02:00
spycrab
6c19b5947b Qt: Fix exclusive fullscreen not being entered on startup 2018-06-08 19:59:41 +02:00
Léo Lam
48b7cfa75c
Merge pull request #7062 from robopilot99/master
Add auto-hide option to Wii IR pointer
2018-06-08 14:04:03 +02:00
JosJuice
ca3d68cee5
Merge pull request #7076 from JosJuice/android-gamelist-uicommon
Use UICommon's game list code on Android
2018-06-08 13:59:45 +02:00
Léo Lam
d23c3e9524
Merge pull request #7093 from lioncash/log
Interpreter_SystemRegisters: Change PanicAlert to INFO_LOG in mtspr()
2018-06-07 19:01:39 +02:00
Lioncash
5db2137538 Interpreter_SystemRegisters: Change PanicAlert to INFO_LOG in mtspr()
As peculiar as this may be, decrementer exceptions by means of setting
the decrementer's zeroth bit from 0 to 1 is valid behavior by software
(and is defined in Programming Environments for 32-bit Microprocessors
in section 2.3.14.1 -- Decrementer operation). Given it's valid behavior,
it doesn't necessarily make sense to use a panic alert and halt, as this
isn't a condition where everything should be considered in a critical
state.

Instead, change it to an info log, so we still make note of it, but
without potentially tearing down state or halting emulation.
2018-06-07 12:14:46 -04:00
Pierre Bourdon
de0fe0e210
Merge pull request #6928 from leoetlino/random
Common: Add Random utilities
2018-06-08 00:41:08 +09:00
Léo Lam
b51fbaa5b0
Merge pull request #7084 from lioncash/mask
Interpreter_SystemRegisters: Ensure FPSCR modifying instructions don't set bit 20
2018-06-07 16:51:36 +02:00
Léo Lam
34d6a49842
Merge pull request #7088 from Ebola16/TFD
Give "Dump TEV Stages" and "Dump Texture Fetches" descriptions
2018-06-07 16:50:15 +02:00
Léo Lam
ca32b4127e
Merge pull request #7089 from spycrab/qt_refresh_hotkey
Qt: Implement "Refresh Game List" hotkey
2018-06-07 16:49:09 +02:00
Léo Lam
18d5ba30d6
Merge pull request #7085 from master0fdisaster/Add-Volume-Hotkeys-OSD-Message
Add OSD message for Volume Hotkeys
2018-06-07 16:46:19 +02:00
Léo Lam
dd7c558be3
Merge pull request #7092 from JosJuice/wii-devkit
Set 0x0000002C to NDEV 2.1 when running a debug-signed Wii disc
2018-06-07 15:52:07 +02:00
JosJuice
af5d9f693a Set 0x0000002C to NDEV 2.1 when running a debug-signed Wii disc
This fixes the The Last Story prototype that GerbilSoft was testing,
because the apploader is a bit more lenient with the max size of DOL
sections when it detects that you're using a devkit console.
2018-06-07 10:14:32 +02:00
Sleepy Flower Girl
57bd13a0ce Use new config system for Discord Rich Presence option
This doesn't feel like a mirror change to me.
2018-06-07 00:59:31 -04:00
spycrab
23394164de Qt: Implement "Refresh Game List" hotkey 2018-06-06 18:30:46 +02:00
Ryan Meredith
5fcb509702 Give "Dump TEV Stages" and "Dump Texture Fetches" descriptions 2018-06-06 11:59:29 -04:00
JosJuice
1c027bc148 Use UICommon's game list code on Android
Deduplicates code, and gets rid of some problems the old code had
(such as: bad performance when calling native functions, only one
disc showing up for multi-disc games, Wii banners being low-res,
unnecessarily much effort being needed for adding more metadata).
2018-06-06 17:34:07 +02:00
master0fdisaster
7a90ea2752 Add OSD message for Volume Hotkeys
This pr adds an OnScreenDisplay message when you use the Volume hotkeys.
Just to have visual feedback.
2018-06-06 17:11:43 +02:00
Léo Lam
c93210155f
Merge pull request #7075 from Ebola16/DumpObjects
Software Renderer "Dump Objects" needs dedicated folder and tooltip
2018-06-06 15:20:14 +02:00
Ryan Meredith
7340935b38 QT: Use brackets for description arrays 2018-06-06 09:05:18 -04:00
Ryan Meredith
45b9b7d211 Give Dump Objects dedicated folder and tooltip 2018-06-06 08:42:41 -04:00
spycrab
ee479260d0 Qt: Add option to disable auto-refresh 2018-06-06 13:49:45 +02:00
Markus Wick
3860219899 VideoCommon: Flush the GPU pipeline on async requests. 2018-06-06 09:22:01 +02:00
8times9
70b7e852f8 Qt: Remove Dolphin prefix from NetPlay window titles
This makes the NetPlay window titles consistent with other window titles in Dolphin.
2018-06-05 22:27:07 -05:00
Mat M
0dfd0cfa24
Merge pull request #7083 from leoetlino/consistency
ES: Return ReturnCode in DiVerify for consistency
2018-06-05 17:24:17 -04:00
Lioncash
11a35d47ef Interpreter_SystemRegisters: Ensure FPSCR modifying instructions don't set bit 20
Bit 20 is defined as being reserved and attempts to set it are ignored
by hardware, so we should be doing the same thing.
2018-06-05 16:27:10 -04:00
Léo Lam
85baca386a ES: Return ReturnCode in DiVerify for consistency
No reason to return a s32 instead of an IOS return code (like every
other function in the ES API)
2018-06-05 22:07:59 +02:00
Anthony
36ff2a20d5
Merge pull request #6954 from degasus/coherent
OGL/Streambuffer: Use coherent mapping by default.
2018-06-05 12:06:17 -07:00
spycrab
e3e451b34e Qt/InfoWidget: Don't prefix maker id with '0x' 2018-06-05 20:25:15 +02:00
Léo Lam
f422b88ed9
Merge pull request #7078 from spycrab/qt_gc_adapter_fix
Qt/GCPadWiiUConfigDialog: Fix settings not being loaded properly
2018-06-05 19:37:56 +02:00
spycrab
08561b4b43
Merge pull request #7079 from spycrab/qt_open_remember
Qt/MainWindow: Remember last directory in "Open" prompt
2018-06-05 19:02:17 +02:00
spycrab
8a24eac0de Qt/GCPadWiiUConfigDialog: Fix settings not being loaded properly 2018-06-05 19:00:51 +02:00
spycrab
c6704b1323 Qt/MainWindow: Remember last directory in "Open" prompt 2018-06-05 18:56:21 +02:00
Léo Lam
21d0d6711f
Merge pull request #7073 from leoetlino/fix
WiiSave: Fix the way paths are handled
2018-06-05 18:32:13 +02:00
Léo Lam
bfbd890caa
Merge pull request #7080 from spycrab/qt_noprop_elfdol
Qt/GameList: Don't show certain options when a DOL/ELF is selected.
2018-06-05 15:57:11 +02:00
spycrab
07b26f8bca Qt/GameList: Don't show certain options when a DOL/ELF is selected. 2018-06-05 13:28:16 +02:00
spycrab
63460834a5 Qt/CheatCodeEditor: Don't accept rich text 2018-06-05 12:45:08 +02:00
spycrab
8675fa09b8
Merge pull request #7071 from spycrab/qt_gamelist_refresh
Qt: Add Refresh button
2018-06-05 04:29:23 +02:00
robopilot99
ab02499ce7 Add auto-hide option to Wii IR pointer 2018-06-04 17:58:21 -05:00
Léo Lam
b7a8deda96
Merge pull request #7074 from lioncash/paired
Interpreter_LoadStorePaired: Simplify type aliases in QuantizeAndStore() and LoadAndDequantize()
2018-06-05 00:08:00 +02:00
Léo Lam
226f88bcb6
Merge pull request #7069 from leoetlino/player-id
PadMappingDialog: Show player ID in player dropdown
2018-06-05 00:02:04 +02:00
Lioncash
25d38c0a23 Interpreter_LoadStorePaired: Simplify type aliases in QuantizeAndStore() and LoadAndDequantize()
These can just use the _t variant of make_unsigned, which eliminates the
need to pull the type from the ::type member type.
2018-06-04 17:57:05 -04:00
Léo Lam
d1e2cc7b92
Merge pull request #7070 from spycrab/qt_prop_width
Qt/PropertiesDialog: Fix tabs being cut off due to small window size
2018-06-04 23:49:28 +02:00
spycrab
4415417deb Qt: Add Refresh button 2018-06-04 23:44:53 +02:00
Léo Lam
14d37e0493 WiiSave: Fix the way paths are handled
All paths in SaveFile are relative to the title data directory, not
absolute. Fixes an accidental regression from 5.0-7988 (PR #7059).
2018-06-04 23:31:00 +02:00
Léo Lam
8fe7f8d80d
Merge pull request #7072 from lioncash/emitter
DSPEmitter: Make m_unresolved_jumps private
2018-06-04 22:26:24 +02:00
Léo Lam
d797bf2ee7 PadMappingDialog: Show player ID in player dropdown
Makes it easier to differentiate players that have the same name.
2018-06-04 22:24:35 +02:00
JosJuice
5e0da225ee
Merge pull request #7068 from lioncash/const
DSPAccelerator: const qualify pointer parameter for Read()
2018-06-04 22:05:26 +02:00
Lioncash
bbd2fd080e DSPEmitter: Make m_unresolved_jumps private
By making the jitted function a private static function of DSPEmitter,
we can allow access to data members within the context of the function
without making them public overall.

This finally makes all data members for the x64 DSP emitter private.
2018-06-04 15:46:08 -04:00
spycrab
b3c3b58aec Qt/PropertiesDialog: Fix tabs being cut off due to small window size 2018-06-04 21:11:55 +02:00
Léo Lam
5f29e891d3
Merge pull request #7063 from lioncash/fifr
Interpreter: Unset FPSCR.FI and FPSCR.FR for QNaN and infinity input operands
2018-06-04 20:53:58 +02:00
Léo Lam
6ce9c96d91
Merge pull request #7027 from leoetlino/cleanup
Use some C++17 features available since GCC 6
2018-06-04 20:50:50 +02:00
Lioncash
1e3e11d0f5 DSPAccelerator: const qualify pointer parameter for Read()
The data pointed to is only ever read, so make this explicit.
2018-06-04 14:50:42 -04:00
Léo Lam
2a89ad9c39
Merge pull request #7066 from spycrab/qt_fs_exit
Qt: Always return to windowed when confirming exit
2018-06-04 20:48:22 +02:00
spycrab
53ed455d76 Qt: Always return to windowed when confirming exit
If we don't do this the prompt *may* appear behind the fullscreened window
and thus cause confusion. This happens both with exclusive fullscreen and
borderless fullscreen (e.g. for OpenGL).
2018-06-04 20:32:36 +02:00
Léo Lam
9b43180731
Merge pull request #7040 from JMC47/enableadouble2single
[JIT] Enable Accurate Double to Single Conversion
2018-06-04 20:29:15 +02:00
spycrab
afc2c51e34
Merge pull request #7065 from spycrab/qt_pause_exit
Qt: Fix emulation still not being paused when confirming exit
2018-06-04 19:16:16 +02:00
spycrab
b13cf2e16e Qt: Fix emulation still not being paused when confirming exit 2018-06-04 18:13:05 +02:00
Michael M
932ca644aa Add hotplug support to SDL2 controller backend 2018-06-04 17:50:08 +02:00
Michael M
7062967b5b SDLJoystick: store name on creation
Otherwise, Dolphin will crash when the joystick is removed.
2018-06-04 17:49:21 +02:00
Michael M
0eb47e1071 CMake: make SDL a private dep of InputCommon 2018-06-04 17:49:21 +02:00
JMC47
2795376b61 Enable Accurate Double to Single Conversion 2018-06-04 11:49:12 -04:00
Léo Lam
8e0ea92ec3
Merge pull request #7058 from JosJuice/move-titledatabase-usage
Don't store custom names from TitleDatabase in GameFileCache
2018-06-04 14:59:05 +02:00
Léo Lam
8074192a85
Merge pull request #7057 from leoetlino/string
Config/StringUtil/IniFile: Get rid of some duplicated code
2018-06-04 12:44:57 +02:00
JosJuice
85e94cc510 Don't store custom names from TitleDatabase in GameFileCache
This saves us from having to update the GameFileCache when the
TitleDatabase changes (for instance when the user changes language).
2018-06-04 07:45:22 +02:00
Lioncash
9068109b3e Interpreter: Unset FPSCR.FI and FPSCR.FR for QNaN and infinity input operands
This hardware behavior makes sense, as the FI bit is used to signify an
inexact result. An inexact result is a form of value that results during
the rounding phase of denormalization. If any bits of the significand
are lost during said rounding, then the result is considered to be
inexact.

However NaN and infinity are not classed as subnormals and therefore
don't undergo the denormalization step, making loss of precision not
possible (in NaN's case, numerically rounding something that is
literally Not a Number doesn't even make sense).

FR is set to indicate whether or not the last arithmetic or rounding and
conversion instruction that rounded the intermediate result incremented
the fractional portion of the result. Given neither input types would be
affected by this, this should also be unset.

This corrects more of the exceptional case handling for these values to
match hardware.
2018-06-03 18:15:47 -04:00
Léo Lam
0ecec33567 WiiRoot: Use a namespace alias for FS to reduce noise 2018-06-03 21:37:28 +02:00
Sleepy Flower Girl
f25d833dbd Fixed issue Discord RPC library not clearing presence during shutdown 2018-06-03 15:37:27 -04:00
Sleepy Flower Girl
e1a9cf3b44 Add option to disable Discord Presence in WX UI 2018-06-03 15:29:28 -04:00
Sleepy Flower Girl
ae2337aff6 Add option to disable Discord Presence in Qt UI 2018-06-03 15:29:25 -04:00
Sleepy Flower Girl
d9351a5b45 Added INI setting for Discord Rich Presence 2018-06-03 15:29:21 -04:00
Sleepy Flower Girl
678f8da95b Moved Discord RPC library's source code to external 2018-06-03 15:29:01 -04:00
Sleepy Flower Girl
d5303ddf0b Add Discord Rich Presence support 2018-06-03 15:27:20 -04:00
Léo Lam
c1428b6da0 WiiRoot: Use new filesystem interface
This gets rid of remaining direct accesses to the Wii filesystem
in WiiRoot by using WiiSave to copy saves and the FS interface
2018-06-03 21:21:32 +02:00
Léo Lam
8fce18e4ff
Merge pull request #7059 from leoetlino/fs-wiisave
WiiSave: Use new filesystem interface
2018-06-03 21:05:22 +02:00
Léo Lam
6b9aef7042 FS: Add a struct for modes
As suggested here: https://dolp.in/pr7059#pullrequestreview-125401778

More descriptive than having a std::tuple of FS::Mode, and lets us
give names to known triplets of modes (like in ES). Functions that
only forward mode arguments are slightly less verbose now too.
2018-06-03 20:45:35 +02:00
Lioncash
06056d4f45 Gekko: Make register constructors explicit where applicable
Prevents implicit conversions to types and requires explicitly
specifying them in order to construct instances of them. Given these are
used within emulation code directly, being explicit is always better
than implicit.
2018-06-03 12:37:17 -04:00
Léo Lam
d1a8661709 WiiSave: Save and restore files and banner with correct mode 2018-06-03 17:23:40 +02:00
Léo Lam
fd3472442d WiiSave: Use new filesystem interface
Converts WiiSave to the new filesystem interface.
2018-06-03 17:01:14 +02:00
Léo Lam
c22205cd7e
Merge pull request #7053 from lioncash/frfi
Interpreter_FPUtils/FloatingPoint/Paired: Amend cases where FPSCR.FR and FPSCR.FI should be unset
2018-06-03 15:36:12 +02:00
Léo Lam
83324fe77d StringUtil: Remove ValueToString(std::string)
Doesn't make a lot of sense to have a function that gives the string
representation for a string.
2018-06-03 15:11:59 +02:00
Léo Lam
7e79bf97ab IniFile: Use templates for Get()
Gets rid of duplicated code.
2018-06-03 14:53:56 +02:00
Léo Lam
cba32b12e7 IniFile: Use templates for Set() 2018-06-03 14:53:56 +02:00
Lioncash
3e63d71046 Gekko: Add helper function for clearing both FPSCR.FI and FPSCR.FR 2018-06-03 08:27:18 -04:00
Léo Lam
fc0193c4b1 Move Config ValueToString to StringUtil
An identical implementation is used by IniFile, so move those functions
to StringUtil. A future commit will modify IniFile to use them.
2018-06-03 14:10:52 +02:00
spycrab
0cc20e95fe Qt/HotkeyWindow: Always show debugging tab 2018-06-03 13:40:57 +02:00
spycrab
9c26a1a458 Qt/Hotkeys: Implement missing "Other State Management" tab 2018-06-03 12:44:02 +02:00
Léo Lam
1e51e263e0
Merge pull request #6988 from leoetlino/wii-save-refactor
WiiSave: Refactor the import/export code
2018-06-03 12:05:43 +02:00
Léo Lam
86368fcd4d
Merge pull request #6499 from Ebola16/SettingsGroup
Android: Initial implementation of Interface submenu
2018-06-03 12:02:56 +02:00
Lioncash
d6bafbfaaf Interpreter_Paired: Handle signaling NaNs within ps_res and ps_rsqrte
Like regular fres and frsqrte, these also signal whether or not either
of the inputs are signaling NaNs.
2018-06-02 20:47:18 -04:00
Lioncash
d05c2ef90d Interpreter_Paired: Unset FPSCR.FI and FR in ps_res and ps_frsqrte in exceptional cases
If invalid operation exceptions or zero divide exceptions occur in
either of these instructions, FI and FR are supposed to be unset.
2018-06-02 20:42:47 -04:00
Lioncash
83774f72ad Interpreter_FloatingPoint: Unset FPSCR.FI and FPSCR.FR if a division by zero exception occurs in fres and frsqrte
Within the programming environments manual, part of the behavior of a
zero divide exception condition is that FI and FR be cleared.
2018-06-02 20:26:20 -04:00
Lioncash
468efb7243 Interpreter_FPUtils: Unset FPSCR.FI and FPSCR.FR if an invalid operation occurs in NI_* functions
If an invalid operation occurs, FI and FR bits are defined to be cleared
to zero for arithmetic operations.
2018-06-02 20:18:51 -04:00
Anthony
0f7370a22c
Merge pull request #7051 from lioncash/frsqrte
Interpreter_FloatingPoint: Don't store to destination in frsqrte if VE or ZE is set and a relevant exception occurs
2018-06-02 13:49:09 -07:00
spycrab
ba471c3214
Merge pull request #7048 from spycrab/qt_fs_size
Qt/FilesystemWidget: Add size column
2018-06-02 21:45:02 +02:00
Léo Lam
396810c450
Merge pull request #7050 from lioncash/ptr
WiimoteDevice: Get rid of pointer casting in CBigEndianBuffer
2018-06-02 21:35:43 +02:00
Lioncash
21add26b71 Interpreter_FloatingPoint: Clear FPSCR.FI and FPSCR.FR in invalid operation cases
As explained within 179d73ac0d, the table
within the Programming Environments Manual for PowerPC lists the FI and
FR bits as cleared for invalid operation cases. So, we amend the
relevant cases here in order to be accurate to hardware.
2018-06-02 15:30:56 -04:00
Lioncash
b71a9e658f Interpreter_FloatingPoint: Don't store to destination in frsqrte if VE or ZE is set and a relevant exception occurs
As explained within commit a08ad82ace, if
an invalid exception occurs and VE is set, then the destination register
should remain unchanged. Ditto for when ZE is set and a zero divide
exception occurs.
2018-06-02 15:27:14 -04:00
Lioncash
f6c4c05d93 WiimoteDevice: Make CBigEndianBuffer's constructor explicit
Prevents implicit construction of buffers.
2018-06-02 15:10:51 -04:00