summaryrefslogtreecommitdiff
path: root/Source/Core/Common
AgeCommit message (Collapse)Author
2025-12-15StringUtils: Drop TabsToSpacesSintendo
This function is unused.
2025-11-29Windows/DirectIOFile: Don't request DELETE access for read-only OpenDentomologist
Aside from being unnecessary, on Windows the flag prevents two instances of Dolphin (one instance from before 2509-371 when the flag was introduced and the other after) from running the same ROM simultaneously. Attempting to do so generated the false error `"[Rom]" is an invalid GCM/ISO file, or is not a GC/Wii ISO.` followed by `Failed to init core` and emulation shutdown on the second instance to start the game. Fixing the incorrect error message is a task I'm deferring to another PR. The problem didn't happen when both instances were 2509-371 or later, but I ran into it while bisecting an issue and it'd be nice to avoid that problem in the future.
2025-11-23Merge pull request #14142 from JosJuice/directiofile-cant-create-safJosJuice
Common: Treat DirectIOFile as unable to create SAF files
2025-11-23Merge pull request #14148 from ↵Jordan Woyak
jordan-woyak/hookable-event-add-remove-inside-trigger HookableEvent: Allow hooks to be added and removed from within a Trigger callback.
2025-11-22Merge pull request #14128 from jordan-woyak/fix-run-on-object-raceJosJuice
DolphinQt/QtUtils: Simplify RunOnObject and eliminate Common::Event race. Introduce Common::OneShotEvent class.
2025-11-21HookableEvent: Allow hooks to be added and removed from within a Trigger ↵Jordan Woyak
callback. This fixes a deadlock in FIFOFifoRecorder.
2025-11-18Common: Treat DirectIOFile as unable to create SAF filesJosJuice
In 405baed805, we made the assumption that whether OpenAndroidContent is able to create a new file depends on the open mode, the document provider, and the positions of the celestial bodies. However, I'm fairly sure that it can't create files at all as currently implemented. First, ContentResolver.openFileDescriptor is documented as throwing FileNotFoundException if the file doesn't exist. Now, the SAF documentation is notoriously unreliable on matters like these, and document providers can do whatever they want anyway, so we can't actually trust this to mean that FileNotFoundException will always be thrown if the file doesn't exist. But second, the Dolphin function ContentHandler.unmangle is also unable to handle files that don't already exist (unless the passed-in URI isn't mangled to begin with, but to the best of my knowledge, there's no way to get a non-mangled URI for a file that doesn't exist (unless you make assumptions about how the document provider's URI scheme works, which we don't do in Dolphin)). Summed up, it looks a lot like OpenAndroidContent can't create files, or at the very least can't do so reliably. Therefore I'm making DirectIOFile throw an assertion and return false in situations where it's being asked to create a file under SAF. For reference, there's no code in Dolphin that actually tries to create a file under SAF. In all instances where we use SAF to write to files, the file is created by the system file picker before it returns the URI of the file to us. What does this change gain us? First, if someone in the future tries to use DirectIOFile to create a file under SAF, they'll be immediately informed that this isn't supported rather than discovering it doesn't work and chalking it up to SAF being bad for unpredictable reasons. Second, we get rid of a call to File::Exists, which is a notable performance improvement for game list scanning due to SAF and Dolphin's "unmangling" being bad for reasons that unfortunately are entirely predictable to those of us who have stared into the SAF void. I've tested that game list scanning and game conversion still works.
2025-11-18Common: Introduce a OneShotEvent class. Unlike Common::Event, OneShotEvent ↵Jordan Woyak
is safe in situations when being immediately destructed.
2025-11-18Common/Functional: Add InvokerOf template which can convert function ↵Jordan Woyak
pointers to functor types.
2025-11-18Common/ScopeGuard: Fix move constructor.Jordan Woyak
2025-11-15Common/BitField: Silence two warnings:Jordan Woyak
warning: definition of implicit copy constructor for 'BitField<2, 2, ColorChannel>' is deprecated because it has a user-declared copy assignment operator [-Wdeprecated-copy] Redundant access specifier has the same accessibility as the previous access specifier.
2025-11-10Merge pull request #14052 from jordan-woyak/DirectIOFileJordan Woyak
Common and DiscIO: Introduce a thread safe DirectIOFile and make BlobReader implementations use it.
2025-11-10Merge pull request #13875 from JosJuice/jitarm64-orr-base-without-mirrorJosJuice
JitArm64: Add missing ORR pattern in MOVI2RImpl
2025-11-09Merge pull request #14026 from jordan-woyak/move-only-function-fixAdmiral H. Curtiss
Common/Functional: Fix MoveOnlyFunction from inadvertently creating references from lvalues.
2025-11-09Common/IOFile: Remove the `Duplicate` function. The duplicate handles shared ↵Jordan Woyak
a read/write position making them effectively not thread-safe.
2025-11-09Common/BitUtils: Add overloads of AsU8Span/AsWritableU8Span that handle ↵Jordan Woyak
conversions from contiguous ranges.
2025-11-09Common: Add a DirectIOFile class that allows for copies which are entirely ↵Jordan Woyak
thread safe.
2025-11-08Merge pull request #14086 from Simonx22/android/use-native-analyticsOatmealDome
Android: Use the shared HTTP analytics backend
2025-11-08Merge pull request #14082 from Simonx22/analytics/reload-on-setting-changeOatmealDome
DolphinAnalytics: Reload backend when config changes
2025-11-08Android: Use the shared HTTP analytics backendSimonx22
We can now route Android analytics through Common::HttpAnalyticsBackend, drop the Volley sender, and keep the JNI layer limited to only transfer metadata since https://bugs.dolphin-emu.org/issues/11772 has been fixed.
2025-11-08Merge pull request #14020 from jordan-woyak/string-util-cleanupsJosJuice
StringUtil: Cleanups and add some character encoding conversion unit tests.
2025-11-08Config: Use maximum value of size_t instead of -1 as default value in ↵Simonx22
ConfigChangedCallbackID Co-authored-by: OatmealDome <julian@oatmealdome.me>
2025-11-08Merge pull request #13939 from ↵JosJuice
Dentomologist/logging_avoid_overwriting_debug_verbosity_in_release_builds Logging: Don't overwrite LDEBUG level in Release builds
2025-11-06Common: Remove the string parameters from the HookableEvent interface.Jordan Woyak
2025-11-04Merge pull request #14061 from jordan-woyak/config-info-spin-mutexJordan Woyak
ConfigInfo: Cleanups and change mutex to a spin lock.
2025-11-02Config: Make ConfigInfo use Common::SpinLock to protect the CachedValue. ↵Jordan Woyak
These locks are nearly always uncontested and this makes Config::Get faster.
2025-11-02Common: Add AtomicMutex and SpinMutex classes as faster alternatives to ↵Jordan Woyak
std::mutex.
2025-11-02Config/ConfigInfo: Cleanups.Jordan Woyak
2025-11-02Common: Make HookableEvent use non-static data.Jordan Woyak
Co-authored-by: Dentomologist <dentomologist@gmail.com>
2025-11-02StringUtil: Replace strerror with Common::LastStrerrorString.Jordan Woyak
2025-11-02StringUtil: Make non-Windows WStringToUTF8 implementation use iconv instead ↵Jordan Woyak
of deprecated std::codecvt features.
2025-11-02StringUtil: Fix many clang-tidy warnings.Jordan Woyak
2025-11-01Merge pull request #14034 from JoshuaVandaele/byeprofileJosJuice
JitRegister: Remove OProfile profiler
2025-10-30x64Emitter: Fix missing-declarations warningJoshua Vandaële
2025-10-27AdvancedPane: Add a button to restore default settingsJoshua Vandaële
2025-10-26JitRegister: Remove OProfile profilerJoshua Vandaële
OProfile is not used at all these days, most major distributions do not ship it anymore (Debian, Fedora, and Alpine to name the few I've checked) and following a discussion on Discord, nobody is apparently using it, most devs not even being aware of it. This removes an optional dependency from Dolphin.
2025-10-22Common/Functional: Fix MoveOnlyFunction from inadvertently creating ↵Jordan Woyak
references from lvalues.
2025-10-17Merge pull request #13978 from JoshuaVandaele/libiconv-1.18JMC47
Externals: Update libiconv to 1.18
2025-10-13WindowsDevice: Silence missing property log spamDentomologist
Don't log a warning in GetPropertyHelper when the property isn't present. The function returns an optional, so any callers that want to log a warning when nullopt is returned can do so themselves. This prevents plugged-in devices (an Xbox One controller in my case) from spamming the message "W[COMMON]: CM_Get_DevNode_Property returned: 37" twice per second (that value being CR_NO_SUCH_VALUE).
2025-10-12WindowsDevice: Add some utility functions for getting device properties ↵Jordan Woyak
using CfgMgr32.
2025-10-09Merge pull request #13996 from SuperSamus/jit64-dynamic-known-jmp-lenJMC47
Jit64: Dynamic length of regular jump instruction (for known addresses)
2025-10-09Merge pull request #13964 from ryanmcgrath/macos/qosJMC47
macoS: update QoSSession with SO_NET_SERVICE_TYPE.
2025-10-08MMU: Use templates for Read/Write functionsMartino Fontana
2025-10-08Jit64: Dynamic length of regular jump instruction (for known addresses)Martino Fontana
Conditional jumps already do that, so let's be consistent.
2025-10-06Merge pull request #13995 from ↵JosJuice
Dentomologist/deletedirrecursively_dont_report_error_if_directory_is_absent DeleteDirRecursively: Don't report error for absent directory
2025-10-05DeleteDirRecursively: Don't report error for absent directoryDentomologist
Check if the return value of std::filesystem::remove_all is -1 rather than 0; the former is the specified return value if there's an error while 0 just means the directory already didn't exist (which is the end result we want). Previously error messages such as the following were possible: E[COMMON]: DeleteDirRecursively: [path]/User/RedirectSession/ failed The operation completed successfully. Also adds a period in the error string to make it look nicer.
2025-10-04Common/Network: Add BluetoothAddress struct and string conversion functions.Jordan Woyak
2025-10-04Common: Add some utilities to a new UnixUtil header.Jordan Woyak
2025-10-04CommonFuncs: Add StrerrorString version of LastStrerrorString that accepts ↵Jordan Woyak
an error number.
2025-10-01dcbz: Fix AVX pathMartino Fontana