Commit graph

4120 commits

Author SHA1 Message Date
JosJuice
c8be819711 LogManager: Stop using manual memory management
This fixes a memory leak that would occur when the Android frontend
calls LogManager::Init more than once in order to reload settings.

Note that the log window listener is now owned by LogManager instead of
by the frontend, making it consistent with the other log listeners.
2025-05-02 21:14:32 +02:00
JosJuice
b566e81644
Merge pull request #13596 from JosJuice/config-callback-locking
Config: Add locking for config changed callbacks
2025-05-02 08:49:22 +02:00
Admiral H. Curtiss
2e20e24136
Merge pull request #13587 from jordan-woyak/manual-value
Common: Move some duplicate container element construction logic into a ManuallyConstructedValue template.
2025-04-30 23:45:33 +02:00
Jordan Woyak
4899913446 Common: Move some duplicate container element construction logic into a ManuallyConstructedValue template. 2025-04-30 14:56:07 -05:00
Jordan Woyak
a149b9d62d WorkQueueThread: Cleanups. Implement in terms of WaitableSPSCQueue. Add single producer WorkQueueThreadSP. 2025-04-30 14:31:51 -05:00
OatmealDome
0b0151770a
Merge pull request #13436 from JoshuaVandaele/clang-format-19
Update clang-format to version 19
2025-04-30 01:17:31 -04:00
JosJuice
f060baa257 Config: Add locking for config changed callbacks
Different threads are adding and calling callbacks, so this should have
some locking. This is both to ensure thread safety when accessing
`s_callbacks` and to ensure that there won't be situations where a
callback gets called after it's removed.

`s_callback_guards` is also accessed from multiple threads and has
therefore been made atomic.
2025-04-26 12:56:37 +02:00
Dentomologist
3a883f28d6 Config: Add [[nodiscard]] to AddConfigChangedCallback
Require callers of Config::AddConfigChangedCallback and
CPUThreadConfigCallback::AddConfigChangedCallback to handle the returned
ConfigChangedCallbackIDs to hopefully prevent future issues with
callbacks getting called after their associated objects have been
destroyed.
2025-04-25 16:04:12 -07:00
Tilka
805307f432
Merge pull request #13451 from vyuuui/numeric_labels
Add numeric label support to assembler
2025-04-25 01:56:43 +01:00
Tilka
50026ab795
Merge pull request #13497 from hoogmin/modernize_fs_path
Core/Common/FileUtil.cpp: Use std path utility for automatic path separator handling.
2025-04-25 01:38:35 +01:00
Joshua Vandaële
bf554edfe0
linter: Add and apply new formatting rules
New rules:
`InsertNewlineAtEOF: true`
`RemoveSemicolon: true`
`RequiresClausePosition: WithPreceding`
2025-04-23 11:19:57 +02:00
Joshua Vandaële
2c54ee94c1
linter: Apply clang-format 19.1 formatting
find ./Source/ -name '*.cpp' -o -name '*.h' | xargs clang-format-19 -i
2025-04-23 11:19:20 +02:00
Jordan Woyak
af960651e8 Common: SPSCQueue cleanups and improvements. 2025-04-22 23:49:32 -05:00
Jordan Woyak
ac76deaef0
Merge pull request #13529 from jordan-woyak/StateBuffer
Core/State: Avoid unnecessarily value-initializing large buffers.
2025-04-22 16:30:51 -05:00
OatmealDome
da84a9f605
Merge pull request #13477 from OatmealDome/macos-11
CMakeLists: Bump minimum macOS to 11.0
2025-04-22 17:27:12 -04:00
JosJuice
e468e2359a IOS: Only have one USBScanner
Some games open two USB interfaces, e.g. /dev/usb/oh0 and /dev/usb/hid.
This was causing us to run two scanning threads at once, using up more
CPU time for scanning than we need to.
2025-04-21 21:57:49 +02:00
JosJuice
c0c180bdc2
Merge pull request #13467 from JosJuice/profiler-thread-safety
Common: Make Profiler thread safe
2025-04-21 20:19:47 +02:00
OatmealDome
7213cdd439 MemoryUtil: Remove availability checks for macOS 11 2025-04-21 00:24:58 -04:00
Tilka
0a52140145
Merge pull request #13549 from shuffle2/ucrtpatch
remove ucrt compat patches
2025-04-20 22:24:57 +01:00
Shawn Hoffman
2d1161150b remove ucrt compat patches
Dolphin has not supported a version of windows where
these binaries exist for a while.
2025-04-20 12:50:10 -07:00
Shawn Hoffman
5dd896a7d9 HttpRequest: remove some legacy code for windows < 8.1 2025-04-20 11:46:09 -07:00
Jordan Woyak
12dcd6c285 Common: Add UniqueBuffer and SharedBuffer templates. 2025-04-19 17:13:40 -05:00
Jordan Woyak
f78fa2e9f1 LinearDiskCache: Use make_unique_for_overwrite. 2025-04-19 17:13:40 -05:00
Jordan Woyak
cb20959679 Common/Timer: Change HANDLE to void* to avoid including Windows.h to fix cmake build. 2025-04-18 21:50:15 -05:00
OatmealDome
2af276d27e MemArenaDarwin: Initialize all address variables passed to vm_map 2025-04-16 00:50:54 -04:00
Javier Martinez
7ca8dc3767 Use std path utility for automatic path seperator handling.
It was being done manually, which a TODO comment advised against.
Using generic_string() from std::filesystem::path solves this.

Fix encoding issue using generic_wstring instead.
2025-04-08 16:54:11 -04:00
Jordan Woyak
e0e53f3235 Common/Timer: Use YieldProcessor on Windows. 2025-04-03 15:48:51 -05:00
Jordan Woyak
e5c8935acc Common: Create a PrecisionTimer class. 2025-04-03 15:48:51 -05:00
JosJuice
957265ba52 Common: Make Profiler thread safe 2025-03-29 15:05:02 +01:00
JMC47
1981f22228
Merge pull request #13433 from iwubcode/update_min_win10
Update our minimum windows 10 version to 1903 and reinstate code that depends on it
2025-03-25 18:30:15 -04:00
vyuuui
e34907025d Add numeric label support to assembler 2025-03-24 18:59:32 -07:00
JMC47
ad3650abfc
Merge pull request #13093 from mitaclaw/ranges-modernization-4-projection
Ranges Algorithms Modernization - Projection
2025-03-23 15:56:13 -04:00
Jordan Woyak
ba1bf6959e Config: Allow passing a DefaultState object to Set functions to delete keys. 2025-03-17 20:46:24 -05:00
OatmealDome
07cec796f4
Merge pull request #13417 from luzpaz/typo-source-core-common
Core/Common: Fix typos
2025-03-16 14:53:02 -04:00
iwubcode
c1dea828ab Common: use std::chrono for GetLocalTimeSinceJan1970 on Windows
Co-authored-by: Shawn Hoffman <godisgovernment@gmail.com>
2025-03-16 00:59:45 -05:00
iwubcode
373a1a5dc0 Update min win10 version from 1703/15063 to 1903/18362
Co-authored-by: Shawn Hoffman <godisgovernment@gmail.com>
2025-03-16 00:59:45 -05:00
JMC47
1bd3e79fda
Merge pull request #13378 from jordan-woyak/desired-ext-state
WiimoteEmu: Clean up variant handling in DesiredExtensionState.
2025-03-15 17:26:49 -04:00
JosJuice
e637a05707
Merge pull request #12866 from JosJuice/android-log-types-sorting
Android: Replace log type names map with array
2025-03-15 16:01:33 +01:00
JosJuice
8c7ab286f5
Merge pull request #13181 from tygyh/Replace-'reinterpret_cast'
Replace 'reinterpret_cast' with 'static_cast'
2025-03-15 15:31:38 +01:00
Luz Paz
1b47dbf519 Core/Common: Fix typos
Found via `codespell -q 3 -S "./Externals,./Data/Sys/wiitdb-??.txt,*.po,*.pot" -L andf,asnd,bootup,brocken,bufferin,clen,collet,datas,delt,diety,extint,fpr,inout,inport,interm,nd,nin,ontop,pixelx,re-use,re-used,sav,stateman,strat,transer,wil`
2025-03-11 19:48:45 -04:00
JMC47
9f43f59c9b
Merge pull request #13276 from JoshuaVandaele/sfml-3.0.0
Migrate to SFML 3.0.0
2025-03-10 15:03:36 -04:00
mitaclaw
258ec4f9cd Modernize std::lower_bound/upper_bound with ranges and projections 2025-03-09 13:26:38 -07:00
mitaclaw
8b9f92a0af Modernize std::sort with ranges and projections
In PPCTables.cpp, the code is currently unused so I was unable to test it.

In CustomPipeline.cpp, a pointer to member function cannot be used due to 16.4.5.2.1 of the C++ Standard regarding "addressable functions". https://eel.is/c++draft/namespace.std#6

In Fs.cpp and DirectoryBlob.cpp, these examples used projections in a previous iteration of this commit, but no longer do. Still, they remain in this commit because the PR they would actually belong to is already merged.
2025-03-09 13:26:38 -07:00
mitaclaw
62b2b939b5 Simplify std::find_if with std::ranges::find and projections
In LabelMap.cpp, the code is currently unused so I was unable to test it.

In WiiUtils.cpp, the magic value `1u` was replaced by the constant value `DiscIO::PARTITION_UPDATE`.
2025-03-09 13:26:35 -07:00
mitaclaw
1e5e9219cd Common: Create Range Projections For std::pair 2025-03-09 13:19:41 -07:00
Jordan Woyak
1d481a395a VariantUtil: Introduce WithVariantAlternative to dynamically construct and visit a variant alternative. 2025-02-25 17:22:59 -06:00
Joshua Vandaële
0a83783fae
Migrate to SFML>=3.0.0 2025-02-25 06:42:13 +01:00
JosJuice
0f83598493 Common: Make SD pack/unpack strings translatable
Regression from adc5b81.
2025-02-23 23:09:24 +01:00
Jordan Woyak
adc5b81c31 DolphinQt: Rename the pack/unpack SD Card buttons. 2025-02-12 13:30:48 -06:00
Admiral H. Curtiss
f1fe32c93b
Merge pull request #13254 from brad0/openbsd_aarch64
ArmCPUDetect: Add OpenBSD support for elf_aux_info
2025-02-02 18:12:03 +01:00