Commit Graph

442 Commits

Author SHA1 Message Date
Lioncash e4caace6bb Common/IniFile: Move interface into Common namespace
Gets this out of the global namespace and into the Common namespace
2023-04-13 10:19:28 -04:00
Admiral H. Curtiss 9217a9eba4
JitInterface: Refactor to class, move to System. 2023-03-26 14:38:07 +02:00
Shawn Hoffman 0a8725e4a9 updater: add test for update flow
currently windows-only
2023-03-11 12:58:33 -08:00
Admiral H. Curtiss 655cc7f75c
DiscIO: Add support for CleanRip-style split ISOs. 2023-03-05 19:23:55 +01:00
JosJuice 7586fc8134
Merge pull request #11608 from Dentomologist/fix_dynamicinputtextures_directory_error_logs
UICommon: Create Load/DynamicInputTextures directory on startup
2023-02-27 18:07:57 +01:00
Dentomologist e62162e486 UICommon: Create Load/DynamicInputTextures directory on startup
Fix console error spam on Dolphin and game startup if the directory
doesn't exist.
2023-02-26 13:10:15 -08:00
Admiral H. Curtiss 1ed0e014cd
Migrate non-destructive calls of File::CopyDir() to File::Copy(). 2023-02-24 20:32:19 +01:00
Mai 6f21ce7d95
Merge pull request #11555 from CookiePLMonster/wil-todos
Address WIL todos in UICommon.cpp
2023-02-20 10:14:49 -05:00
Pokechu22 8802f96b7e Fix uninitialized variable warnings (C26495) 2023-02-15 19:18:39 -08:00
Silent 9f3d3e2b9c
Address WIL todos in UICommon.cpp 2023-02-12 15:05:54 +01:00
Pokechu22 8b98dd9be3 Move s_using_custom_client to DiscordPresence.cpp
Otherwise, files that include the header get warning: ‘Discord::s_using_custom_client’ defined but not used.
2023-02-09 16:23:01 -08:00
OatmealDome 234de8af09 UICommon: Don't check the registry key or use the old user directory path on Windows builds for Steam 2023-01-31 17:57:09 -05:00
OatmealDome af33d4f13f CommonPaths: Split PORTABLE_USER_DIR into "portable" and "embedded" to accomodate macOS 2023-01-31 17:57:09 -05:00
OatmealDome 7f962a4146 UICommon: Use NORMAL_USER_DIR for Windows 2023-01-31 17:57:09 -05:00
OatmealDome 5e3d77adae CommonPaths: Rename DOLPHIN_DATA_DIR to NORMAL_USER_DIR 2023-01-31 17:57:08 -05:00
OatmealDome 846eef2a05 CommonPaths: Rename USERDATA_DIR to PORTABLE_USER_DIR 2023-01-31 17:57:08 -05:00
Admiral H. Curtiss be8d0b76ca
PowerPC: Remove PC macro. 2023-01-27 15:22:41 +01:00
Shawn Hoffman e5f3a0a9bc buildfix if discord isn't enabled 2023-01-23 06:39:41 -08:00
OatmealDome cc68d5321f UICommon: Set UserConfigPath in the registry to AppData User for backwards compatibility 2023-01-16 01:37:14 -05:00
OatmealDome 3896934d5e UICommon: Use the old User directory in Documents if it exists 2023-01-16 01:37:14 -05:00
OatmealDome 75d87ff90e UICommon: Change default User directory location to AppData 2023-01-16 01:37:14 -05:00
Admiral H. Curtiss 74e1577a2c
HW/ProcessorInterface: Refactor to class, move to Core::System. 2023-01-04 03:00:10 +01:00
Pokechu22 6a6d24550e Clean up DisassembleBlock and JitInterface::GetHostCode 2022-12-01 17:43:35 -08:00
Admiral H. Curtiss c9e74801ed
Merge pull request #11269 from vabold/dolphindevice-get-time
Add DolphinDevice::GetSystemTime to allow for accurate Unix timestamp generation
2022-11-15 03:48:57 +01:00
vabold 083b8172e0 Replace `std::time` with `std::chrono::system_clock` 2022-11-12 05:36:49 -05:00
Dentomologist 7cd08fde75 Updater: Add/clarify error messages 2022-10-31 23:36:07 -07:00
Shawn Hoffman 2b43f96899 WinUpdater: Defer modifying any files until Updater.exe
Fixes https://bugs.dolphin-emu.org/issues/12151
2022-10-21 19:14:00 -07:00
JMC47 00e23da607
Merge pull request #11051 from shuffle2/update-vcredist
WinUpdater: Check OS and VC++ Redist versions
2022-10-21 13:55:51 -04:00
Mai e3e6c3dfa4
Merge pull request #11088 from JosJuice/uicommon-set-enable-alert
Move a SetEnableAlert call to UICommon
2022-09-29 09:09:29 -04:00
JosJuice 51debaeb47 Revert "Android: Don't hold gameFileCache lock during updateAdditionalMetadata"
This reverts commit fb265b610d.

The optimization in that commit is safe when the executor thread is
writing and the GUI thread is reading, but I had failed to take into
account that it's unsafe when the GUI thread is writing and the executor
thread is reading. (The native UpdateAdditionalMetadata function loops
through m_cached_files, which is unsafe if another thread is adding
elements to m_cached_files simultaneously.)

Losing out on this optimization isn't too bad, because
719930bb39 makes it very unlikely that
both threads will want the lock at the same time.
2022-09-27 19:06:05 +02:00
JosJuice 16c71b9a35 Move a SetEnableAlert call to UICommon
This fixes a problem where changing the Use Panic Handlers setting on
Android wouldn't take effect until the app was restarted.
2022-09-24 12:35:10 +02:00
Shawn Hoffman 717c36bc43 WinUpdater: Check OS and VC++ Redist versions. 2022-09-20 15:57:50 -07:00
Admiral H. Curtiss e5cfa286bd
Merge pull request #10960 from shuffle2/mz
ResourcePack: dont scan for individual files
2022-08-24 17:11:21 +02:00
Scott Mansell 4c2d707538
Merge pull request #10940 from InvoxiPlayGames/ipc-discord
Add Discord presence ioctlv to /dev/dolphin
2022-08-08 08:11:42 +12:00
Shawn Hoffman 9bb8315441 ResourcePack: dont scan for individual files
walking the zip prevents minizip from re-reading the same
data repeatedly from the actual backing filesystem.
also improves most usages of minizip to allow for >4GB,
files altho we probably don't need it
2022-08-06 15:38:46 -07:00
InvoxiPlayGames f9e39cf200 Add Discord presence ioctlv to /dev/dolphin 2022-08-06 07:32:29 +01:00
Admiral H. Curtiss 5508c52a95
Merge pull request #10932 from JosJuice/nfs
DiscIO: Add support for the NFS format
2022-08-04 22:20:08 +02:00
JosJuice a87dffe52d DiscIO: Replace IsDataSizeAccurate with GetDataSizeType
Previously, we had WBFS and CISO which both returned an upper bound
of the size, and other formats which returned an accurate size. But
now we also have NFS, which returns a lower bound of the size. To
allow VolumeVerifier to make better informed decisions for NFS, let's
use an enum instead of a bool for the type of data size a blob has.
2022-08-04 22:00:59 +02:00
JosJuice 3a6df63e9b DiscIO: Add support for the NFS format
For a few years now, I've been thinking it would be nice to make Dolphin
support reading Wii games in the format they come in when you download
them from the Wii U eShop. The Wii U eShop has some good deals on Wii
games (Metroid Prime Trilogy especially is rather expensive if you try
to buy it physically!), and it's the only place right now where you can
buy Wii games digitally.

Of course, Nintendo being Nintendo, next year they're going to shut down
this only place where you can buy Wii games digitally. I kind of wish I
had implemented this feature earlier so that people would've had ample
time to buy the games they want, but... better late than never, right?

I used MIT-licensed code from the NOD library as a reference when
implementing this. None of the code has been directly copied, but
you may notice that the names of the struct members are very similar.
c1635245b8/lib/DiscIONFS.cpp
2022-08-04 22:00:58 +02:00
Tillmann Karras d033d92b05 Move to C++20 for non-MSVC compilers 2022-07-30 23:35:53 +01:00
Shawn Hoffman dd29a54cf6 introduce wrapper for SHA1 functionality 2022-07-26 22:16:37 -07:00
JosJuice 2f3c0cdbc5 Split out controller initialization to UICommon 2022-07-17 14:02:03 +02:00
Admiral H. Curtiss b66cc1caf6
Config and UICommon: Add config option and user path for Wii SD card sync folder. 2022-07-11 23:11:40 +02:00
Admiral H. Curtiss 96751c4457
Treewide: Rename references to SD Card image path to clarify they mean the image file, not the folder. 2022-07-11 23:11:40 +02:00
JMC47 7853b72c46
Merge pull request #10430 from OatmealDome/mac-portable
UICommon: Add support for portable.txt on macOS
2022-07-08 18:41:14 -04:00
iwubcode 3857e1fa66 Core: add GraphicsMod directory 2022-06-26 21:53:21 -05:00
Admiral H. Curtiss 23ed611077
Merge pull request #10729 from Pokechu22/libusb-error-wrap
Improve libusb error logging
2022-06-17 16:01:46 +02:00
Admiral H. Curtiss b199108964
Merge pull request #10520 from AdmiralCurtiss/resource-pack-init-crash
ResourcePack: Avoid crashes on invalid packs during Init().
2022-06-17 13:55:16 +02:00
Admiral H. Curtiss efbf5a450b
ResourcePack: Avoid crashes on invalid packs during Init(). 2022-06-17 03:49:05 +02:00
Shawn Hoffman 896d5454f0 updater: use new platform id for win-arm64 2022-06-16 14:55:51 -07:00
Pokechu22 15cbb5c8f9 Log warnings when LibusbUtils::GetDeviceList fails 2022-06-08 15:29:11 -07:00
Tillmann Karras 79a7bf02eb
CMake: rename minizip to minizip-ng
minizip-ng is the new name used by the upstream project as well as all
distros other than Fedora (but it looks like it will be renamed there).
2022-06-06 14:21:43 +02:00
OatmealDome 7ce1a5717a UICommon: Add support for portable.txt on macOS 2022-06-02 14:56:09 -04:00
Dentomologist c8e20c569b Convert PointerWrap::Mode to enum class 2022-05-25 13:16:46 -07:00
Dentomologist f6b9acccfc Common: Refactor PointerWrap 2022-05-25 13:06:41 -07:00
Pokechu22 2341ff00ab NetPlay: Make messages about non-matching games clearer 2022-05-24 23:20:45 -07:00
Admiral H. Curtiss 580c721c82
cmake: Don't use PCH with Qt6. 2022-05-22 01:19:44 +02:00
Admiral H. Curtiss ef760ee012
Common/PointerWrap: Prevent reads/writes past the end of the buffer. 2022-04-18 23:48:00 +02: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
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
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 a3f5d09a54 Don't create GBA saves dir when building without mGBA
Currently, disabling mGBA when building gets rid of the ability to
change the GBA saves directory in DolphinQt, but it doesn't actually
get rid of Dolphin loading and storing the setting and creating the
folder. If the setting is set to a path you don't want to use
(perhaps you are trying to turn Dolphin portable), this is annoying.

To avoid accidentally making mistakes like this in the future,
I'm gating the existence of the setting behind an ifdef.
2022-01-22 16:05:21 +01:00
Pokechu22 43e146a1d5 GameList: Convert file extensions to lowercase
This means that dol/elf files with upercase extensions (e.g. BOOT.DOL) are properly detected.
2022-01-16 17:00:16 -08:00
Pokechu22 6e5f4125e3 Use Common::ToLower and Common::ToUpper 2022-01-16 17:00:12 -08:00
Léo Lam 83c5446d85
Fix static initialisation order fiasco issue for Version variables
Fixes a crash that could occur if the static constructor function for
the MainSettings.cpp TU happened to run before the variables in
Common/Version.cpp are initialised. (This is known as the static
initialisation order fiasco.)

By using wrapper functions, those variables are now guaranteed to be
constructed on first use.
2022-01-14 00:04:22 +01:00
Pokechu22 161c627466 Treewide: Remove unused inclusions of <cinttypes>
Most of these became unneeded when fmt was introduced.
2022-01-09 12:43:11 -08:00
JosJuice 589c267355 USBUtils: Fix 1bad:3110/1bad:3430 mixup
The wiki and the source code had these mismatched, and a user reported
that 1bad:3430 is the Mustang guitar, so the wiki must be right.
2022-01-06 09:46:05 +01:00
JosJuice 0de8ccc25f USBUtils: Add "Harmonix RB3 Keyboard for Nintendo Wii" 2022-01-06 09:42:19 +01:00
Admiral H. Curtiss 2906889804
Core: Add a Maker field for GameModDescriptors. 2022-01-02 06:06:53 +01:00
Léo Lam 9a61514073
Merge pull request #10241 from AdmiralCurtiss/user-dir-consistency
Ensure user paths are stored in a consistent manner.
2022-01-01 02:32:24 +01:00
Admiral H. Curtiss 96fa0919be
Config: Port AutoUpdate settings to new config system. 2021-12-27 21:19:28 +01:00
Admiral H. Curtiss 269ae6f7e8
Core/UICommon: Use std::move() a bit more. 2021-12-25 20:21:33 +01:00
Admiral H. Curtiss ab56f3ecbd
Calls to File::SetUserPath() no longer need to manually append directory separators. 2021-12-25 20:21:32 +01:00
iwubcode 5ecd5f010f Core / DolphinQt: make WFS directory configurable 2021-12-18 01:08:35 -06:00
Admiral H. Curtiss 418bb0b087
GameFile: Calculate a sensible sync hash for mod descriptors. 2021-12-12 21:26:09 +01:00
Admiral H. Curtiss da161faff4
GameList: Show game mod descriptor .json files in game list. 2021-12-12 21:26:09 +01:00
Pokechu22 2025763420 Treewide: Adjust order of includes 2021-12-10 14:49:57 -08:00
Emmanuel Gil Peyrot ab252aedfa Core, DolphinQt, UICommon: Fix all cases of -Wrange-loop-construct in gcc 11 2021-11-02 13:50:21 +01:00
Admiral H. Curtiss a4da56e5e6
CommonPaths: Add a Riivolution subfolder in Load. 2021-10-24 00:09:06 +02:00
Pokechu22 78bfd25964 Fix all uninitialized variable warnings (C26495) 2021-10-13 12:32:16 -07:00
JosJuice 9bb85ca706 DolphinQt/Android: Add warning when converting NKit files
Yes, that's right! It's time to add even more NKit warnings,
because users still don't understand what NKit is or how it works!

More specifically, some users seem to be under the impression that
converting an NKit file to for instance RVZ using Dolphin's convert
feature will result in a normal RVZ file, when it in fact results in
an NKit RVZ file (since NKit is not a container format in the sense
that GCZ/WIA/RVZ/WBFS/CISO is, but rather a kind of trimmed ISO).
I can hardly blame users for not knowing this, because it's not
intuitive unless you know the technical details of how NKit works.
2021-10-02 11:09:36 +02:00
Léo Lam e091c2e817
Add an option to abort when a panic alert occurs
Prompted by https://dolphin.ci/#/builders/24/builds/985

A 1-character typo in a recent PR caused FifoCI builds to break
horribly and spew millions of panic alerts until buildbot crashed.

This PR adds a new config option -- defaulting to off -- that allows
Dolphin to abort early on when a panic alert occurs instead of
continuing forever.
2021-08-29 02:02:07 +02:00
JosJuice fb265b610d Android: Don't hold gameFileCache lock during updateAdditionalMetadata
It seems like we spend a lot of the game list scanning time in
updateAdditionalMetadata, which I suppose makes sense considering
how many different files that function attempts to open.

With the addition of just one little atomic operation, we can make
it safe to call updateAdditionalMetadata without holding a lock.
2021-08-24 15:35:39 +02:00
Bonta 110887435c Config: GBA settings 2021-07-13 16:41:18 +02:00
Tillmann Karras bd5c604718 GameFile: don't download covers for empty game IDs 2021-07-11 17:14:43 +01:00
Mai M ffdc8538a1
Merge pull request #9862 from delroth/spdx-tags
Use SPDX for Dolphin licensing info
2021-07-06 01:02:57 -04:00
Léo Lam 27c560fdfa
Merge pull request #8915 from OatmealDome/updater-temp-dir
macOS: Untranslocate the app bundle's path for the updater
2021-07-06 02:22:28 +02:00
Pierre Bourdon e149ad4f0a
treewide: convert GPLv2+ license info to SPDX tags
SPDX standardizes how source code conveys its copyright and licensing
information. See https://spdx.github.io/spdx-spec/1-rationale/ . SPDX
tags are adopted in many large projects, including things like the Linux
kernel.
2021-07-05 04:35:56 +02:00
JosJuice d304d75aa5 Android: Stop using custom path for GameFileCache
Back when I wrote this code, I believe I set it to use a custom path
so that the cache would end up in a directory which Android considers
to be a cache directory. But nowadays the directory which Dolphin's
C++ code considers to be the cache directory is such a directory,
so there's no longer any reason to override the default path.
2021-06-08 18:34:40 +02:00
Dentomologist 99ed43280d Updater: Escape HTML characters in commit descriptions 2021-06-01 17:22:19 -07:00
OatmealDome 833d5a3e9f AutoUpdate: Put updater log in the user log directory 2021-05-31 16:34:15 -04:00
Skyler Saleh 210f6e7f0d Apple M1: Update AutoUpdate PlatformID
Adds a new PlatformID for universal builds. This will allow single architecture
builds to be updated through the single architecture path, and universal builds
to be updated with universal builds.
2021-05-23 21:45:27 -07:00
JosJuice 99dc97c377 DolphinQt: AutoUpdate.cpp should use scm_rev_git_str
27cc0b5 regression.
2021-05-21 17:36:43 +02:00
JosJuice 27cc0b539a Avoid including scmrev.h except in Version.cpp
Any file which includes scmrev.h must be rebuilt when scmrev.h
is regenerated. By not including scmrev.h from any file other
than Version.cpp, incremental builds become a little faster.
2021-05-21 17:03:01 +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
Phillip Stephens 1dc015cc65 [Updater] Check whether we've already had an update triggered 2021-03-11 02:48:46 -08:00
Léo Lam 858f00b641
Merge pull request #9492 from nolange/fix_norandr_build
Cleanup X11 and XRANDR Macros
2021-03-01 11:36:39 +01:00
Norbert Lange d4b293e969 Simplify macro guards for HAVE_XRANDR 2021-02-22 14:32:53 +01:00