mitaclaw
e8d5fb89e4
C++20: Synthesize `operator!=` From `operator==`
...
The inequality operator is automatically generated by the compiler if `operator==` is defined.
2024-10-10 20:23:55 -07:00
mitaclaw
6ca7e2856b
Modernize `std::find` with ranges
2024-10-10 15:28:11 -07:00
mitaclaw
ebf7cebc32
Modernize `std::sort` with ranges
2024-10-10 00:53:48 -07:00
mitaclaw
0a80243a92
Modernize `std::replace` with ranges
2024-10-10 00:53:48 -07:00
mitaclaw
72436a0d1f
Modernize `std::transform` with ranges
...
In StringUtil.h, the lambdas wrapping `Common::ToLower(char)` and `Common::ToUpper(char)` were only necessary due to the function names being overloaded.
2024-10-10 00:53:48 -07:00
mitaclaw
7ce170f138
Modernize `std::copy` with ranges
2024-10-10 00:53:48 -07:00
mitaclaw
4cc5e1972a
Modernize `std::count_if` with ranges
2024-10-10 00:53:48 -07:00
mitaclaw
809766a439
Simplify `std::fill` with `std::array::fill`
2024-10-09 17:26:10 -07:00
JMC47
b1cd4a6690
Merge pull request #13068 from mitaclaw/redundant-case-insensitive
...
IniFile: Migrate `Common::CaseInsensitiveLess` to StringUtil
2024-09-26 18:24:36 -04:00
mitaclaw
5f90673686
StringUtil: Remove `JoinStrings`
...
With 12 uses of `JoinStrings` in the codebase vs 36 uses of `fmt::join`, fmtlib's range adapter for string concatenation with delimiters is clearly the preferred option.
2024-09-22 21:09:36 -07:00
mitaclaw
508ccc2054
IniFile: Migrate `Common::CaseInsensitiveLess` to StringUtil
...
Migrating `Common::CaseInsensitiveLess` to StringUtil.h will hopefully discourage rolling one's own solution in the future for case-insensitive associative containers when this (quite robust!) solution already exists.
`Common::CaseInsensitiveStringCompare::IsEqual` was removed in favor of using the `Common::CaseInsensitiveEquals` function.
The `a.size() != b.size()` condition in `Common::CaseInsensitiveEquals` can be removed, since `std::ranges::equal` already checks this condition (confirmed in libc++).
2024-09-21 23:15:42 -07:00
Admiral H. Curtiss
e1b1e4b4cf
Merge pull request #13031 from parona-source/libfmt-11
...
Add support for libfmt-11
2024-08-31 15:34:48 +02:00
mitaclaw
76a998ecf9
TypeUtils: Remove Common::Fill
...
This temporary solution is no longer needed.
2024-08-22 17:29:26 -07:00
Alfred Wingate
d7c93d87be
Add support for libfmt-11
...
fmt::join was moved into fmt/ranges.h
Signed-off-by: Alfred Wingate <parona@protonmail.com>
2024-08-22 16:54:35 +03:00
Dr. Dystopia
9602f36248
Remove redundant semicolons
2024-08-20 14:59:54 +02:00
Tilka
b3652a6fe7
Merge pull request #12889 from mitaclaw/constexpr-bitutils-1
...
BitUtils: Constexpr BitCastToArray, Remove BitCastFromArray
2024-08-17 03:28:06 +01:00
mitaclaw
6ffd71ffae
BitUtils: Constexpr BitCastToArray, Remove BitCastFromArray
...
`std::bit_cast` participates in overload resolution only if `sizeof(To) == sizeof(From)` and both `To` and `From` are *TriviallyCopyable* types, so the static assertions here can be removed. `[[nodiscard]]` was added as well.
2024-08-16 12:21:49 -07:00
OatmealDome
f10f08d1c2
UICommon: Remove Steam user directory logic
2024-08-15 12:42:16 -04:00
Tilka
18ac8bf405
Merge pull request #12990 from tygyh/Use-contains-method
...
Use 'contains' method
2024-08-14 23:54:16 +01:00
Dr. Dystopia
618b41a459
Use 'contains' method
2024-08-14 22:18:28 +02:00
Dr. Dystopia
b86291f868
Fix comments
2024-08-13 06:58:23 +02:00
Tilka
56e7e37d4f
Merge pull request #12957 from Dentomologist/adjust_include_order_and_spacing
...
Adjust order and spacing of various #includes
2024-08-07 03:27:23 +01:00
Dentomologist
d627b78c46
Adjust order and spacing of various #includes
...
Move some #includes around to match the Contributing guidelines.
2024-07-26 14:28:34 -07:00
mitaclaw
f79520a906
Cached Interpreter 2.0
...
It now supports variable-sized data payloads and memory range freeing. It's a little faster, too.
2024-07-23 14:06:21 -07:00
mitaclaw
ffc7bcfbf8
Emitters: Define Trivial Getters Inline
2024-07-21 21:35:29 -07:00
SimoneN64
2dcb612497
Change OperandDesc variables to not be underscore-prefixed in order to comply with https://eel.is/c++draft/lex.name#3.1 (fixes compilation under newlib; e.g. devkitPro)
2024-07-21 18:35:38 +02:00
Admiral H. Curtiss
3ca50f7879
Implement File::GetExePath() for FreeBSD
2024-07-07 21:09:50 +02:00
Admiral H. Curtiss
3a63633be3
Common/Crypto/SHA1: Use span and string_view for Context::Update()
2024-07-04 22:37:07 +02:00
LillyJadeKatrin
bf97305a60
AchievementManager: Cache Badges on Disk
...
Badges are saved in /User/Cache/RetroAchievements on first download and reused from there instead of redownloaded.
2024-07-04 22:12:28 +02:00
LillyJadeKatrin
360f899f68
Common/Crypto/SHA1: Add DigestToString() utility function
2024-07-04 22:12:20 +02:00
OatmealDome
35f383d9b0
ScmRevGen: Set commits ahead to zero when on a tag
2024-06-29 22:59:40 -04:00
JosJuice
ea7928b3cd
Android: Replace log type names map with array
...
Storing the log type names in a map results in them getting re-sorted by
their keys, which doesn't quite give us the sorting we want. In
particular, the Achievements category ended up being sorted at R (for
RetroAchivements) instead of at A. Every use of the map is just
iterating through it, so there's no real reason why it has to be a map
anyway.
2024-06-15 20:06:34 +02:00
Admiral H. Curtiss
e282649b57
Merge pull request #12798 from mitaclaw/branch-watch-tool-fixes-2
...
Branch Watch Tool: Optimizations
2024-06-15 16:57:05 +02:00
Admiral H. Curtiss
a95c3dbc97
Merge pull request #12818 from iwubcode/json_file_operations
...
Common: add Json helper utilities for loading or saving to a file
2024-06-15 16:43:38 +02:00
Admiral H. Curtiss
34f81ad9ac
Merge pull request #12838 from sepalani/sock-reshade
...
Socket: Fix connect issues when using ReShade
2024-06-15 15:12:51 +02:00
Sepalani
44028cbbb1
Socket: Fix connect issues when using ReShade
2024-06-11 12:18:42 +04:00
Admiral H. Curtiss
5589e1e00f
Merge pull request #12830 from VampireFlower/aliases
...
Assembler: Add aliases for r1 and r2
2024-06-10 18:35:40 +02:00
VampireFlower
473db6882d
r32 doesn't exist
2024-06-06 13:05:45 -06:00
VampireFlower
8f03d9e8ca
handle sp and rtoc as GPR aliases
...
Co-Authored-By: mitaclaw <140017135+mitaclaw@users.noreply.github.com>
2024-06-06 13:05:43 -06:00
mitaclaw
8050760fe9
BranchWatchTableModel: Assume Unreachable Code Truly Is
2024-06-05 19:59:39 -07:00
Jordan Woyak
98e6a95e87
FatFsUtil: Generate a non-partitioned image in our folder-to-sdcard conversion.
2024-06-04 15:17:05 -05:00
LillyJadeKatrin
9499e14209
Add user agent to headers for all RetroAchievements server calls
...
Requested agent syntax is "Dolphin/5.0-23456"
2024-06-03 00:24:43 -04:00
iwubcode
e92f59e2d4
Common: add JsonUtil cpp which was missed initially
2024-05-31 23:08:39 -05:00
iwubcode
d494059164
Common: update json util function for converting to numeric value to use a static_cast. As discussed, a Saturating cast doesn't make sense when converting a double to a float
2024-05-31 23:08:05 -05:00
iwubcode
1d4f758b14
Common: add file serialization/deserialization functions for JSON
2024-05-31 22:36:12 -05:00
Brad Smith
57963c87d8
Add OpenBSD/arm64 support.
...
Fix building on OpenBSD/arm64 and add CPU feature detection.
2024-05-22 14:32:37 -04:00
mitaclaw
28f8ab9e8a
Arm64FloatEmitter: 64-Bit Assert In ABI_PushRegisters
2024-05-07 13:51:50 -07:00
JosJuice
2c91367429
Merge pull request #12737 from nlebeck/settingshandler-split
...
Eliminate SettingsHandler's `SetBytes` and `Reset` methods
2024-05-05 22:35:23 +02:00
Tilka
c442c0d5e5
Merge pull request #10957 from Pokechu22/std-bitcast
...
Replace Common::BitCast with std::bit_cast
2024-05-04 08:24:59 +01:00
Pokechu22
fbbfea8e8e
Replace Common::BitCast with std::bit_cast
2024-05-03 18:43:51 -07:00
Guilherme Janczak
0859d2c472
improve NetBSD-specific code
...
NetBSD doesn't put packages in /usr/local like /CMakeLists.txt thought.
The `#ifdef __NetBSD__` around iconv was actually breaking compilation
on NetBSD when using the system libiconv (there's also a GNU iconv
package)
A C program included from C++ source broke on NetBSD specifically, work
around it.
This doesn't fix compilation on NetBSD, which is currently broken, but
is closer to correct.
2024-05-03 15:12:29 +00:00
Niel Lebeck
36cdb4a544
Eliminate SettingsHandler's `SetBytes` and `Reset` methods
...
Also make the `Decrypt` method private.
As far as I can tell, the only motivation for exposing the `SetBytes`
and `Reset` methods is to allow `CBoot::SetupWiiMemory` to use the same
`SettingsHandler` instance to read settings data and then write it back.
It seems cleaner to just use two separate instances, and require a given
`SettingsHandler` instance to be used for either writing data to a
buffer or reading data from a buffer, but not both.
A natural next step is to split the `SettingsHandler` class into two
classes, one for writing data and one for reading data. I've deferred
that change for a future PR.
2024-04-23 17:19:01 -07:00
JosJuice
e8154a529f
JitArm64: Increase farcode & nearcode cache size
...
This is a JitArm64 version of 219610d8a0
.
Due to limitations on how far you can jump with a single AArch64 branch
instruction, going above the former limit of 128 MiB of code (counting
nearcode and farcode combined) requires a bit of restructuring. With the
restructuring in place, the limit now is 256 MiB. See the new large
comment in Jit.h for a description of the new memory layout.
2024-04-22 08:31:48 +02:00
JosJuice
de33831783
Arm64Emitter: Fix shadowed variable
...
A lambda at the end of ARM64XEmitter::ParallelMoves named its parameter
`move`.
2024-04-21 16:20:59 +02:00
JosJuice
e140491fa9
Arm64Emitter: Fix incorrect assert category
2024-04-21 16:19:10 +02:00
JosJuice
3cfa233b63
VideoCommon: Use GetSpanForAddress safely in texture decoding
...
Now only VertexLoader remains... But that one might be tricky.
2024-04-20 18:31:08 +02:00
Admiral H. Curtiss
1805f6e381
Merge pull request #12660 from jordan-woyak/hide-makepkg
...
Hide branch name from title bar when there are no commits ahead of master.
2024-04-18 17:21:24 +02:00
OatmealDome
dbc7e03577
Merge pull request #12709 from mitaclaw/rcheevos-posix
...
RetroAchievements: Put "RetroAchievements.ini" in the correct config location for POSIX
2024-04-15 01:21:43 -04:00
mitaclaw
48b38f6e9b
RetroAchievements: Put "RetroAchievements.ini" in the correct config location for POSIX
2024-04-14 21:47:41 -07:00
Niel Lebeck
d2b96736e0
Pass SettingsHandler buffers by const ref instead of rvalue ref
2024-04-12 18:50:21 -07:00
Admiral H. Curtiss
0c1a76398b
Merge pull request #12691 from mitaclaw/jit-profiling-restoration
...
JitCache: Software Profiling Restoration
2024-04-13 01:35:25 +02:00
mitaclaw
30c63fa4a6
Common: Remove Unused PerformanceCounter Code
2024-04-09 13:43:32 -07:00
mitaclaw
ee8bcf2ccc
JitCache: Software Profiling Restoration
...
Rekindle software JIT profiling with a std::chrono conversion and a config connection.
2024-04-09 13:43:31 -07:00
mitaclaw
cf74c0d683
PPCCache: Avoid Global System Accessor
2024-04-08 19:49:57 -07:00
mitaclaw
88dadf81d4
FileUtil: Fix BranchWatch User Path
...
I mistakenly put `D_DUMP_IDX` here instead of `D_DUMPDEBUG_IDX`.
2024-03-29 11:05:45 -07:00
Jordan Woyak
02f57a4778
Replace SCM_IS_MASTER with SCM_COMMITS_AHEAD_MASTER
2024-03-23 16:48:52 -05:00
Admiral H. Curtiss
b510ac89a3
Merge pull request #12355 from fuzziqersoftware/tapserver-modem-adapter
...
Implement tapserver-based modem adapter
2024-03-22 02:47:06 +01:00
iwubcode
146504d635
Common: add json utility functions 'ReadStringFromJson' and 'ReadBoolFromJson' to match 'ReadNumericFromJson' functionality for other data types, similarly support other data types for 'ToJsonArray'
2024-03-20 17:34:25 -05:00
iwubcode
69694494ce
Common: update 'ReadNumericOrDefault' to 'ReadNumericFromJson' and have it return an optional, this provides the caller with more flexibility
2024-03-20 17:34:25 -05:00
Martin Michelsen
083116a89c
rewrite tapserver interface for better error handling
2024-03-17 18:37:55 -07:00
mitaclaw
8134c8a572
BranchWatchDialog: A Total Replacement for CodeDiffDialog
...
With a purpose-built Branch Watch feature built into the emulated system: BranchWatchDialog, replacing CodeDiffDialog, is now better than ever!
2024-02-27 11:40:58 -08:00
Mai
27415b0ba1
Merge pull request #12587 from AdmiralCurtiss/localtime
...
Core: Fix crash when inspecting a savestate with a timestamp that causes localtime() to error out
2024-02-18 17:12:29 -05:00
iwubcode
edbf8f1772
Common: add json utility functions for Vec3 serialization
2024-02-17 22:06:06 -06:00
Admiral H. Curtiss
52410813f2
Common: Add utility function that wraps localtime_s() or localtime_t().
2024-02-18 04:40:25 +01:00
Peter Lafreniere
3da2e15e6b
IOFile: avoid clearing errors on null file struct
...
When performing a default compilation with recent GCC & glibc,
the use of -Werror=nonnull causes a build error.
The error is given as IOFile::ClearError() can call std::clearerr()
with a null file, which can trigger a null-pointer dereference in libc.
Change the std::clearerr() call to be conditional on a file being open.
2024-02-11 20:55:31 -05:00
JosJuice
b5c5371848
Arm64Emitter: Don't optimize ADD to MOV for SP
...
Unlike ADD (immediate), MOV (register) treats SP as ZR. Therefore the
ADDI2R optimization that was added in 67791d227c
can't optimize ADD to
MOV when exactly one of the registers is SP.
There currently isn't any code in Dolphin that calls ADDI2R with
parameters that would trigger this case.
2024-02-06 21:58:07 +01:00
Lioncash
16d8b6e6b3
Common/HookableEvent: std::move callback instance in Register()
...
Potentially avoids reallocations if the capture buffer of the callback
is quite large.
2024-01-31 13:16:50 -05:00
iwubcode
b37f096f4b
Common: add determinant functions to Matrix33 and Matrix44
2024-01-24 23:02:57 -06:00
iwubcode
b5a6225e1a
VideoCommon: add function to serialize ShaderAsset to json
2024-01-23 11:58:32 -06:00
Admiral H. Curtiss
043d868841
Merge pull request #12473 from Dentomologist/bitset64_fix_iterator_incrementation
...
BitSet64: Fix iterator incrementation
2024-01-01 22:03:11 +01:00
Dentomologist
7dbf463ddf
BitSet64: Fix iterator incrementation
...
Use 1 of the same type as the stored value when shifting left. This
prevents undefined behavior caused by shifting an int more than 31 bits.
Previously iterator incrementation could either hang or prematurely
report it had reached the end of the bitset.
2024-01-01 00:41:48 -08:00
Dentomologist
abb484a101
BitSet: Use direct initialization instead of c-style casts
2024-01-01 00:36:13 -08:00
Admiral H. Curtiss
4f04ac5858
Common/StringUtil: Use internal linkage for codepage conversion functions.
2023-12-29 19:50:55 +01:00
JosJuice
0c7359e150
Common: Fix encoding handling in GetWin32ErrorString
...
These messages can be localized, so we can't just assume it's all ASCII.
2023-12-29 16:01:13 +01:00
Mai
b1438c224f
Merge pull request #12439 from lioncash/sprintf
...
Core: Use fmt over sprintf in trivial cases
2023-12-21 17:17:21 -05:00
JosJuice
d8c78f2a92
JitArm64: Fix the "do nothing" cases of ANDI2R and friends
...
So somehow I forgot that AArch64 uses three-operand encoding...
Fixes a regression from 6303416201
which manifested in various ways,
such as incorrect rendering of the Wind Waker title screen.
2023-12-21 20:51:32 +01:00
Lioncache
affe928987
Common/TraversalServer: Make use of fmt more
...
We can convert printf and fprintf over to the use of fmt as well,
given that we've converted the sprintf calls over.
2023-12-18 13:08:57 -05:00
Lioncache
dc85194fac
Common/TraversalServer: Make use of fmt over sprintf where applicable
...
Resolves some deprecation warnings on macOS. This is better anyway, given fmt
has generic type formatting.
2023-12-18 13:08:57 -05:00
JosJuice
dc60bc5f1e
JitArm64: Improve codegen in ANDI2R and friends
...
The codegen for the functions themselves, not for the emitted code.
This seems to save 32 bytes per function. We also get rid of the oddity
we had before where ANDI2R would do masking for 32-bit operations but
the other functions wouldn't.
2023-12-17 18:13:32 +01:00
JosJuice
a8e1e1ae48
JitArm64: Optimize additional cases of ANDI2R and friends
...
Now we'll never need a scratch register for values that are all zeroes
or all ones.
2023-12-17 18:13:32 +01:00
JosJuice
6303416201
JitArm64: Optimize ANDI2R and friends to no-ops when possible
...
This optimizes rlwnmx with mask == 0xFFFFFFFF.
2023-12-17 18:13:30 +01:00
Tilka
773ffd04b8
Merge pull request #11497 from vyuuui/debugger_assembler_ui
...
Built-in assembler for debugger interface
2023-12-16 21:15:31 +00:00
Admiral H. Curtiss
190c4e8cda
Merge pull request #12427 from JosJuice/jitarm64-msr-updated-logical-imm
...
JitArm64: Fix MSRUpdated(ARM64Reg) with FEATURE_FLAG_PERFMON set
2023-12-16 17:22:23 +01:00
JosJuice
e0eb4ef5bc
JitArm64: Use enum class for LogicalImm size parameter
...
This should prevent issues like the one fixed in the previous commit
from happening again.
2023-12-16 16:48:26 +01:00
Lioncash
dbc792a3ec
Common/Crypto/SHA1: Resolve -Wignored-attributes warnings
...
See commit 417d1310d22b11d5d724625721b5fec09eda099a for an explanation
on why we do this.
2023-12-13 13:04:53 -05:00
Lioncash
bced5fac18
Common/Crypto/AES: Resolve -Wignored-attributes warnings
...
The alias for __m128i is typically something like:
typedef long long __m128i __attribute__((__vector_size__(16), __may_alias__));
and the part that ends up not getting preserved is the __may_alias__
attribute specifier.
So, in order to preserve that, we can just use a wrapper struct, so the
data type itself isn't being passed through the template.
2023-12-13 13:02:51 -05:00
vyuuui
38c15df464
Parser and Assembler implementations
2023-12-13 05:32:20 -08:00
Lioncash
50e4dc5dba
Watches: Make use of std::erase_if
2023-12-12 13:24:40 -05:00
Admiral H. Curtiss
2c6bf2d224
Merge pull request #12394 from lioncash/compare
...
General: Resolve -Wsign-compare warnings
2023-12-12 03:43:12 +01:00
Lioncash
f97316a1e6
TraversalClient: Resolve -Wsign-compare warning
2023-12-11 18:01:29 -05:00