Commit Graph

26590 Commits

Author SHA1 Message Date
Léo Lam f0faf3712d
Merge pull request #10171 from malleoz/fix-frame-advance-speed
Fix swapped frame advance speed increase/decrease
2021-10-16 11:36:07 +02:00
Léo Lam 8195d0bda1
Merge pull request #10144 from malleoz/dsp-onion
Port Main.DSP to MainSettings
2021-10-16 11:32:38 +02:00
sowens99 8ea6bef98f Port Main.DSP to MainSettings
While trying to work on adding audiodump support for CLI, I was alerted that it was important to first try moving the DSP configs to the new config before continuing, as that makes it substantially easier to write clean code to add such a feature.

This commit aims to allow for Dolphin to only rely on the new config for DSP-related settings.
2021-10-15 23:24:46 -04:00
sowens99 ea81346fc3 Fix swapped frame advance speed increase/decrease
Frame Advance Speed hotkeys were swapped. This likely occurred because speed and delay are inverses (i.e. a speed increase should DECREASE the delay and vice versa).
2021-10-15 23:22:22 -04:00
Léo Lam 9a6f0bd9b2
Merge pull request #10168 from JosJuice/jitarm64-gcc-float-null
JitArm64: Work around a GCC warning promoted to error
2021-10-15 23:03:57 +02:00
Léo Lam 7855e5f73b
Turn MAX_LOGLEVEL into a true constant (and fix self-comparison warning)
This replaces the MAX_LOGLEVEL define with a constexpr variable
in order to fix self-comparison warnings in the logging macros
when compiling with Clang. (Without this change, the log level check
in the logging macros is expanded into something like this:
`if (LINFO <= LINFO)`, which triggers a tautological compare warning.)
2021-10-15 21:51:01 +02:00
JosJuice 7c88ca7c4e JitArm64: Work around a GCC warning promoted to error
GCC complains about float_emit being null when inlining
ByteswapAfterLoad into MMIOLoadToReg. ByteswapAfterLoad
does dereference float_emit, but only when passing FLAG_FLOAT,
which MMIOLoadToReg has an assert for and does not support.

Also cleaning up some unnecessarily specified namespaces while
I'm at it.
2021-10-15 21:32:46 +02:00
Léo Lam 6bf10e0276
Merge pull request #10149 from malleoz/audiodump-add-timecode
Add Game ID, timecode to dspdump and dtkdump filenames
2021-10-15 19:42:30 +02:00
JMC47 7d6393332d
Merge pull request #10164 from Pokechu22/per-pixel-lighting-vertex-color
VideoCommon: Fix color channel logic when per-pixel lighting is in use
2021-10-14 14:17:06 -04:00
Fletcher Porter f16e9045a2 Silence the -Wswitch warnings in Tev
The compiler was loudly announcing each and every branch Tev was not checking in
a switch statement, but Tev has learned it's lesson and will produce that
warning no more.
2021-10-13 23:54:06 -07:00
Pokechu22 a372a5947b VideoCommon: Fix color channel logic when per-pixel lighting is in use
This was broken in #10012 (specifically by 06579e4d53 and c3dec34391).
2021-10-13 20:43:32 -07:00
Pokechu22 78bfd25964 Fix all uninitialized variable warnings (C26495) 2021-10-13 12:32:16 -07:00
Pokechu22 525e6b2194 MMU: Replace TryReadResult and TryWriteResult with std::optional 2021-10-13 11:44:28 -07:00
Pokechu22 673f886a7e MMU: Replace uses of cassert with Common/Assert.h 2021-10-13 11:44:28 -07:00
Pokechu22 aacc1a5e49 IOFile: Add std::array functions 2021-10-13 11:44:28 -07:00
JosJuice 25bff91054 Interpreter: Fix NI_div ZX check 2021-10-13 17:42:56 +02:00
JosJuice 9f525d69c8 Jit: Raise program exception on floating point exceptions
This is done entirely through interpreter fallbacks. It would
probably be possible to implement this using host exception
handlers instead, but I think it would be a lot of complexity
for a rarely used feature, so let's not do it for now.

For performance reasons, there are two settings for this feature:
One setting which does enables just what True Crime: New York City
needs and one setting which enables it all. The latter makes
almost all float instructions fall back to the interpreter.
2021-10-13 17:42:56 +02:00
JosJuice 7f7748e181 Interpreter: Raise program exception on floating point exceptions 2021-10-13 17:42:56 +02:00
JosJuice c3bcc67653 PowerPC: Update FEX on FPSCR store instead of FPSCR load
This is needed not only for the next commit, but also for
correctly emulating float instructions that write to CR1.
2021-10-13 17:42:56 +02:00
JosJuice 89a464dafa Interpreter: Optimize FEX calculation
The next commit will make the interpreter run this after every
float instruction, so I think a little optimization here is justified.
2021-10-13 17:42:56 +02:00
JosJuice 83c6df1965 PowerPC: Set SRR1 correctly for program exceptions 2021-10-13 17:42:56 +02:00
sowens99 2aa400e72f Add option for Never Hide Mouse Cursor
Instead of having a single GUI checkbox for "Always Hide Mouse Cursor",
I have instead opted to use radio buttons so the user can swap between
different states of mouse visibility. "Movement" is the default
behavior, "Never" will hide the mouse cursor the entire time the game is
running, and "Always" will keep the mouse cursor always visible.
2021-10-12 21:04:27 -04:00
sowens99 5145853351 Bug: fix unhide on mouse movement only responding to clicks
Previously the unhide of movement mouse_timer reset occurred within case MouseButtonPress.

Additionally, there was a redundant expression in the if statement for cursor locking.
2021-10-12 20:59:31 -04:00
Léo Lam f19da1cf92
Merge pull request #10118 from lioncash/messageid
NetPlayProto: Remove lots of casts to MessageId when inserting enum values into packets
2021-10-13 02:27:52 +02:00
Léo Lam dd936c5072
Merge pull request #10126 from malleoz/l-r-digital-input-display
Include digital L and R buttons in Input Display
2021-10-13 02:06:20 +02:00
Léo Lam c746040112
Merge pull request #10154 from malleoz/disable-hotkeys-on-mapping-window
MappingWindow: disable hotkeys while window is active
2021-10-13 01:58:48 +02:00
Léo Lam 0315fcf934
Merge pull request #10155 from malleoz/toggle-hotkeys-on-qfiledialog
Disable hotkeys on static QFileDialog calls
2021-10-13 01:48:31 +02:00
Léo Lam c2d17f3f17
Merge pull request #10160 from fpdotmonkey/heed-renderwidget-switch-warning
Fix switch warning in RenderWidget
2021-10-13 01:44:24 +02:00
Léo Lam 6c1a625f0d
Merge pull request #10159 from JosJuice/print-callstack-log
Core: Use log variant of PrintCallstack, not print variant
2021-10-13 01:40:07 +02:00
Mai M 6bf467ff4b
Merge pull request #10161 from JosJuice/jitarm64-emitting-routine
JitArm64: Consistently set emitting_routine
2021-10-12 14:34:26 -04:00
JosJuice 26322a54cf JitArm64: Consistently set emitting_routine
Important regression fix for 96760093e9.
2021-10-12 18:55:06 +02:00
JMC47 6987ea0596
Merge pull request #8350 from phire/fix-tmem
Extend Minimal TMEM cache implementation.
2021-10-11 23:11:43 -04:00
Scott Mansell edb66dab84 TextureCache: Remove deleted textures from bound_textures
Fixes issue where vulkan might crash trying to bind a deleted
texture.
2021-10-12 15:51:24 +13:00
Scott Mansell d771bee0fe TMEM: Add some helpful comments 2021-10-12 15:51:24 +13:00
Scott Mansell a33cf27885 TMEM: Handle savestate and init 2021-10-12 15:51:24 +13:00
Scott Mansell 88bd10cd30 Extend TMEM cache implementation
Now works with games that deliberately avoid invalidating TMEM because
they know textures are too large to fit:

 * Sonic Riders
 * Metal Arms: Glitch in the System
 * Godzilla: Destroy All Monsters Melee
 * NHL Slapshot
 * Tak and the Power of Juju
 * Night at the Museum: Battle of the Smithsonian
 * 428: Fūsa Sareta Shibuya de
2021-10-12 15:51:24 +13:00
Fletcher Porter 0a7eed71f3 Fix switch warning in RenderWidget
The compiler was throwing a bunch of `-Wswitch` warnings from RenderWidget
because of unhandled branches, so I added a default branch to quiet it.
2021-10-11 17:18:32 -07:00
JMC47 3bfb3fa52b
Merge pull request #9884 from JosJuice/jitarm64-paired-loadstore-addr
JitArm64: Improve psq_l/psq_st address checking
2021-10-11 16:49:26 -04:00
JosJuice 97a5a7be24 Core: Use log variant of PrintCallstack, not print variant
There are two reasons for this.

1. Using Dolphin's logging system lets the user decide whether
the printout should go to the terminal, the GUI, or a file.
fmt::print always prints to stdout... unless you're on Android, in
which case it does nothing at all, because Android disables stdout.

2. The Windows version of Dolphin crashes when you use fmt::print.
Yes, really. The crash happens because a call to std::fprint in
fmt::v7::detail::fwrite_fully returns that less characters were
written than requested, which fmt handles by throwing an exception.
(As always, Dolphin does not use exception handling.)
I'm not sure why std::fprint is doing this, but since switching
away from using fmt::print is a good idea due to the previous point
anyway, I'd say it's best to just switch.
2021-10-10 17:13:03 +02:00
sowens99 839b04014e Add wrapper function to disable hotkeys for QFileDialog
Previously, if you have "Hotkeys Require Window Focus" disabled, you could repeatedly use the "Open" hotkey, for example, to stack File Open windows over top of each other over and over.

This commit allows the hotkey manager to disable/enable on QFileDialog creation and destruction.
2021-10-09 22:43:56 -04:00
Scott Mansell 5a8455e8ce BoundingBox: Add missing include 2021-10-10 13:21:31 +13:00
Scott Mansell 9fa26624b0 BPMemory: Refactor/consolidate TexUnit Addressing
Currently the logic for addressing the individual TexUnits is splattered all
across dolphin's codebase, this commit attempts to consolidate it all into a
single place and formalise it using our new TexUnitAddress struct.
2021-10-10 09:09:43 +13:00
Scott Mansell ef0e401708 BPMem: Abstract TexUnit Addressing into struct
The addressing of the texture units is a bit non-obvious.
This struct abstracts the complexity away.
2021-10-10 09:01:57 +13:00
iwubcode 514475646d VideoCommon: update Free Look camera's 'FieldOfView' function to 'FieldOfViewMultiplier' to better reflect usage 2021-10-08 18:17:20 -05:00
iwubcode aa07fde8a0 VideoCommon: update fov multiplier variables and add constant variables for defaults to the Free Look camera 2021-10-08 18:17:20 -05:00
iwubcode 0bbea6d67b Core: Update state to account for save system change 2021-10-08 18:17:18 -05:00
iwubcode e70157474b Core / VideoCommon: refactor FreeLookCamera to have the underlying controller handle all the logic (field-of-view, movement, etc) 2021-10-08 18:16:32 -05:00
Léo Lam ff1cb5a1c0
Merge pull request #9803 from Techjar/bbox-videocommon
VideoCommon: Abstract bounding box
2021-10-08 22:24:38 +02:00
sowens99 530f5ecdd0 MappingWindow: disable hotkeys while window is active
MappingWindow is modal, yet the user can use hotkeys while the window is active. I believe hotkeys should not be recognized while this window is active.
2021-10-07 21:39:52 -04:00
Léo Lam d90b30ca25
Merge pull request #10145 from NoNoTeal/master
Import Apple/FFmpeg libraries for AVI dumps on macOS
2021-10-07 08:18:53 +02:00