Commit Graph

24631 Commits

Author SHA1 Message Date
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 69f079b371
Merge pull request #7098 from Ebola16/ElfDolMessage
Android: Add AlertDialog for files without Game IDs in Game Settings
2018-06-10 14:36:46 +02: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
Ryan Meredith fb3ae94acb Android: Add AlertDialog for files without Game IDs in Game Settings 2018-06-09 11:30:20 -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
Ryan Meredith 569454c961 Update Android Gradle to 3.1.3 2018-06-07 22:15:11 -04: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
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 f0f8ca2172 Android: Don't allow INI editing for DOL/ELF files 2018-06-06 17:34:08 +02: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
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 daee5a4b43 Android: Store folders to scan in SharedPreferences instead of SQLite
Needed in order for the next commit to get rid of the SQLite database.
2018-06-04 22:12:25 +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
Léo Lam 34511b397e
Merge pull request #7067 from Ebola16/ASU3
Update Android Gradle Plugin
2018-06-04 19:37:33 +02:00
Ryan Meredith dad9c87d8c Update Android Gradle Plugin 2018-06-04 13:22:37 -04: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
degasus 7154bfd825 UnitTest: Add StringUtil ToString/TryParse test
Only a single one, but the main one for ini files:
Check if the written values can be parsed again.
2018-06-03 23:12:32 +02:00
Léo Lam 0ecec33567 WiiRoot: Use a namespace alias for FS to reduce noise 2018-06-03 21:37:28 +02: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