Commit Graph

3182 Commits

Author SHA1 Message Date
Sepalani 39d34e133f Debugger: Add a Thread widget
DebugInterface: Add GetThreads

WatchWidget: Update widget on AddWatch
2020-05-03 20:48:30 +04:00
Léo Lam 07ab79db64 MathUtil: Fix Rectangle::GetWidth/Height for unsigned types
`std::abs(x - y)` where x and y are unsigned integers fails to compile
with an "call of overloaded 'abs(unsigned int)' is ambiguous" error
on GCC, and even if it did compile, that expression still wouldn't
give the correct result since `x - y` is unsigned.
2020-05-03 14:41:58 +02:00
Léo Lam 19da101164 Remove redundant Config prefix from ConfigInfo/ConfigLocation
Both structs are already in the Config namespace.
2020-05-02 14:40:14 +02:00
degasus fc0df37d94 Fix windows build system. 2020-04-29 12:56:52 +02:00
degasus f8f592c345 Externals: Update minizip search path. 2020-04-29 12:41:36 +02:00
JosJuice 5d6f23e424 SettingsHandler: Don't output null bytes
https://bugs.dolphin-emu.org/issues/12019, take two.
2020-03-24 17:01:15 +01:00
JosJuice 76b97a4183
Merge pull request #8680 from Leseratte10/master
SettingsHandler: Always decode the whole settings.txt file
2020-03-24 00:21:29 +01:00
Jun Su 7c7a41ecd8 Cleanup warnings of -Wunused-variable
remove unused variables.
2020-03-23 14:24:27 +08:00
Florian Bach cba4acc54b SettingsHandler: Always decode the whole settings.txt file 2020-03-20 16:08:25 +01:00
Léo Lam 4711b76cc4
Merge pull request #8655 from Techjar/fix-hotkey-groups
Core/HotkeyManager: Fix group names in config
2020-03-18 12:03:07 +01:00
JosJuice 5f6598f9e9 StringUtil: Add PathToFileName function 2020-03-16 21:03:34 +01:00
Florian Bach 3487e5037e Fix settings.txt parsing in case of weird line endings 2020-03-15 00:12:19 +01:00
Stenzek 86db015c23 Common: Add a render_window field to WindowSystemInfo
We need this because we need to pass the layer to MoltenVK, not
the view handle. But the input subsystem still needs the window.
2020-03-11 23:09:30 +10:00
Sergei Trofimovich 0478ce72f5 Source/Core/Common/StringUtil.h: include <limits> for std::numeric_limits
Without included header build fails on gcc-10 as:

```
[ 13%] Building CXX object Source/Core/AudioCommon/CMakeFiles/audiocommon.dir/CubebUtils.cpp.o
In file included from ../../../../Source/Core/AudioCommon/CubebUtils.cpp:13:
../../../../Source/Core/Common/StringUtil.h: In function 'bool TryParse(const string&, T*)':
../../../../Source/Core/Common/StringUtil.h:84:20: error: 'numeric_limits' is not a member of 'std'
   84 |   if (value < std::numeric_limits<LimitsType>::min() ||
      |                    ^~~~~~~~~~~~~~
```

Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
2020-03-05 21:20:34 +00:00
Techjar 08c95883e9 Common/IniFile: Add Exists function for section name only 2020-02-29 01:39:36 -05:00
Jordan Woyak 8343dadd58 InputCommon: Add types to ControllerEmu that represent raw controller inputs and calibration data to calculate normalized input values. 2020-02-17 15:57:43 -06:00
Jordan Woyak 259a7191d2 Common: Add additional Vector operations. 2020-02-17 15:57:43 -06:00
Jordan Woyak 9efcd08ea3 MathUtil: Add RunningMean/RunningVariance classes. 2020-02-17 15:57:43 -06:00
Léo Lam 44b4c2db49 Common: Avoid std::function overhead in ScopeGuard
So far in all our uses of ScopeGuard, the type of the callable is
usually just a lambda or a function pointer, so there is no need
to rely on std::function's type erasure.

While the cost of using std::function is probably negligible, it still
causes some unnecessary overhead that can be avoided by making
ScopeGuard a templated class. Thanks to class template argument
deduction in C++17 most existing usages do not even need to be changed.

See https://godbolt.org/z/KcoPni for a comparison between
a ScopeGuard that uses std::function and one that doesn't
2020-02-15 21:33:31 +01:00
spycrab 213a9adcff CMake: Fix building ARM64 on Windows 2020-02-12 12:29:31 +01:00
magiblot 55e8601192
Fix another implicit false-to-nullptr conversion 2020-02-09 15:51:30 +01:00
Jordan Woyak 4f47cccd9f Cleanup: Use std::abs instead of abs. 2020-02-08 18:21:14 -06:00
Lioncash 91deb40a22 Common: Amend includes to handle the upgrade to fmt 2020-02-04 15:03:51 -05:00
Techjar 185e49d2a9 x64CPUDetect: Add flag for slow PDEP/PEXT on AMD Zen
For some unknown reason PDEP and PEXT are ridiculously slow on AMD Zen
architecture.
2020-01-26 22:09:46 -05:00
Techjar 52b52631c2 x64CPUDetect: Add detection for AMD Zen architecture 2020-01-26 22:09:13 -05:00
Tilka a632bc7324
Merge pull request #8579 from jordan-woyak/rvalue-cleanups
Common/Core: Minor rvalue reference related cleanups.
2020-01-25 21:09:22 +00:00
Tilka 9827aa7a37
Merge pull request #8577 from jordan-woyak/shared_mutex
Common/Analytics: Replace mutex with shared_mutex and minor cleanups.
2020-01-25 20:08:22 +00:00
Jordan Woyak 5e3472eba9 Common/Analytics: Replace mutex with shared_mutex and minor cleanups. 2020-01-25 14:04:00 -06:00
Tilka 119ccc5e4f
Merge pull request #8556 from Sintendo/bestrest
x64Emitter: Avoid 8-bit displacement when possible
2020-01-25 19:10:47 +00:00
Jordan Woyak 732032cdb2 Common/Core: Minor rvalue reference related cleanups. 2020-01-23 22:58:23 -06:00
Léo Lam 89b0ab2d22 StringUtil: Add IsPrintableCharacter and use it
Add a function that safely returns whether a character is printable
i.e. whether 0x20 <= c <= 0x7e is true.

This is done in several places in our codebase and it's easy to run
into undefined behaviour if the C version defined in <cctype>
is used instead of this one, since its behaviour is undefined
if the character is not representable as an unsigned char.

This fixes MemoryViewWidget.
2020-01-16 00:22:26 +01:00
Pierre Bourdon 1ac3264d5d
Merge pull request #8545 from jordan-woyak/imu-cursor-centering
WiimoteEmu: IMU pointing behavior improvements and code cleanup.
2020-01-15 12:10:57 +01:00
JosJuice 966e1b31ba
Merge pull request #8394 from Pokechu22/misc-di-gpio
Various DI improvements
2020-01-13 17:17:24 +01:00
Connor McLaughlin ae6d3be449
Merge pull request #8530 from s-daveb/master
MacOS: Fixes configuration hang; bump MacOS SDK.
2020-01-13 20:21:08 +10:00
Sintendo bdcdd763fe x64Emitter: Remove unused macros
No users, and one them seems to do the same as stddef.h's offsetof()
already used elsewhere.
2020-01-13 08:43:42 +01:00
Sintendo f82c38e156 X64Emitter: Remove obsolete TODO
TODO was already taken care of in PR #941.
2020-01-13 08:43:42 +01:00
Sintendo bdfc472751 x64Emitter: Refactor OpArg::WriteRest
Shorter, displacement is now handled in one location.
2020-01-13 08:43:42 +01:00
Sintendo cde3a3b448 x64Emitter: Avoid 8-bit displacement when possible
Due to the way the ModRM encoding works on x86, memory addressing
combinations involving RBP or R13 need an additional byte for an 8-bit
displacement of zero.

However, this was also applied in cases where it is unnecessary,
effectively wasting a byte.

- MatR with RSP or R12

8B 44 24 00          mov         eax,dword ptr [rsp]
8B 04 24             mov         eax,dword ptr [rsp]

- MRegSum with base != RBP or R13

46 8D 7C 37 00       lea         r15d,[rdi+r14]
46 8D 3C 37          lea         r15d,[rdi+r14]

- MComplex without offset

8B 4C CA 00          mov         ecx,dword ptr [rdx+rcx*8]
8B 0C CA             mov         ecx,dword ptr [rdx+rcx*8]
2020-01-13 08:43:42 +01:00
Jordan Woyak 0aacf3a627 WiimoteEmu: Make the "Total Yaw" setting work again. 2020-01-09 13:11:13 -06:00
Tilka 6e18dfb600
Merge pull request #8133 from Sintendo/mov64imm32
x64Emitter: Emit shorter MOVs for 32-bit immediates
2020-01-06 13:12:56 +01:00
Léo Lam f35f4f2bf0
Merge pull request #8541 from jordan-woyak/float-parse-fix
StringUtil: Make TryParse of floats handle comma and dot decimal separators.
2020-01-05 12:12:09 +01:00
Pokechu22 77189e74cd Implement Broadway GPIOs
SLOT_LED and the AVE ones are not implemented yet, but the other Broadway ones are.
2020-01-04 11:43:26 -08:00
Pokechu22 a695b05b21 Add support for std::optional to PointerWrap 2020-01-04 11:43:26 -08:00
Jordan Woyak 0e8d4cb6ac StringUtil: Make TryParse of floats handle comma and dot decimal separators. 2020-01-04 07:19:15 -06:00
Léo Lam ad75215bb0 Fix several warnings
A small, nonexhaustive set of warning fixes. The DiscIO Volume change
is a workaround for a GCC bug [1] that causes returning an unengaged
std::optional to emit annoying -Wmaybe-uninitialized warnings.
This last change alone fixes pages upon pages of warnings since
Volume.h is included from several files.

-Wstringop-truncation is another irrelevant warning for us, but
unfortunately there seems to be no way to disable it without
adding ugly pragmas wherever the warning appears.
2020-01-04 12:11:39 +01:00
Jordan Woyak 8ab3694f51 Common: Add Matrix33::FromQuaternion. 2020-01-02 15:16:37 -06:00
George Talusan b1a6cbc3b4 MacOS: Dispatch GL calls to main thread to prevent crashes on Catalina 2020-01-01 23:06:19 -05:00
David Korth c2dd2e8a2e Use std::istringstream or std::ostringstream instead of std::stringstream where possible.
This removes std::iostream from the inheritance chain, which reduces
overhead slightly.
2019-12-29 23:45:02 -05:00
David Korth a23b3d26f4 GLExtensions.cpp: Use arrays of `const char *const` instead of `std::string`.
The strings end up being copied, so we might as well initialize the
std::string in the unordered_map directly.
2019-12-29 23:45:02 -05:00
Stenzek d744c5a148 Compile fixes for Windows-on-ARM64 2019-12-28 19:20:41 +10:00