Commit Graph

1489 Commits

Author SHA1 Message Date
JMC47 ec8257ebe1
Merge pull request #9794 from Filoppi/fix_input_focus_bug
Fix input focus checks being wrong (issue 12540)
2021-06-07 20:08:09 -04:00
Dentomologist a2e1ddc354 AudioPane: Remove main layout vertical stretching 2021-06-07 15:57:02 -07:00
Léo Lam edc18e60ad
Merge pull request #9785 from Dentomologist/fix_gamelist_grid_zoom_in
GameList: Fix grid mode zoom keybind inconsistency
2021-06-07 14:00:21 +02:00
Filoppi 7c83b745c5 Qt: fix input focus checks being wrong
When rendering to main and going full screen, we aren't using the main window handle
as the code assumed, but the other, detached, render widget.
2021-06-07 14:35:59 +03:00
Filoppi 83ea16f402 Qt: Fix IOWindow keeping a shared ptr to devices even after them being removed by the ControllerInterface
this prevented some devices from being recreated correctly, as they were exclusive (e.g. DInput Joysticks)

This is achieved by calling Settings::ReleaseDevices(), which releases all the UI devices shared ptrs.
If we are the host (Qt) thread, DevicesChanged() is now called in line, to avoid devices being hanged onto by the UI.
For this, I had to add a method to check whether we are the Host Thread to Qt.

Avoid calling ControllerInterface::RefreshDevices() from the CPU thread if the emulation is running
and we manually refresh devices from Qt, as that is not necessary anymore.

Refactored the way IOWindow lists devices to make it clearer and hold onto disconnected devices.
There were so many issues with the previous code:
-Devices changes would not be reflected until the window was re-opened
-If there was no default device, it would fail to select the device at index 0
-It could have crashed if we had 0 devices
-The default device was not highlighted as such
2021-06-07 11:48:30 +03:00
Admiral H. Curtiss 441d304317 CheatsManager: Use game information directly from SConfig, and only recreate widgets if game changes. 2021-06-06 21:56:34 +02:00
Admiral H. Curtiss 414e0f4598 GeckoCodeWidget: Take game ID and revision directly instead of through GameFile. 2021-06-06 21:25:37 +02:00
Admiral H. Curtiss 1fbe56210a ARCodeWidget: Take game ID and revision directly instead of through GameFile. 2021-06-06 21:23:17 +02:00
Dentomologist 7a6098a7f6 GameList: Fix grid mode zoom keybind inconsistency
Add keybind to make 'control plus' zoom in as per convention, and also
'control shift minus' zoom out to maintain consistency.
2021-06-06 09:21:41 -07:00
JMC47 45a5c9cc04
Merge pull request #9697 from Filoppi/cursor_locking
Implement Cursor Locking and input focus checks for it
2021-05-27 11:42:35 -04:00
Filoppi 3c7c2dfaa1 Implement Cursor Locking and new input focus checks for it 2021-05-27 10:31:12 +03:00
Scott Mansell 37e532322b Port dump XFB option to Qt UI.
Looks like the option was added to the Wx UI at commit 198d3b69, which
was a few months after the advancedWidget was originally ported from
Wx to Qt, but before anyone was actually using Qt.
2021-05-27 12:48:36 +12:00
Léo Lam 51671921c4
Merge pull request #9441 from skylersaleh/master
Apple M1 Support for MacOS
2021-05-24 12:39:01 +02:00
Filoppi 93e3e691f9 Expose Control Expression variables to mappings UI
-add a way to reset their value (from the mappings UI)
-fix "memory leak" where they would never be cleaned,
one would be created every time you wrote a character after a "$"
-fix ability to create variables with an empty string by just writing "$" (+added error for it)
-Add $ operator to the UI operators list, to expose this functionality even more
2021-05-24 02:38:06 +03:00
JMC47 975f8e2a25
Merge pull request #9700 from Filoppi/simplify_mappings_preview
Simplify the preview of control mappings by removing the device path from controls
2021-05-23 14:44:38 -04:00
Techjar a33593baf7 Qt/GeneralPane: Refresh widget state on config change
This fixes a nasty issue where you can change the Dual Core setting
during emulation, if it has been overridden by GameINI or NetPlay, by
simply changing any of the non-disabled settings. This is because
changing any of the settings will write all of them to the config.

This issue is particularly nasty because managing to disable Dual Core
during emulation, and then stopping it, results in the emulator core
being totally deadlocked. It's impossible to recover from this state,
and Dolphin will remain as a zombie process on the system, consuming
resources and holding locks, until forcibly killed.
2021-05-23 01:39:35 -04:00
Skyler Saleh 8cb86e7ae0 Apple M1: Enable hardened runtime
- Fixed error that was causing the hardened runtime from being enabled
- Refactored BuildMacOSUniversalBinary.py based on code style recommendations
2021-05-22 15:25:18 -07:00
Skyler Saleh 948764d37b Apple M1: Build, Analytics, and Memory Management
Analytics:
- Incorporated fix to allow the full set of analytics that was recommended by
  spotlightishere

BuildMacOSUniversalBinary:
- The x86_64 slice for a universal binary is now built for 10.12
- The universal binary build script now can be configured though command line
  options instead of modifying the script itself.
- os.system calls were replaced with equivalent subprocess calls
- Formatting was reworked to be more PEP 8 compliant
- The script was refactored to make it more modular
- The com.apple.security.cs.disable-library-validation entitlement was removed

Memory Management:
- Changed the JITPageWrite*Execute*() functions to incorporate support for
  nesting

Other:
- Fixed several small lint errors
- Fixed doc and formatting mistakes
- Several small refactors to make things clearer
2021-05-22 15:25:17 -07:00
Skyler Saleh 4ecb3084b7 Apple M1 Support for MacOS
This commit adds support for compiling Dolphin for ARM on MacOS so that it can
run natively on the M1 processors without running through Rosseta2 emulation
providing a 30-50% performance speedup and less hitches from Rosseta2.

It consists of several key changes:

- Adding support for W^X allocation(MAP_JIT) for the ARM JIT
- Adding the machine context and config info to identify the M1 processor
- Additions to the build system and docs to support building universal binaries
- Adding code signing entitlements to access the MAP_JIT functionality
- Updating the MoltenVK libvulkan.dylib to a newer version with M1 support
2021-05-22 15:25:17 -07:00
Mai M 9312e45cbe
Merge pull request #9687 from Dentomologist/fix_config_descriptions_grammar
Fix config descriptions grammar
2021-05-20 11:15:25 -04:00
Mai M fb43aaf513
Merge pull request #9720 from Techjar/move-netsettings
NetPlay: Move NetSettings initialization to backend
2021-05-20 10:19:03 -04:00
JosJuice a29660a2c7 Fixes to translatable strings
Sending an empty string to the translation system will not
result in getting an empty string back, but rather a description
of the currently loaded translations file. So empty strings
should not be marked as translatable.

Also adding some i18n comments and rewording a string I thought
was hard to understand.
2021-05-20 11:35:01 +02:00
Filippo Tarpini e6057c5f62 Qt: avoid queuing ConfigChanged() more than once 2021-05-20 00:30:14 +03:00
Techjar 171aad50cc NetPlay: Move NetSettings initialization to backend
It doesn't really belong in frontend code, and this change will make it
easier to eventually support NetPlay on other UI frameworks.
2021-05-19 06:34:24 -04:00
JMC47 736de8abf6
Merge pull request #9527 from sepalani/watch-items
WatchWidget: Add new/delete/clear toolbar items
2021-05-18 04:08:58 -04:00
JMC47 678e035126
Merge pull request #9678 from Filoppi/tooltips_style
Make all Qt ToolTips look similar to BalloonTips
2021-05-17 16:40:49 -04:00
iwubcode 04a635e884 DolphinQt: fix Visual Studio warning about 'assignment within conditional expression' 2021-05-15 14:39:03 -05:00
iwubcode 05b1566e3f DolphinQt: don't propagate warnings in the header to Dolphin when building with Visual Studio through CMake 2021-05-15 14:39:03 -05:00
Mat M d74a1068b8
Merge pull request #9540 from Pokechu22/better-fifo-analyzer-part-2
Fifo analyzer quality of life improvements
2021-05-14 15:51:53 -04:00
JMC47 16e91172b1
Merge pull request #9668 from leoetlino/windows-cmake-fixes
CMake: minor Windows fixes
2021-05-14 08:22:11 -04:00
Scott Mansell 9f91fb6447
Merge pull request #9688 from Filoppi/input_cleanup
Input cleanup
2021-05-14 20:51:33 +12:00
Dentomologist 5a688b74a7 GeneralWidget: Fix Backend description grammar
Unify Backend description string for Windows and other platforms.
2021-05-12 10:50:10 -07:00
Dentomologist b9c1f4921c GeneralWidget: Fix Log Rendertime description grammar 2021-05-12 10:50:10 -07:00
Filoppi f3ffac0058 Qt: add tooltip to MappingBool
Tooltip code is identical to MappingDouble and the tooltips (UI description)
are present in the underlying setting object.
2021-05-12 18:27:24 +03:00
Filoppi f4fec42165 Add mixed comments to input code, make some tooltip clearer 2021-05-12 18:27:23 +03:00
Filoppi 0d23acc831 Qt: simplify the preview of control mappings/expressions by removing their device path
and replacing it with a ":" prefix. Also remove white spaces and \n \t \r.

bugfix: fix EmulatedController::GetStateLock() not being aquired when reading the
expression reference
bugfix: MappingButton::UpdateIndicator() calling State(0) on outputs, breaking ongoing
rumbles if a game was running
Improvement: make expressions previews appear in Italic if they failed to parse correctly
2021-05-11 12:20:37 +03:00
Pokechu22 77b1cca987 Separate vertex components by spaces 2021-05-07 15:42:26 -07:00
Pokechu22 73f4e57006 Add name and description for primitives 2021-05-07 15:42:26 -07:00
Pokechu22 df77a687e8 Add descriptions for GX_LOAD_INDX_A/B/C/D 2021-05-07 15:42:26 -07:00
Pokechu22 1a3d2c3211 Coalesce NOPs 2021-05-07 15:42:25 -07:00
Pokechu22 2ddf2c3ba2 Update and clear the description on each object change
Since the description updating is tied to the selection changing on the detail list, and the detail list is recreated on each object change, behavior was somewhat broken.  Clearing the list changed the current row to zero, but nothing else (particularly m_object_data_offsets) had been updated, so the description was not necessarily correct (this is easier to observe now since the vertex data is at the end, so it's easier to get different lengths of register updates).  Furthermore, subsequent clears did not update the current row since there was no visible selection, so it only changed the description once.  The current row is now always set to zero, which forces an update (and also scrolls the list back to the top).  The presence of FRAME_ROLE and OBJECT_ROLE are also checked so that the description is cleared if no object is selected.
2021-05-07 15:42:22 -07:00
Pokechu22 dbacf68b79 Improve FIFO analyzer search function
- Only one search result is generated per command/line, even if there are multiple matches in that line.
- Pressing enter on the edit field begins a search, just like clicking the begin button.
- The next and previous buttons are disabled until a search is begun.
- The search results are cleared when changing objects or frames.
- The previous button once again works (a regression from the previous commit), and the register updates and graphics data for the correct object are searched.
- currentRow() never returns -1, so checking that is unnecessary (and misleading).
- The 'Invalid search parameters (no object selected)' previously never showed up before because FRAME_ROLE is present if and only if OBJECT_ROLE is present.
2021-05-07 15:42:21 -07:00
Pokechu22 1dc3ff5879 Show register updates before primitive updates
This also shows the register updates for object 0, which were previously not visible(!)
2021-05-07 15:42:20 -07:00
Pokechu22 83f7c41e31 Make the FIFO Player a separate window
This way, it can be focused with the render window behind it, instead of having the main window show up and cover the render window.  This is useful for adjusting the object range, among other things.
2021-05-07 15:42:19 -07:00
Pokechu22 05bd15a928 Clear m_object_data_offsets first and require it before UpdateDescription
It still tries to update the description on clearing, potentially with bad data.
2021-05-07 15:42:19 -07:00
Pokechu22 28b71c65af Fix same object count being used for all frames in the FIFO analyzer
If the number of objects varied, this would result in either missing objects on some frames, or too many objects on some frames; the latter case could cause crashes.  Since it used the current frame to get the count, if the FIFO is started before the FIFO analyzer is opened, then the current frame is effectively random, making it hard to reproduce consistently.

This issue has existed since the FIFO analyzer was implemented for Qt.
2021-05-07 15:42:18 -07:00
Pokechu22 a557230dea Fix crash when attempting to analyze a FIFO after stopping playback 2021-05-07 15:42:18 -07:00
Pokechu22 58333d6feb Make FIFO frame count inclusive
The 'zero frames in the range' check can be removed because now there is always at least 1 frame; of course that might be the same frame over and over again, but that's still useful for e.g. Free Look (and the 1 frame repeating effect already occurred when frame count was exclusive).
2021-05-07 15:42:18 -07:00
Pokechu22 263ca79aae Adjust FIFO player object ranges
A single object can be selected instead of 2 (it was already inclusive internally), and the maximum value is the highest number of objects in any frame (minus 1) to reduce jank when multiple frames are being played back.
2021-05-07 15:42:17 -07:00
Pokechu22 5ebe63b175 Reset the from frame/object to 0 on starting FIFO playback
Now that this is only called when playback actually starts (and not on unpausing), this change makes the experience a bit better (no more missing objects from not having reset the from object after changing FIFOs).
2021-05-07 15:42:17 -07:00
Pokechu22 3436a92ea5 Don't reset the FIFO frame/object limit when unpausing 2021-05-07 15:42:17 -07:00
Léo Lam 049b92b7ef
Merge pull request #9417 from Filoppi/input-1
Fix FPS counter and Game Window speed % breaking on pause/unpause
2021-05-07 15:08:01 +02:00
Léo Lam 8547de2593
Merge pull request #9615 from Dentomologist/updater_documentation
Updater: Add code documentation
2021-05-07 15:05:14 +02:00
Filoppi 818672b585 Fix FPS counter and Game Window speed % breaking on pause/unpause
-Add pause state to FPSCounter.
-Add ability to have more than one "OnStateChanged" callback in core.
-Add GetActualEmulationSpeed() to Core. Returns 1 by default. It's used by my input PRs.
2021-05-06 01:10:04 +03:00
JMC47 21113e5839 This removes a delay for input mapping.
It was causing more harm than good for users.  Anyone doing complex
expressions is already using the advanced editor for more control over
it.
2021-05-02 15:27:11 -04:00
Léo Lam ade9d6c954
Merge pull request #9679 from JosJuice/disable-verify
DolphinQt: Disable verify button when emulation is running
2021-05-02 10:52:46 +02:00
JosJuice 55ef1069f1 DolphinQt: Disable verify button when emulation is running
Verifying a Wii game creates an instance of IOS, and Dolphin
can't handle more than one instance of IOS at the same time.
Properly supporting it is probably more effort than it's worth.

Fixes https://bugs.dolphin-emu.org/issues/12494.
2021-04-28 21:58:07 +02:00
Filoppi 4f53adc331 Qt: make all tooltips look similar to balloon tips (and share parts of their code) 2021-04-28 21:20:39 +03:00
Léo Lam 20301592ad
Merge pull request #9677 from iwubcode/profile-drop-down
DolphinQt: fix input profile drop down not resizing
2021-04-27 14:01:12 +02:00
Léo Lam ae67a9382b
CMake: Put the *.mo files directly in the correct output dir
Avoids the need to copy the *.mo files manually *and* more importantly
this ensures that the mo files are always recreated if the build
output directory is cleared.
2021-04-27 12:54:18 +02:00
Léo Lam e71aef6768
CMake: Ask windeployqt not to copy DLLs that are unnecessary
* no-system-d3d-compiler: d3dcompiler_47.dll
* no-angle, no-opengl-sw: libEGL.dll, libGLESv2.dll
2021-04-27 12:54:18 +02:00
Léo Lam f6b8d4758e
CMake: Copy license.txt to output folder to match existing Win builds 2021-04-27 12:54:18 +02:00
iwubcode 626c686fee
DolphinQt: update device drop down size policy so that the input profile resizes properly
This also keeps the device profile at a minimum so that it doesn't
completely disappear (which was originally why it was changed to expanding)
2021-04-27 12:50:45 +02:00
Léo Lam 219f66c6e9
Merge pull request #9672 from JosJuice/jit-naming-scheme
DolphinQt/Android: Unify the JIT naming scheme
2021-04-27 12:00:23 +02:00
Léo Lam 08215cc975
DolphinQt: Get rid of an extraneous colon in About dialog 2021-04-27 00:24:24 +02:00
JosJuice a2c8050eba DolphinQt/Android: Unify the JIT naming scheme
I think the AArch64 JIT has come far enough that it doesn't have to
be called experimental anymore.

I'm also labeling the x86-64 JIT as x86-64 for consistence with the
AArch64 JIT. This will especially be helpful if we start supporting
AArch64 on macOS, as AArch64 macOS can run both the x86-64 JIT and
the AArch64 JIT depending on whether you enable Rosetta 2.
2021-04-25 17:19:50 +02:00
Dentomologist e0a8d931fc Updater: Add code documentation Markdown file
Add docs/autoupdate_overview.md which gives an overview of the update
process, and comments pointing to it in autoupdate related files.
2021-04-13 15:37:31 -07:00
Léo Lam 336518049d
WiiUtils: Add helper functions to get emulated/real Bluetooth device
This adds a function to get the emulated or real Bluetooth device for
an active emulation instance. This lets us deduplicate all the
`ios->GetDeviceByName("/dev/usb/oh1/57e/305")` calls that are currently
scattered in the codebase and ensures Bluetooth passthrough is being
handled correctly.

This also fixes the broken check in WiimoteCommon::UpdateSource.
There was a confusion between "emulated Bluetooth" (as opposed to
"real Bluetooth" aka Bluetooth passthrough) and "emulated Wiimote".
2021-04-12 18:16:56 +02:00
Léo Lam 136f59b434
DolphinQt: Fix latent build error on Windows 2021-04-12 18:16:56 +02:00
JosJuice 05a37746b6 Change the names for shader compilation settings 2021-04-10 12:46:49 +02:00
Pokechu22 dad309d365 Disable ICache emulation for some games
Specifically, 'Scooby-Doo! Mystery Mayhem', 'Scooby-Doo! Unmasked', 'Ed, Edd n Eddy: The Mis-Edventures', and the Wii version of 'Happy Feet'.

The JIT cache causes problems with emulated icache invalidation in these games, resulting in areas failing to load.
2021-04-06 12:44:10 -07:00
Léo Lam e89ae71cec
Merge pull request #9388 from JosJuice/default-locale
Set console's default language/country/region based on computer settings
2021-04-06 12:34:58 +02:00
Léo Lam a1ee6ace71
Merge pull request #9620 from Dentomologist/convert_gamelist_col_to_enum_class
Convert GameList col enum to enum class
2021-04-06 12:08:15 +02:00
Pokechu22 004dfd1586 Replace uses of cassert with Common/Assert.h 2021-04-02 10:18:18 -07:00
Dentomologist 601dcfaefd GameList: Rename Column enum members
Remove COL_ prefix and change to TitleCase
2021-04-02 09:17:27 -07:00
Dentomologist b8bd877a41 GameList: Convert columns to enum class 2021-04-02 09:14:31 -07:00
JMC47 ce8e87c64b
Merge pull request #8747 from iwubcode/map-freelook
Support controlling Free Look via input bindings (motion controls, gamepad, etc!)
2021-04-01 01:05:00 -04:00
Silent d4b7ed4e38
GameList: Use titles from the Title Database for shortcut creation
Makes titles consistent with Dolphin's game list
2021-03-27 19:02:27 +01:00
Silent 0fb8f735e5
GameList: Remove invalid characters when creating a desktop shortcut
Fixes shortcut creation for games that have e.g. : in names.
2021-03-27 19:02:27 +01:00
JosJuice 27ddf6382b Set console's default language/country/region based on computer settings 2021-03-27 10:05:26 +01:00
Léo Lam da534c7d75
Merge pull request #9571 from JosJuice/netplay-sync-more-settings
NetPlay: Sync more settings
2021-03-27 01:38:33 +01:00
Léo Lam c915b780cf
Merge pull request #9596 from Minty-Meeo/apply-moar-RunAsCPUThread
Apply More Core::RunAsCPUThread
2021-03-27 01:11:34 +01:00
Pokechu22 e6bd7a8cd5 Open the properties window when alt+enter is used on the game list 2021-03-18 21:51:24 -07:00
Minty-Meeo db7f3f8f25 Apply More Core::RunAsCPUThread
In places where applicable, Core::RunAsCPUThread has replaced Core::SetState workarounds to pause and resume emulation for thread-sensitive operations.
 - void Core::SaveScreenShot()
 - void Core::SaveScreenShot(std::string_view name)
 - void JitInterface::GetProfileResults(Profiler::ProfileStats *prof_stats)
 - void MainWindow::OnExportRecording()
2021-03-18 22:31:28 -05:00
iwubcode 28e880efb6 DolphinQt: update hotkeyscheduler to run at 200hz, giving more precision for FreeLook motion devices 2021-03-18 17:54:12 -05:00
iwubcode f1ce921844 DolphinQt: update FreeLook to use relative input 2021-03-17 20:58:33 -05:00
iwubcode ddba5a3dfa DolphinQt: Add separate Free Look tab for rotation 2021-03-17 20:58:33 -05:00
iwubcode db4b4e40cb InputCommon / DolphinQt / Core: Add a "RelativeMouse" input which provides the raw delta mouse input
Co-authored-by: Jordan Woyak <jordan.woyak@gmail.com>
2021-03-17 20:58:33 -05:00
iwubcode 679d51c289 RenderWidget: Remove mouse based Free Look since it has moved to the HotkeyScheduler 2021-03-17 20:58:33 -05:00
Léo Lam c8d8f9ef85
Merge pull request #9577 from JosJuice/di-unknown-size-hack
DVDInterface: Make the WBFS/CISO hack only affect WBFS/CISO
2021-03-16 11:03:36 +01:00
Léo Lam f36b1cbb2a
Merge pull request #9541 from InusualZ/detecting-rso
Symbols: Fix RSO Modules detection algorithm
2021-03-16 10:33:58 +01:00
Léo Lam 5cea85f008
Merge pull request #9579 from Dentomologist/fix_open_containing_folder
Gamelist: Fix 'Open Containing Folder'
2021-03-16 09:52:46 +01:00
Dentomologist 48273b401e Gamelist: Fix 'Open Containing Folder'
Fix Gamelist context menu item 'Open Containing Folder' opening wrong
target on Windows when game parent folder is [foobar] and grandparent
folder contains file [foobar].bat or [foobar].exe

Add trailing directory separator to parent folder path to force Windows
to interpret path as directory.

Fixes https://bugs.dolphin-emu.org/issues/12411
2021-03-11 12:45:16 -08:00
JosJuice 49ccc77ebb DiscIO: Move some code from DiscExtractor to new file DiscUtils 2021-03-09 20:34:24 +01:00
InusualZ c37d826715 Display a progress bar to notify the user, about the work is being done 2021-03-08 16:22:26 +00:00
InusualZ 490db42e44 Fix detecting rso modules 2021-03-08 16:22:26 +00:00
Dentomologist 7ff8e3367f GraphicsWidget: Remove unused field
Fixes warning on freebsd-x64
2021-03-07 10:10:02 -08:00
JosJuice a9862b5395 NetPlay: Sync more settings 2021-03-07 14:22:53 +01:00
Léo Lam 61198541a0
Merge pull request #9562 from sepalani/dis-icons
Breakpoints: Change icon when disabled
2021-03-07 12:14:12 +01:00
Pokechu22 df81210e96 Use formatters in GetBPRegInfo; add missing commands
BPMEM_TEV_COLOR_ENV + 6 (0xC6) was missing due to a typo.  BPMEM_BP_MASK (0xFE) does not lend itself well to documentation with the current FIFO analyzer implementation (since it requires remembering the values in BP memory) but still shouldn't be treated as unknown.  BPMEM_TX_SETMODE0_4 and BPMEM_TX_SETMODE1_4 (0xA4-0xAB) were missing entirely.
2021-03-06 19:27:20 -08:00