Commit Graph

31363 Commits

Author SHA1 Message Date
JMC47 edd63d8c3f
Merge pull request #10519 from jordan-woyak/fix-hotkey-detections
MappingCommon: Fix detection of hotkey and conjunction expressions.
2022-03-19 00:41:00 -04:00
Pierre Bourdon f73b2d70a6
Merge pull request #10516 from OatmealDome/steam
CMakeLists: Add flag to enable / disable automatic update support
2022-03-18 08:33:13 +01:00
OatmealDome e23df9369d CMakeLists: Add option to disable automatic update support 2022-03-18 03:04:51 -04:00
TryTwo 53cf78d413 Gekko constistancy changes. Add context item to codeview to show or copy a load/store target memory address from instructions at or near PC when paused. 2022-03-17 12:53:38 -07:00
Jordan Woyak b589d720bf MappingCommon: Fix detection of hotkey and conjunction expressions. 2022-03-16 22:25:04 -05:00
JosJuice c0f6aa7ab1 Android: Clarify what we mean by "user data" 2022-03-15 19:29:08 +01:00
JosJuice 479489c999 DiscIO: Don't return GameTDB ID for any Datel disc
DTLX01 can be either a Freeloader or Action Replay, so it's
inappropriate to always use the same title and cover for it.
2022-03-15 18:56:49 +01:00
JosJuice f9f561ced1 Android: Update dependencies 2022-03-15 18:19:28 +01:00
JosJuice f5b6cccd32 Android: Update Android Gradle Plugin 2022-03-15 18:19:07 +01:00
Léo Lam bf261f6144
Merge pull request #10493 from jordan-woyak/netplay-show-traversal-external-port
NetPlayDialog: Display external IP/Port as seen by the traversal server.
2022-03-15 16:03:28 +01:00
Léo Lam e10967e918
Merge pull request #10502 from Pokechu22/defer-gcadapter
GCAdapter: Defer initialization until MainWindow::InitControllers
2022-03-15 16:00:28 +01:00
Léo Lam da6f86f381
Merge pull request #10496 from JosJuice/mappingcommon-split
Move parts of MappingCommon out of DolphinQt
2022-03-15 15:54:04 +01:00
Léo Lam a99c993f1d
Merge pull request #10509 from JosJuice/freeloader-too-small
VolumeVerifier: Skip "lacks some data" check for Datel discs
2022-03-15 15:47:55 +01:00
Léo Lam a39d11c47a
Merge pull request #10501 from jordan-woyak/dolphin-tool-no-need-for-a-unique-ptr
DolphinTool: Kill an unnecessary unique_ptr.
2022-03-15 15:46:35 +01:00
Léo Lam c883ec1c53
Merge pull request #10512 from stblr/device-change
USBv5: Fix racy device change behavior
2022-03-15 15:45:40 +01:00
Jordan Woyak c058c8e1a6 NetPlayDialog: Display external IP/Port as seen by the traversal server when it's used. 2022-03-15 01:56:16 -05:00
Techjar 302dedbd24 NetPlay: Introduce constant for peer timeout 2022-03-15 01:26:55 -04:00
Pablo Stebler 7e7b0971ab
USBv5: Fix racy device change behavior
This prevents the device changes happening between 2 GETDEVICECHANGE
calls from being missed by the application.
2022-03-14 22:32:30 +01:00
Techjar b1122ec94f NetPlay: Add timeout to traversal code path
Amendment to 600c816 as I missed the traversal case.
2022-03-14 00:19:54 -04:00
JosJuice 41adf3cd53 DiscIO: Treat game ID DTLX01 as a Datel disc
Needed for the disc mentioned in the previous commit.
2022-03-12 22:27:58 +01:00
JosJuice 6d1a344aab VolumeVerifier: Skip "lacks some data" check for Datel discs
Turns out there's some Freeloader disc for the GC that triggers this
despite being a good dump. This warning is mostly intended to catch
Wii games that have been truncated at the 4.00 GiB or 4.38 GiB mark
anyway, and if someone does have a Datel dump that has been truncated,
they'll still get the "unusual size" warning.
2022-03-12 22:24:38 +01:00
JosJuice 2e1f89025f Android: Only use getActionIndex for ACTION_POINTER_DOWN/ACTION_POINTER_UP
According to the documentation, getActionIndex should only be
used with ACTION_POINTER_DOWN and ACTION_POINTER_UP. We've had a
few crashes reported in the Play Console regarding invalid pointer
indices for getY, and I'm hoping this will help with that.
2022-03-12 21:20:00 +01:00
JosJuice 905e86d754
Merge pull request #10451 from JosJuice/skip-redundant-flushes
Jit: Skip redundant flushes
2022-03-12 12:32:02 +01:00
JosJuice 7a3c719739
Merge pull request #10453 from JosJuice/output-in-use
PPCAnalyst: Count outputs as being in use
2022-03-12 12:31:42 +01:00
Pokechu22 37806472e1 GCAdapter: Defer initialization until MainWindow::InitControllers
If libusb fails to initialize, an assertion fails, but if that happens before the main window is created, then Dolphin just dies.  Now, the panic alert is properly shown and the user can ignore it.
2022-03-10 10:35:45 -08:00
Pokechu22 0f3832dec6 Common/FileUtil: Change logging to debug level
These messages hid other, more important, ones often.  I have left AttemptMaxTimesWithExponentialDelay and GetSysDirectory/SetSysDirectory as info, since those are called infrequently and can be useful to the end-user.
2022-03-08 14:07:37 -08:00
Pokechu22 c657b80996 Software/EfbInterface: Remove logspam for RGB565_Z16 being unsupported
This message would be logged, usually multiple times, for EVERY. SINGLE. PIXEL. That's pretty much useless and just makes the log unreadable. Plus, the current support (which acts as RGB8) is close enough that for end-user purposes, it's fine.  I don't think the hardware backends support RGB565_Z16 and its antialiasing functionality correctly either, but they don't have similar logspam.
2022-03-08 13:59:55 -08:00
JosJuice da12ff02fc Android: Actually use a thread for DirectoryInitialization
`((Runnable) () -> init(context)).run()` is just a more complicated way
of writing `init(context)`, and doesn't on its own launch a thread.
2022-03-08 22:29:07 +01:00
Jordan Woyak f711b8dbae DolphinTool: Kill an unnecessary unique_ptr. 2022-03-08 02:00:26 -06:00
Martin a4d031cfda Add NonDefaultQPushButton to set autoDefault of buttons to false 2022-03-08 08:51:29 +01:00
Shawn Hoffman a546c451b7 windows: wrap all main funcs with utf8 conversions
fixes 12858
2022-03-07 23:24:21 -08:00
JosJuice 1bc057614e Move parts of MappingCommon out of DolphinQt
Some of the functions in MappingCommon would be useful to use on
mobile in the future.
2022-03-06 14:30:49 +01:00
JosJuice 5446daaef9 Common: Make DynamicLibrary non-copyable
The default implementations of DynamicLibrary's copy and move
constructors and assignment operators are unsafe.
2022-03-05 23:40:41 +01:00
Léo Lam d32c72038a
Merge pull request #10467 from Dentomologist/fix_scalar_initializer_braces_warning
Debugger: Fix warning on Debian builder
2022-03-02 12:56:09 +01:00
Léo Lam c7361bc1b3
Merge pull request #10474 from Pokechu22/log-ogl-video-info
OGLRender: Log video backend info, in addition to showing it via OSD
2022-03-02 12:29:51 +01:00
Léo Lam bcc14d32b8
Merge pull request #10482 from Dentomologist/remove_redundant_statement
FileUtil: Remove redundant statement
2022-03-02 12:27:21 +01:00
Léo Lam ebfee3b2de
Merge pull request #10484 from AdmiralCurtiss/general-pane-signalblocker
Qt/GeneralPane: Don't trigger config change events when populating GUI.
2022-03-02 11:59:02 +01:00
Léo Lam 666db19436
Merge pull request #10322 from Starsam80/nand
NANDImporter: Various improvements and cleanup
2022-03-02 11:56:11 +01:00
Starsam80 41a3368889
NANDImporter: Only read the AES key once
There is no need to constantly reset the key for every file entry.
2022-03-01 19:24:59 -07:00
Starsam80 80012ae253
NANDImporter: Make superblocks less magical
Create a struct describing the superblock layout and use it directly
without needing to specify offsets and such.
2022-03-01 19:24:59 -07:00
Starsam80 73151a5753
NANDImporter: Don't pass paths if we don't need to 2022-03-01 19:24:59 -07:00
Starsam80 6758c77c39
NANDImporter: Reduce recursion in `ProcessEntry`
It also simplifies the code flow, as it no longer goes backwards
through the filesystem chain.
2022-03-01 19:24:59 -07:00
Starsam80 2ccd974471
NANDImporter: Improve NANDFSTEntry
`uid` is a u32, not a u16. Also, everything is big endian, so we
can simplify the code a little bit.
2022-03-01 19:24:59 -07:00
Pierre Bourdon 8ecfa537a2
Merge pull request #10473 from delroth/autoupdate-fail
Fix manual update check which was hardcoded to "dev" track
2022-03-02 00:10:48 +01:00
Starsam80 643057fea2
NANDImporter: Make a class variable for the NAND root 2022-03-01 15:07:59 -07:00
JMC47 ea116fbbdf
Merge pull request #9834 from AdmiralCurtiss/fastmem-reserve-region-linux
MemArena: Keep fastmem memory region mapped on Linux to ensure nothing allocates within the fastmem space.
2022-02-28 12:46:34 -05:00
JosJuice bbb64ff993 Shadergen: Use real_ocol0 workaround for shader logic ops
Previously we were using this workaround when using framebuffer fetch
to emulate dual source blending, but it seems like we also need to use
it when using framebuffer fetch to emulate logic ops, otherwise some
Adreno devices get a crash when compiling OpenGL ES ubershaders.

Using the workaround in specialized shaders doesn't seem to be
necessary, but I've made the same change there for consistency.

This gets us closer to fixing https://bugs.dolphin-emu.org/issues/12791
but doesn't actually fix it.
2022-02-28 18:32:19 +01:00
JMC47 f65dc6d525
Merge pull request #10441 from OatmealDome/improved-logic-op-workaround
BlendingState: Set source and destination alpha factors in logic op workaround
2022-02-28 12:17:25 -05:00
JMC47 20e4e34e91
Merge pull request #10487 from JosJuice/android-savestate-spacing
Android: Set letterSpacing for savestate options
2022-02-28 12:13:10 -05:00
JosJuice 608799f1e4 PixelShaderGen: Check uid_data for use_shader_logic_op
On devices which have hardware support for dual source blending
but not logic ops, this lets us skip performing the framebuffer
fetch in situations where the game isn't actually using logic ops.
2022-02-28 00:04:31 +01:00
JosJuice 8588272b3b Android: Set letterSpacing for savestate options
fbe7cf6 set this for most buttons in the in-game menu but missed
the savestate-related buttons and Unpause Emulation.
2022-02-27 22:45:21 +01:00
Tony Gong c95c43bfb6 Make pos/neg analog axes symmetrical
Currently, the axes for the main and C sticks range from 0-255, with
128 being the mid-point; but this isn't symmetrical: the negative axis
has 128 values not including 0, while the positive axis has 127 values
not including 0.

Normalizing so that the range is 1-255 makes the positive and negative
axes symmetrical. The inability to yield 0 shouldn't be an issue as a
real GC controller cannot yield it anyway.
2022-02-27 09:58:21 -08:00
Admiral H. Curtiss 1fd9a1117e
Qt/GeneralPane: Don't trigger config change events when populating GUI. 2022-02-27 17:56:35 +01:00
Admiral H. Curtiss aa0ac83997
Merge pull request #10468 from JosJuice/sd-card-callback
Use config changed callback to detect SD insertion/ejection
2022-02-26 17:31:31 +01:00
Mai M c474db9301
Merge pull request #10407 from JosJuice/android-reset-callback
Android: Call OnConfigChanged when resetting a setting
2022-02-26 11:24:18 -05:00
Dentomologist 01bd5e15ba FileUtil: Remove redundant statement 2022-02-25 21:16:07 -08:00
Pokechu22 7d76eea4ea OGLRender: Log video backend info, in addition to showing it via OSD
This is mainly intended for debugging fifo.ci.
2022-02-23 18:30:02 -08:00
JMC47 75ad057b08
Merge pull request #10405 from JosJuice/android-no-boot-timeout
Android: Get rid of the boot timeout
2022-02-23 15:40:54 -05:00
Pierre Bourdon 281dfd3e6a
Fix manual update check which was hardcoded to "dev" track 2022-02-23 18:39:28 +01:00
Pokechu22 5b3b6a7f1d
Merge pull request #10471 from Pokechu22/flush-efb-pokes-before-peeking
FramebufferManager: Flush pending EFB pokes in PopulateEFBCache
2022-02-22 17:09:34 -08:00
JMC47 5da55c9e18
Merge pull request #10406 from JosJuice/android-mipmap-swap
Android: Fix swapped texture dumping description strings
2022-02-22 16:53:26 -05:00
Mai M 32d28e4d57
Merge pull request #10469 from JosJuice/android-remove-legacybooleansetting
Android: Get rid of LegacyBooleanSetting
2022-02-21 20:39:59 -05:00
Pokechu22 23cbd570a1 FramebufferManager: Flush pending EFB pokes in PopulateEFBCache
I.e. flush pokes before running an EFB peek, if the cache tile isn't present.  If the cache tile is present, then EFB pokes should have been written to the cache tile and thus don't need to be flushed.
2022-02-21 13:23:22 -08:00
JosJuice 128fa8aec3
Merge pull request #10388 from Dentomologist/android-fix-unused-variable-warning
[Android] Fix unused variable warning
2022-02-20 18:56:50 +01:00
JosJuice 2273742f9e Android: Get rid of LegacyBooleanSetting 2022-02-20 14:00:48 +01:00
JosJuice 90c576e075 Use config changed callback to detect SD insertion/ejection
This saves the GUI from having to manually call SDIO_EventNotify.
With that out of the way, we can let users change the
"Insert SD Card" setting on Android while a game is running.
2022-02-20 10:55:55 +01:00
Dentomologist d20f3c9e64 Debugger: Fix warning on Debian builder
Fix "braces around scalar initializer [-Wbraced-scalar-init]" warning
2022-02-19 08:50:15 -08:00
Mai M db0ca3fc96
Merge pull request #10463 from JosJuice/android-remove-legacyintsetting
Android: Get rid of LegacyIntSetting
2022-02-18 17:26:19 -05:00
JosJuice 1b76171a27 Android: Get rid of LegacyIntSetting
The only settings that were using LegacyIntSetting are now in the new
config system, so there's no reason to have LegacyIntSetting anymore.
2022-02-18 22:17:39 +01:00
Léo Lam bb7475ee2a
Merge pull request #10429 from Zopolis4/mapurge
Remove the Maps folder from the Sys directory
2022-02-18 21:40:09 +01:00
Léo Lam 0c78167404
Merge pull request #10443 from JosJuice/port-wiimote-source
Port Wiimote source settings to the new config system
2022-02-18 21:38:02 +01:00
JosJuice aff45c91fc Port Wiimote source settings to the new config system
This lets us finally get rid of BootManager's ConfigCache!
2022-02-18 21:27:10 +01:00
JosJuice 9ebfdff6b4
Merge pull request #10423 from Pokechu22/improperly-exclusive-radio-buttons
Fix improperly exclusive radio buttons
2022-02-18 21:20:14 +01:00
JosJuice 35b436bd6b
Merge pull request #10377 from Pokechu22/warning-fixes-jan-2022
Fix several compile warnings on GCC
2022-02-18 21:05:42 +01:00
Léo Lam 92455f7cef
Merge pull request #10446 from AdmiralCurtiss/unbreak-shift
HotkeyManager: Change defaults for GBA hotkeys so they don't conflict with common keyboard mappings.
2022-02-18 19:09:36 +01:00
Léo Lam eb98bcd2ae
Merge pull request #10455 from Pokechu22/directly-map-fifo-breakpoint
CommandProcessor: Add FIFO_BP_LO/HI to directly_mapped_vars
2022-02-18 18:54:06 +01:00
Léo Lam fa059b20ba
Merge pull request #10460 from Dentomologist/convert_option_type_to_enum_class
VideoCommon: Convert OptionType to enum class
2022-02-18 18:40:59 +01:00
Léo Lam 067fbe8f86
Merge pull request #10376 from shuffle2/uidctor
GXPipelineUid: remove explicit shallow copy where it's the default
2022-02-18 18:39:59 +01:00
Mai M 8b0c6af75a
Merge pull request #10459 from Dentomologist/convert_movie_playmode_to_enum_class
Movie: Convert PlayMode to enum class and move to cpp file
2022-02-18 10:00:33 -05:00
Mai M 1e126d23e6
Merge pull request #10457 from Pokechu22/movie-no-pause-menubar-desync
Fix menu bar becoming desynced when Pause at End of Movie is disabled
2022-02-18 09:59:32 -05:00
Techjar 63181f0446 ShaderGenCommon: Add missing <functional> include 2022-02-18 06:34:01 -05:00
Dentomologist edbe202aa3 VideoCommon: Convert OptionType to enum class 2022-02-17 10:03:08 -08:00
Dentomologist f56251168e Movie: Convert PlayMode to enum class and move to cpp file 2022-02-16 16:04:36 -08:00
Merry be81fe86e1 JitRegister: Use fmt
Prefer fmt to printf-style formatting.
2022-02-16 20:09:38 +00:00
Pokechu22 a81b44f697 Fix menu bar becoming desynced when Pause at End of Movie is disabled
Previously, when Pause at End of Movie was disabled, the game would continue running as it should, but the menu bar would think the game was paused, showing the play button instead of the pause button.  To make things worse, clicking the play button would then restart the game, instead of pausing or doing nothing.  F10 paused/unpaused as normal, though.

The old behavior was essentially to enable stepping/pause mode (via `CPU::Break()`) and then if Pause at End of Movie was disabled, to un-pause on the host thread (via `CPU::EnableStepping(false)`).  For reasons which aren't entirely clear to me, the first one notified the menu bar (through the `Host::UpdateDisasmDialog` callback, not the `Settings::EmulationStateChanged` one), and the second did not.  In any case, this approach does not particularly make sense; I don't see any reason to pause and unpause if Pause at End of Movie is disabled; instead, we should only pause when Pause at End of Movie is enabled.

This behavior was probably introduced in c1944f623b, though I haven't tested it.
2022-02-16 11:07:12 -08:00
Pokechu22 68d987bbee CommandProcessor: Add FIFO_BP_LO/HI to directly_mapped_vars
directly_mapped_vars was added in #69 (4129b30494), but for some reason FIFO_BP_LO/HI were split out from it in in #885 (65af90669b).  As far as I can tell, this code (and the code that existed at the time) is identical, so there's no reason to have it handled separately.
2022-02-15 22:34:31 -08:00
Zopolis4 5e4d1f732d
Remove the Maps folder from the Sys directory
It only had two out of date and game-specific maps from decades ago
2022-02-16 12:32:25 +11:00
Admiral H. Curtiss ffbe6cb21f
MemArena: Keep fastmem region mapped on Linux. 2022-02-14 22:14:41 +01:00
JosJuice 20b2300ce1 PPCAnalyst: Count outputs as being in use
In a code block where a guest register is accessed at least twice and the
last access is a write and the register is not discardable immediately
after the second-to-last instruction (perhaps there is an instruction
in between that can cause an exception), currently Dolphin's JITs will
flush the register after the second-to-last instruction.

It would be better if we replaced the flush after the second-to-last
instruction with a flush that only happens if the exception path is
taken. This change accomplishes that by marking guest registers as
"in use" not just when they are used as inputs but also when they are
used as outputs, preventing the loop in DoJit from flushing the
register until after the last access.
2022-02-14 22:09:21 +01:00
Admiral H. Curtiss 4a9553bf6d
MemArena: Load UnmapViewOfFileEx dynamically to restore Windows 7 support. 2022-02-14 21:57:18 +01:00
Admiral H. Curtiss 3a4de2b306
MemArena: Use Common::DynamicLibrary for m_api_ms_win_core_memory_l1_1_6_handle. 2022-02-14 21:57:15 +01:00
JosJuice fd511a689f Jit: Skip redundant flushes
This makes codegen faster (by perhaps 10-20% in the case of Jit64,
I didn't measure too closely), which helps speed up NBA Live 2005
a little. But the game still has serious performance issues.
2022-02-14 19:17:59 +01:00
Pokechu22 d2ebbfb91a GDB Stub: Make s_socket_context static 2022-02-13 14:38:59 -08:00
Pokechu22 50d9349926 Fix integer sign difference comparison warnings 2022-02-13 14:38:59 -08:00
Pokechu22 5f9e04be1d DSPJit: Suppress offsetof conditionally-supported warnings
The DSP JIT only applies on x64, so if it doesn't work on esoteric compilers then that's not a problem.  (And if it fails to compile, then it'll still produce an error on that platform, just no warnings on other platforms)
2022-02-13 14:38:59 -08:00
Pokechu22 15f80f7234 MathUtil: Mark lo in SaturatingCast as [[maybe_unused]]
It's unused in the case that T is unsigned and dest is signed (e.g. SaturatingCast<int, size_t> which appears SetIsoPaths in MainSettings.cpp)
2022-02-13 14:38:59 -08:00
Pokechu22 a6d516dc94 Fix shadowing variables in labmdas
GCC generates warnings about these, although the variable being shadowed is not captured by the lambda.
2022-02-13 14:38:59 -08:00
Pokechu22 0e23dfbb25 FifoDataFile: Stop ignoring size
The size variable started to be unused when I created std::array variants of ReadArray, but we should follow it in case any files have fewer registers stored than they should (otherwise the remaining registers would end up with garbage data from later in the fifolog).  Though, there probably aren't many fifologs where this is relevant.
2022-02-13 14:38:59 -08:00
Pokechu22 a720596771 GDB Stub: Fix typo mixing ppcState.spr and ppcState.sr
This resulted in an out-of-bounds array access, since sr is only 16 entries long and SPR_IBAT0U evaluates to 528.
2022-02-13 14:38:59 -08:00
Pokechu22 3b5faf90f3 FifoAnalyzer: Fix "enumeration value ‘NotPresent’ not handled in switch" warning 2022-02-13 14:38:59 -08:00
Pokechu22 7c91acb000
Merge pull request #10449 from Pokechu22/unknown-opcode-log
CommandProcessor: Move unknown opcode log message before the panic alert and log ignored unknown opcodes at warn level
2022-02-13 14:37:06 -08:00
JMC47 86dbf768b9
Merge pull request #10447 from JosJuice/resetcodeptr-on-decrement
Common/CodeBlock: Call ResetCodePtr when decreasing region_size
2022-02-13 17:25:11 -05:00
Pokechu22 07578d8f1d CommandProcessor: Log ignored unknown opcodes at warn level
Large amounts of logging can have an impact on performance, so moving the ones that have been determined to not matter to the warn level gives a way to hide those messages without hiding actual errors (and also gives a fast visual way of distinguishing between ignored and non-ignored ones due to the different colors).
2022-02-13 14:16:05 -08:00
Pokechu22 4ea9287a09 CommandProcessor: Move unknown opcode log message before the panic alert
This way, the extra information is already in the log by the time the panic alert appears, which is slightly more convenient for debugging.
2022-02-13 14:15:54 -08:00
Pokechu22 97482a61c6 CommandProcessor: Ignore unknown opcode for 0x3f 2022-02-12 23:38:20 -08:00
Pokechu22 68cdceb4be CommandProcessor: Log PC and LR on unknown opcodes 2022-02-12 23:38:20 -08:00
Pokechu22 095803d1e9 CommandProcessor: Move contents of second unknown opcode panic alert to the log
This way, the information is always available, and users don't have to deal with a wall of meaningless information.
2022-02-12 23:38:19 -08:00
Pokechu22 1c74867c71 GPFifo: Make s_gather_pipe size new constant GATHER_PIPE_EXTRA_SIZE 2022-02-12 23:38:19 -08:00
Pokechu22 55f8aa9921 VideoCommon/Fifo: Use GPFifo::GATHER_PIPE_SIZE instead of magic 32 2022-02-12 23:38:19 -08:00
Pokechu22 9ffe9d3dc1 CommandProcessor: Remove redundant GATHER_PIPE_SIZE constant 2022-02-12 16:17:03 -08:00
Pokechu22 ce52ea35ec Jit: Replace magic 32 with GPFifo::GATHER_PIPE_SIZE 2022-02-12 16:14:05 -08:00
Pokechu22 f2f9df7541 Remove unused includes of QButtonGroup 2022-02-12 11:40:53 -08:00
Pokechu22 0daee4fe9f CheatSearchFactoryWidget: Set QButtonGroup's parent 2022-02-12 11:40:53 -08:00
Pokechu22 99b3ac21e4 NewBreakpointDialog: Fix improperly behaving radio buttons 2022-02-12 11:40:53 -08:00
Pokechu22 a05dd6b7e6 MemoryWidget: Fix improperly behaving radio buttons 2022-02-12 11:40:53 -08:00
JosJuice 989bdb8d6d Common/CodeBlock: Call ResetCodePtr when decreasing region_size
Fixes https://bugs.dolphin-emu.org/issues/12827.

A description of what was going wrong:

JitArm64::Init first calls CodeBlock::AllocCodeSpace, after which
CodeBlock and Arm64Emitter consider us to have 96 MB of code space
available. JitArm64::Init then calls AddChildCodeSpace, which is
supposed to take 64 MiB of that space and give it to m_far_code.
CodeBlock's view of how much space there is gets updated from 96 MiB
to 32 MiB, but due to the missing call, Arm64Emitter keeps thinking
that it has 96 MiB of space available.

The last thing JitArm64::Init does is to call ResetFreeMemoryRanges.
This function asks Arm64Emitter how much code space is available and
stores a range of that size in m_free_ranges_near, meaning that
m_free_ranges_near ends up being backed by both nearcode and farcode!
This is a ticking time bomb; as soon as we grab memory from
m_free_ranges_near which is backed by farcode, we're in trouble.
The crash I ran into in my testing was caused by fastmem code being
allocated in farcode (our backpatch handler only handles accesses made
from nearcode), but you may as well get errors caused by code intended
for nearcode overwriting code intended for farcode or vice versa.

So why did NBA Live 2005 crash when most games had no problems,
and why was the bug bisected to the commit that increased the size
of far code from 16 MiB to 64 MiB? Well, as long as we're only
using the first 32 MiB of the big 96 MiB range, everything works.
What happens with NBA Live 2005 (I have not investigated exactly
through what mechanism this happens) is that at some point the range
in m_free_ranges_near gets split into two ranges, one which is
backed by nearcode and one which is backed by farcode. Dolphin
prefers to select the biggest range available (we don't want to
pick a tiny 1 KiB range that may not be able to fit the whole block
we're about to emit, after all), and after increasing the size of
farcode to 64 MiB, farcode is bigger than nearcode.
2022-02-12 17:51:32 +01:00
JMC47 466bb17e55
Merge pull request #10445 from JosJuice/android-riivolution-path
Android: Fix the logic for getting the Riivolution path
2022-02-11 08:26:13 -05:00
JMC47 9214174bb3
Merge pull request #10435 from AdmiralCurtiss/savestate-crash
Core/State: Add some multithreading protections.
2022-02-11 06:28:46 -05:00
JMC47 9d69ca8850
Merge pull request #10386 from JosJuice/gba-save-dir-cond
Don't create GBA saves dir when building without mGBA
2022-02-11 06:27:43 -05:00
JMC47 30a9777c5a
Merge pull request #10394 from Pokechu22/alpha-1-blend
Revert TEV alpha lerp change and special-case alpha=1 in blending
2022-02-11 06:26:35 -05:00
Admiral H. Curtiss af36b6c055
HotkeyManager: Change defaults for GBA hotkeys so they don't conflict with common keyboard mappings. 2022-02-10 17:30:23 +01:00
JMC47 a6f9dd5a83
Merge pull request #9544 from AdmiralCurtiss/fastmem-placeholder-windows
MemArena: Use memory placeholders for fastmem on Windows to ensure nothing allocates within the fastmem space.
2022-02-09 16:46:15 -05:00
JosJuice 5dd07f73d4 Android: Fix the logic for getting the Riivolution path
There is a Load path setting, so the Load part can't just be hardcoded.
2022-02-09 21:43:52 +01:00
Pokechu22 444f6fd0cb Treat alpha as 0 if alpha is 1 for blending
This removes the white box in fortune street again, without causing Mario Kart Wii to regress.
2022-02-08 15:15:15 -08:00
Pokechu22 0327e6acb4 Use the same logic for lerp bias for color and alpha
It doesn't make sense for alpha to add the bias ONLY when dividing by 2, while color doesn't apply the bias for divide by 2 only; hardware testing indicates that alpha should have the bias.

This fixes the menus in Mario Kart Wii (https://bugs.dolphin-emu.org/issues/11909) but reintroduces the white rectangle in Fortune Street.

This reverts commit 5aaa5141ed (and several other matching changes elsewhere).
2022-02-08 15:15:15 -08:00
OatmealDome a9b5188047 OGLMain: Set default value for bSupportsSettingObjectNames 2022-02-08 14:53:51 -05:00
OatmealDome bdc55f9557 RenderState: Set source and destination alpha factors in logic op workaround 2022-02-07 16:03:22 -05:00
Admiral H. Curtiss 79405de103
MemArena: Use placeholders on Windows. 2022-02-06 18:06:04 +01:00
Admiral H. Curtiss 73311694b0
Core/State: Guard g_save_thread with a mutex. 2022-02-05 21:50:37 +01:00
Admiral H. Curtiss 56ea1c1d74
Core/State: Guard SaveAs() and LoadAs() with a mutex. 2022-02-05 21:50:34 +01:00
Admiral H. Curtiss 09a0ba06c0
Merge pull request #10417 from jordan-woyak/libavformat-59-build-fix
VideoCommon/FrameDump: Build fix for libavformat major version 59 and newer.
2022-02-04 20:42:34 +01:00
Mai M ec20e4aa99
Merge pull request #10433 from Simonx22/android-optimize-imports
Android: Optimize imports
2022-02-04 01:04:44 -05:00
Mai M 40cda23491
Merge pull request #10404 from iwubcode/vulkan_headers_update
Externals / Vulkan: update Vulkan headers to v1.3.204
2022-02-04 01:04:29 -05:00
Simonx22 942da3ce5f Android: Optimize imports 2022-02-03 11:05:36 -05:00
JMC47 5e59561637
Merge pull request #10425 from JosJuice/android-import-path-traversal
Android: Fix path traversal when importing user data
2022-02-01 04:18:33 -05:00
JMC47 44dabc6c2e
Merge pull request #10424 from JosJuice/android-export-empty-folders
Android: Include empty folders when exporting user data
2022-02-01 01:12:17 -05:00
JosJuice 8aef3e4711 Android: Fix path traversal when importing user data 2022-01-31 21:02:26 +01:00
JosJuice e97fd2f19d Android: Include empty folders when exporting user data
I think users will have a hard time figuring out where to place
texture packs and Riivolution mods and so on without this.
2022-01-31 20:55:06 +01:00
JMC47 4d1e6ff76a
Merge pull request #10422 from OatmealDome/opengl-shader-crash
VideoConfig: Add flag for whether the system supports setting object names
2022-01-31 01:25:46 -05:00
OatmealDome 8be3572c83 D3D12: Assume support for setting object names 2022-01-31 01:17:40 -05:00
OatmealDome 73d957f65c D3DMain: Assume support for setting object names 2022-01-31 01:17:40 -05:00
OatmealDome 4c7fe45475 VKShader: Only set shader name if supported 2022-01-31 01:17:40 -05:00
OatmealDome 28f3cb3d97 VKTexture: Only set texture name if supported 2022-01-31 01:17:40 -05:00
OatmealDome a8ce71fcd4 VulkanContext: Set bSupportsSettingObjectNames based on extension initialization result 2022-01-31 01:17:40 -05:00
OatmealDome 801897467c VulkanEntryPoints: Make vkSetDebugUtilsObjectNameEXT an instance function 2022-01-31 01:17:40 -05:00
OatmealDome a720083a7e Revert "Vulkan: Check for vkSetDebugUtilsObjectNameEXT before using it"
This reverts commit 2ab66390f8.
2022-01-31 01:17:40 -05:00
OatmealDome b36c866398 OGLTexture: Only set texture name if supported 2022-01-31 01:17:40 -05:00
OatmealDome ea1ac73c38 OGLShader: Only set shader name if supported 2022-01-31 01:17:40 -05:00
OatmealDome 390cc13834 OGLRender: Set object name support on GL >4.3 and GL ES 3.2 2022-01-31 01:17:40 -05:00
OatmealDome 947b562e06 VideoConfig: Add flag for whether the system supports setting object names 2022-01-31 01:17:37 -05:00