Commit Graph

35438 Commits

Author SHA1 Message Date
Mai 21300bb21b
Merge pull request #12457 from iwubcode/asset_memory_limit
VideoCommon: handle asset memory going over reserved limit correctly
2024-02-16 15:46:52 -05:00
LillyJadeKatrin 394af40db5 Improved achievements disabled messaging
Most obviously, there is no longer a warning message to the player in the achievement window that achievements are disabled if a game is not currently running.
2024-02-15 16:33:18 -05:00
Dentomologist a1d6a54eaa DolphinTool: Fix parsing of command line bzip2 flag
Use "bzip2" instead of "bzip" in optparse's compression choices for the
convert command. This is both more accurate and matches what the
ParseCompressionTypeString function expects.

The mismatch between the two parsing functions prevented compression
using bzip2 because either ParseCompressionTypeString or optparse would
generate an error when using "bzip" or "bzip2" respectively.

Fixes https://bugs.dolphin-emu.org/issues/13427
2024-02-13 12:44:03 -08:00
Mai a583526a1c
Merge pull request #12575 from n8pjl/werror-nonnull
IOFile: avoid clearing errors on null file struct
2024-02-13 07:43:19 -05:00
Mai 9e6d701fbc
Merge pull request #12577 from iwubcode/mesh_for_asset_loader
VideoCommon: make mesh asset data loadable by asset loader
2024-02-13 07:42:57 -05:00
iwubcode 2ab877586d VideoCommon: make mesh asset data loadable by asset loader 2024-02-12 21:45:32 -06:00
Admiral H. Curtiss f0d363eea7
Core/DSPHLE: Construct accelerator in AX and AXWii constructors.
This fixes an issue introduced by 3b0444be6b
where the m_accelerator would not be initialized when loading a savestate if
the current UCode mismatched the UCode in the savestate, leading to a crash.
2024-02-12 04:18:18 +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
Mai aa66842172
Merge pull request #12574 from sepalani/exi-exit
EXI: Don't kill Dolphin when receiving BBA_IOB
2024-02-11 20:32:33 -05:00
iwubcode 60772ed9d2 VideoCommon: add functionality to prepare for a mesh asset that is loaded from a GLTF file 2024-02-11 13:28:00 -06:00
iwubcode ecfcae8718 Externals: add tinygltf, a library used to load or save GLTF mesh files 2024-02-11 13:26:39 -06:00
Sepalani 7c276c1993 EXI: Don't kill Dolphin when receiving BBA_IOB
According to @Kirbymimi it doesn't crash on real hardware.

Testing was done by sending many UDP packets to an unbound port.
2024-02-11 23:15:23 +04:00
Mai 80d77ac0b4
Merge pull request #12568 from noahpistilli/kd-register-default-id
IOS/KD: Correctly handle registration of the default user ID
2024-02-11 13:52:40 -05:00
Mai dd15c012f3
Merge pull request #12573 from JosJuice/android-wii-menu-download-size
Android: Mention download size in the Wii Menu not installed message
2024-02-11 13:52:01 -05:00
Mai 9b3fdfb37b
Merge pull request #12572 from JosJuice/android-menu-init-guard
Android: Don't check Wii Menu version before directory initialization
2024-02-11 13:51:30 -05:00
JosJuice b404da78c4 Android: Mention download size in the Wii Menu not installed message
Google Play's policies require us to tell the user the size of any large
download.

The size seems to vary by just a megabyte or two across regions in my
testing, so I'm listing a rough size for all the regions.

I'm also taking the opportunity to shorten the message to make it easier
to read.
2024-02-11 11:34:51 +01:00
JosJuice 06964a921d Android: Don't check Wii Menu version before directory initialization
Fixes a crash.
2024-02-11 11:15:18 +01:00
JosJuice 48ae529762 Android: Update Load Wii System Menu string in onPrepareOptionsMenu
Because the wording of the Load Wii System Menu string can change
depending on the contents of the NAND, we should update that menu item in
a method that's guaranteed to get called every time the user opens the
menu rather than one that's only guaranteed to be called once.
2024-02-11 10:58:42 +01:00
Admiral H. Curtiss e6ee217a7c
Core: Move Emulation IOS instance to System. 2024-02-07 22:07:30 +01:00
Mai ca81d8b8a6
Merge pull request #12565 from LillyJadeKatrin/retroachievements-bugfix
Retain Save State Folder
2024-02-07 14:03:12 -05:00
Sketch 33dd3b078c Correctly log register errors 2024-02-07 09:36:36 -05:00
TellowKrinkle 5949911a5a VideoCommon: Don't use indexed output for fbfetch
A nonzero index makes no sense, and Mesa doesn't like it when you supply an index
2024-02-07 03:52:31 +01: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
LillyJadeKatrin 1ed7b35710 Retain Save State Folder
Adds a setting field under the hood to retain which folder the player last saved/loaded a state to/from, so that the dialog box to select a state to save/load reopens at that folder.
2024-02-05 19:44:09 -05:00
Mai 9240f579ea
Merge pull request #12561 from JosJuice/profile-consistency
InputCommon: Fix profile path inconsistencies
2024-02-05 09:47:08 -05:00
JosJuice 1315b54ffa InputCommon: Use distinct values for profile key
Because the last commit made us use separate folders for GCPad and
GCKey profiles, we should also use separate game INI keys for them.
Otherwise setting e.g. PadProfile1 in a game INI will make both GCPad
and GCKey try to load it, typically with one of them succeeding and the
other one showing a panic alert due to the profile not existing in its
folder.

Better do this breaking change for GCKeys in the same PR as the other
breaking change rather than later.
2024-02-04 17:55:08 +01:00
JosJuice 6cf55ab1ee InputCommon: Unify GetProfileName and GetProfileDirectoryName
After reading the previous commit, you might think "hold on, what's the
difference between GetProfileName and GetProfileDirectoryName"? These
two are being used for the exact same thing - figuring out where
profiles are stored - yet they return different values for certain
controllers like GC keyboards! As far as I can tell, the existing code
has been broken for GC keyboards since they were introduced a decade
ago. The GUI (and more recently, also InputCycler) would write and read
profiles in one location, and our code for loading profiles specified in
a game INI file would read profiles in another location.

This commit gets rid of the set of values used by the game INI code in
favor of the other set. This does breaking existing setups where a
GCKey profile has been configured in a game INI, but I think the number
of working such setups is vanishingly small. The alternative would make
existing GCKey profiles go missing from the profile dropdown in the GUI,
which I think would be more disruptive. The alternative would also force
new GCKey profiles into the same directory as GCPad profiles.

This commit also fixes a regression from d6c0f8e749. The Android GUI was
using GetProfileName to figure out what key to use in the game INI,
which made it use incorrect game INI entries for GameCube controller
profiles but not Wii Remote profiles. Now the Android GUI uses
GetProfileKey for this, fixing the problem.
2024-02-04 17:55:08 +01:00
JosJuice 2bcf70af3f InputCommon: Refactor away InputConfig::LoadConfig's switch case
By having getters for this information, other code that needs access to
the same information can call the getters instead of duplicating the
information.
2024-02-04 16:46:10 +01:00
Sepalani 1831a8cec5 BBA/HLE: Add missing PSH flag 2024-02-03 10:12:07 +04:00
Admiral H. Curtiss abbc4bd0bd
Merge pull request #12551 from lioncash/cheev
AchievementManager: Minor cleanup
2024-02-03 03:01:56 +01:00
Admiral H. Curtiss 4e3886e7e8
Merge pull request #12557 from mitaclaw/cpu-thread-guarantees-1
CheatSearch: Remove redundant lambdas
2024-02-03 02:45:06 +01:00
Admiral H. Curtiss df5baab873
Merge pull request #12550 from lioncash/dead
VertexLoaderManager: Remove unused entry struct
2024-02-03 02:38:02 +01:00
Lioncash 4f40bdf501 VertexLoaderManager: Use fill() in Init()
Same behavior, less code.
2024-02-01 23:04:40 -05:00
Lioncash ea95c82a01 VertexLoaderManager: Remove unused entry struct
This isn't used anywhere, so it can be removed.
2024-02-01 23:04:39 -05:00
Lioncash db80abbadd AchievementManager: Tidy up GetRichPresence()
This can be a direct return.
2024-02-01 23:03:24 -05:00
Lioncash c14414a151 AchievementManager: clear name in CloseGame()/LogOut()
A little more idiomatic.
2024-02-01 23:03:24 -05:00
Lioncash 2d8af7b7f8 AchievementManager: Replace memsets where applicable
We can just use brace initialization to zero these out. Smaller to
write and a little quicker to read.
2024-02-01 23:03:24 -05:00
Lioncash 184fe932ed AchievementManager: std::move leaderboard info in FetchBoardInfo()
Avoids churning some allocations.
2024-02-01 23:03:24 -05:00
Lioncash 76c381e6f7 AchievementManager: Ensure update callback is always valid
This way we don't need to do any validity checking aside from the
initial setting of the callback. Also cuts down on line noise.
2024-02-01 23:03:23 -05:00
Lioncash 2b83cc739a AchievementManager: Convert .compare() into equality operators
These perform a default comparison, which is the same as using the
equality operators.
2024-02-01 23:03:23 -05:00
Lioncash 394418b415 AchievementManager: Remove unnecessary .get()
Same behavior, less code.
2024-02-01 23:03:23 -05:00
Lioncash 161efff6c9 AchievementManager: Remove long qualifier
We can remove the long qualifying on some ResponseType instances to
lessen the amount of reading.
2024-02-01 23:03:23 -05:00
Lioncash 7096f99f79 CustomPipeline: Mark arrays as constexpr
Ensures that these go into the ro section.
2024-02-01 23:02:45 -05:00
Lioncash 59211589b9 CustomPipeline: Make use of emplace_back() in GlobalConflicts()
We can use the string_view arguments to directly construct strings
inside of the global_result vector.
2024-02-01 23:02:45 -05:00
Lioncash 353ceedb50 CustomPipeline: Resolve unused variable warning
We can just use holds_alternative here instead.
2024-02-01 23:02:45 -05:00
mitaclaw 085c4d154e CheatSearch: Remove redundant lambdas
Core::RunAsCPUThread is obsoleted by CPUThreadGuard reference already passed into the function. The nonsense lambda in CheatSearchWidget is from changes in fdb7328c73.
2024-02-01 19:54:47 -08:00
Admiral H. Curtiss 951be30891
Core: Fix booting titles from NAND. 2024-02-01 19:50:20 +01:00
Admiral H. Curtiss 14121c5504
Core/ConfigManager: Remove dead bAutomaticStart flag. 2024-01-31 22:53:43 +01:00
Admiral H. Curtiss da6b5dd38a
Merge pull request #12546 from lioncash/event
VideoCommon/Statistics: Remove global system accessor from s_after_frame_event
2024-01-31 21:16:21 +01:00
Admiral H. Curtiss 18abf7c768
Merge pull request #12544 from lioncash/getmod
GraphicsModGroup: Allow heterogenous lookup for GetMod()
2024-01-31 20:17:26 +01:00
Admiral H. Curtiss 202c10d757
Merge pull request #12547 from lioncash/movie
Core/Movie: Remove lingering global system instance accessors
2024-01-31 20:12:07 +01:00
Lioncash 5ade2e39ef Core/Movie: Remove lingering global system instance accessors
The movie manager is already passed in a reference to the relevant
system, so we can use that instead.
2024-01-31 13:30:24 -05: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
Lioncash cac66317aa VideoCommon/Statistics: Remove global system accessor from s_after_frame_event
Instead, we make the event take a reference to the system and then pass
it in when the event is triggered.

This does introduce two other accessors, but these are much easier to
refactor out over time, and without modification to the existing event
interface.
2024-01-31 13:12:09 -05:00
Lioncash 0dfefacdf4 VertexLoaderBase: Collapse std namespace for hash and mark noexcept
Makes the hash specialization a little less noisy. Also we mark it
noexcept, since hashes shouldn't be throwing exceptions (and this can be
optimized on).
2024-01-31 12:43:00 -05:00
Lioncash 8e4b2565cd TextureConfig: Collapse std namespace for hash
Lets us collapse the namespacing and make the specialization a little
less noisy.
2024-01-31 12:41:33 -05:00
Lioncash b63dcd504d RenderState: Collapse std namespace for hash
We can specify the namespace on the hash to make the specialization a
little less noisy.
2024-01-31 12:40:10 -05:00
Lioncash 5bfaa3a966 NativeVertexFormat: Collapse std namespace and mark hash noexcept
We can just tag the std:: onto the end of the specialization to make it
less noisy.

Also mark it as noexcept, since hashes shouldn't throw exceptions.
2024-01-31 12:37:44 -05:00
Lioncash 40b050fe37 GraphicsModGroup: std::move graphics_mod in Load()
The config object is quite heavyweight, so we should move this instead
of copying.
2024-01-31 12:27:43 -05:00
Lioncash ccacda5e2c GraphicsModGroup: Simplify try_add_mod()
We can use contains() here, and also move the mod config if it's valid
instead of copying it, since it contains quite a bit of allocated data.
2024-01-31 12:23:21 -05:00
Lioncash 81aca79145 GraphicsModListWidget: Pass optional by const reference
All we do is read from it, so we don't need to copy the string if we
happen to have one.
2024-01-31 12:09:35 -05:00
Lioncash a1879ea099 GraphicsModGroup: Allow heterogenous lookup for GetMod()
Allows using keys that aren't directly std::string as the key. This lets
us use std::string_view for the incoming path name, making it more
flexible with other string types.
2024-01-31 12:05:17 -05:00
Mai 30fdf25f8f
Merge pull request #12542 from AdmiralCurtiss/system-sconfig
Migrate m_is_mios and bWii from SConfig to System.
2024-01-31 09:57:17 -05:00
Admiral H. Curtiss 9a3e770c23
Migrate SConfig::bWii to System. 2024-01-31 12:54:07 +01:00
Mai e0828815e7
Merge pull request #12540 from mitaclaw/encode-reg-to-64
Add Missing EncodeRegTo64 in JitArm64::dcbx
2024-01-30 13:08:03 -05:00
mitaclaw 45481620b8 Add Missing EncodeRegTo64 in JitArm64::dcbx
ARM64FloatEmitter::ABI_PushRegisters expects an XReg temporary, not a WReg.
2024-01-30 03:06:32 -08:00
Admiral H. Curtiss 8d515d407c
Migrate SConfig::m_is_mios to System. 2024-01-30 03:45:17 +01:00
luc-git d124fcbb0d
DolphinQt/RenderWidget: Add comments for SetCursorLocked() on Linux.
Co-authored-by: Admiral H. Curtiss <pikachu025@gmail.com>
2024-01-30 01:06:30 +01:00
LillyJadeKatrin fd99a5db9a Reverse endianness of achievement memory peeks
rcheevos expects these multi-byte peeks to have the opposite endianness so they need to be swapped before rcheevos gets them.
2024-01-29 11:55:49 -05:00
Admiral H. Curtiss 8482a50154
Merge pull request #12530 from iwubcode/custom_shaders_compilation_fixes
VideoCommon: fix some issues when compiling custom shaders
2024-01-28 14:30:37 +01:00
Admiral H. Curtiss 4843705061
Merge pull request #12534 from iwubcode/custom-pipeline-refactor
VideoCommon: refactor the custom pipeline logic to be reusable
2024-01-28 14:28:23 +01:00
Admiral H. Curtiss c9715e7e7d
Merge pull request #12535 from iwubcode/vertexmanager_draw_refactor
VideoCommon: refactor drawing into its own function
2024-01-28 14:27:41 +01:00
Admiral H. Curtiss 0405b4dcc2
Merge pull request #12536 from LillyJadeKatrin/retroachievements-bugfix
Removed post data from Achievement request logs
2024-01-28 14:26:09 +01:00
LillyJadeKatrin f25bdda728 Removed post data from Achievement request logs
post_data included passwords and API keys in plaintext so continuing to include it in logs is a security liability.
2024-01-27 18:50:27 -05:00
JosJuice 990303a028
Merge pull request #12519 from lioncash/leak
PostProcessing: Don't potentially leak memory in BlitFromTexture()
2024-01-27 22:29:45 +01:00
iwubcode c34b3ae390 VideoCommon: refactor drawing into its own function 2024-01-27 14:45:34 -06:00
iwubcode 3e3967ff94 VideoCommon: refactor the custom pipeline logic in the graphics mod action into a separate class, so it is reusable 2024-01-27 00:12:49 -06:00
Admiral H. Curtiss e740e32562
Merge pull request #12522 from lioncash/ppcanalyst
PPCAnalyst: Merge duplicate expression in ReorderInstructionsCore()
2024-01-26 20:29:16 +01:00
Admiral H. Curtiss b0491c2ce8
Merge pull request #12529 from iwubcode/math_determinant
Common: add determinant functions to Matrix33 and Matrix44
2024-01-26 19:13:38 +01:00
Admiral H. Curtiss b09b59c125
Merge pull request #12521 from lioncash/reent
Core: Make use of reentrant time utilities where applicable
2024-01-26 18:55:26 +01:00
Admiral H. Curtiss 460ab609d0
Merge pull request #12524 from lioncash/memb
Jit64AsmCommon: Remove redundant m_jit member from CommonAsmRoutines
2024-01-26 18:53:44 +01:00
Admiral H. Curtiss c3652a7129
Merge pull request #12532 from lioncash/json
GraphicsMod/ShaderAsset: Lessen object churn a little bit
2024-01-26 18:52:52 +01:00
Mai a553308775
Merge pull request #12443 from iwubcode/custom_pipeline_action_material_cubemap
VideoCommon: update custom pipeline action to support a variety of texture samplers, support for materials, and more!
2024-01-26 12:39:37 -05:00
iwubcode b37f096f4b Common: add determinant functions to Matrix33 and Matrix44 2024-01-24 23:02:57 -06:00
Lioncash 7a59ecc39d GraphicsTarget: Reduce object churn a little 2024-01-24 23:00:01 -05:00
Lioncash 1b7da37114 GraphicsTargetGroup: Reduce object churn a little 2024-01-24 22:52:58 -05:00
Lioncash 24f952c12b GraphicsModFeature: Reduce object churn a little 2024-01-24 22:48:53 -05:00
Lioncash 0385b40bd8 GraphicsModAsset: Reduce object churn a little 2024-01-24 22:47:22 -05:00
Lioncash 2253d9a95d GraphicsModGroup: Mark move constructor and assignment as noexcept
Allows containers to optimize off of std::move_if_noexcept
2024-01-24 22:41:30 -05:00
Lioncash 0327b11e0b GraphicsModGroup: Reduce object churn
We can emplace and move to avoid doing object copies.
2024-01-24 22:40:05 -05:00
Lioncash e3e20df185 GraphicsMod: Avoid some object churn
We have quite a bit of allocation churn going on here, so we can emplace
and move where appropriate to alleviate that a little.
2024-01-24 22:34:50 -05:00
Lioncash 7b6463ef1f ShaderAsset: Emplace value instances when possible in ToJson()
Constructs elements directly inside the container and also makes it
shorter to read in certain instances.
2024-01-24 18:47:44 -05:00
Mai 97160ddc83
Merge pull request #12531 from LillyJadeKatrin/retroachievements-bugfix
Add host URL setting to achievements config
2024-01-24 16:17:17 -05:00
Admiral H. Curtiss 58bff55c71
Merge pull request #12528 from lioncash/assembler
DolphinQt/MenuBar: Hide assembler option if debug UI is disabled
2024-01-24 18:48:32 +01:00
Admiral H. Curtiss 2826099808
Merge pull request #12523 from lioncash/fallthrough
Core: Get rid of some unannotated fallthrough cases
2024-01-24 18:40:32 +01:00
Admiral H. Curtiss 5692e15285
Merge pull request #12525 from lioncash/defined
Core: Convert some preprocessor checking to use #ifdef/#if defined() over #if
2024-01-24 18:39:49 +01:00
JosJuice 74d4cb0274
Merge pull request #12526 from lioncash/trace
CodeTrace: Use std::set::lower_bound() over std::lower_bound()
2024-01-24 17:56:39 +01:00
JosJuice dab03e4c08
Merge pull request #12527 from lioncash/highlight
GekkoSyntaxHighlight: Fix FPR terminal highlighting being treated as GPRs
2024-01-24 17:55:44 +01:00
LillyJadeKatrin 03e3f65653 Add host URL setting to achievements config
The Host URL setting in the RetroAchievements config will, if set, be used as the host URL for all server requests for achievements. This allows for an easy switch to the RetroAchievements staging server for testing.
2024-01-24 07:08:54 -05:00
iwubcode cf081e839d VideoCommon: fix compilation error in pixel shaders when per-pixel lighting isn't set for custom shaders 2024-01-23 21:50:42 -06:00