Commit Graph

327 Commits

Author SHA1 Message Date
Pokechu22 1273c5e395 Add fmt support to BitField 2021-03-06 14:58:32 -08:00
Pokechu22 cf95deaf6d Allow specifying StorageType for BitField
This is useful for BitFields that are bools.
2021-03-06 14:57:44 -08:00
Pokechu22 6653bd7199 Create EnumFormatter 2021-03-06 14:57:42 -08:00
JosJuice eff66c2adc Arm64Emitter: Expand the MOVI2R unit test a little
This tests for a bug with ADRP which was present in an
earlier version of this pull request.

Also adding the MOVI2R unit test to the VS build.
2021-02-13 21:04:16 +01:00
MerryMage 1ab7657120 MovI2R: Do not exhaustively test 2021-01-31 13:17:31 +00:00
MerryMage fe9207bb56 UnitTests: Add MOVI2R test 2021-01-31 13:17:19 +00:00
Shawn Hoffman 500a694ca8 msbuild: bundle all dolphin "core" code into single library 2021-01-27 14:29:49 -08:00
Léo Lam 305faa73ec
Merge pull request #9436 from shuffle2/asan
msvc: enable asan compat
2021-01-27 13:24:26 +01:00
Dentomologist 83f912b58a UnitTests: Add setup error checking
Check return value of calls to File::CreateTempDir() from CoreTiming,
FileSystem, and MMIO test classes to verify the test user directory
exists, and fail the tests otherwise.
2021-01-22 11:49:59 -08:00
Shawn Hoffman 49b9deeb03 msvc: add asan support (disabled by default) 2021-01-10 15:11:18 -08:00
Léo Lam 2e63cc8313
Merge pull request #9307 from Dentomologist/add-deleted-file-missing-warning-flag
Add File::Delete and File::DeleteDir warning flags
2020-12-11 02:06:28 +01:00
Dentomologist 760e7e664a Add File::Delete and File::DeleteDir tests 2020-12-10 09:48:30 -08:00
Léo Lam 585899dba3
Turn format string issues into compile-time errors
If the compiler can detect an issue with a format string at compile
time, then we should take advantage of that and turn the issue into a
hard compile-time error as such problems almost always lead to UB.

This helps with catching logging or assertion messages that have been
converted over to fmt but are still using the old, non-fmt variants
of the logging macros.

This commit also fixes all incorrect usages that I could find.
2020-12-04 18:06:02 +01:00
Admiral H. Curtiss 5b52b3e9cb x64Emitter: Check end of allocated space when emitting code. 2020-08-24 19:31:32 +02:00
Shawn Hoffman 2f47f486af msbuild: re-enable standalone vcxproj processing 2020-08-22 16:17:50 -07:00
Shawn Hoffman 94bf48b67c msbuild: refactor stuff out of project files (for dolphin) 2020-08-22 16:17:50 -07:00
Shawn Hoffman 36ace8eb52 prettify some constructs in vcxproj files 2020-08-22 16:17:50 -07:00
Shawn Hoffman d40ae8a84b UnitTests: expliticly list files to be compiled.
Fixes VS warning / bad behavior.
2020-08-16 15:17:11 -07:00
Shawn Hoffman 9d880c2db3 UnitTests: quiet warnings 2020-08-16 15:17:11 -07:00
JosJuice 55f787b898 Remove unused function Host_UpdateProgressDialog 2020-04-03 12:53:38 +02:00
Léo Lam bbc8631357 IOS/FS: Fix CreateFullPath to not create directories that already exist
This fixes CreateFullPath to not create directories when it is known
that they already exist, instead of calling CreateDirectory anyway
and checking if the error is AlreadyExists. (That doesn't work
now that we have an accurate implementation of CreateDirectory
that performs permission checks before checking for existence.)

I'm not sure what I was thinking when I wrote that function.

Also adds some tests for CreateFullPath.
2020-01-30 18:07:03 +01:00
Tilka 73aea8af6b
Merge pull request #8539 from leoetlino/fs-accuracy
IOS/FS: Reimplement many functions in a more accurate way
2020-01-25 23:00:10 +00:00
Tilka 119ccc5e4f
Merge pull request #8556 from Sintendo/bestrest
x64Emitter: Avoid 8-bit displacement when possible
2020-01-25 19:10:47 +00:00
Tilka 709862b818
Merge pull request #8120 from MerryMage/cdts
Jit64: Make DoubleToSingle a common asm routine
2020-01-25 19:10:37 +00:00
Léo Lam 031c63eb8a UnitTests/FS: Improve deletion test
* Test recursive directory deletion
* Test "in use" check for both files and directories
2020-01-25 17:54:58 +01:00
Léo Lam af416c60b0 UnitTests/FS: Add ReadDirectory ordering test (issue 10234) 2020-01-25 17:54:58 +01:00
Léo Lam 8789a6ddb3 UnitTests/FS: Fix file rename tests
Files cannot be given a different file name, only moved across
directories.

Add a test for that behaviour and fix the existing
RenameWithExistingTargetFile test.
2020-01-25 17:54:58 +01:00
Léo Lam d4ba0acb3a UnitTests/FS: Add path validity and splitting tests 2020-01-25 17:54:57 +01:00
Léo Lam 484cfb9328 UnitTests/FS: Add metadata tests 2020-01-25 17:53:39 +01:00
Sintendo d5cb858165 x64Emitter: Unit test memory addressing modes
Test the behavior of OpArg::WriteRest by using MOV with the various
addressing modes (MatR, MRegSum, etc.) in the source operand.

Both the instruction and the instruction length are validated.
2020-01-13 08:43:30 +01:00
Tilka 6e18dfb600
Merge pull request #8133 from Sintendo/mov64imm32
x64Emitter: Emit shorter MOVs for 32-bit immediates
2020-01-06 13:12:56 +01:00
Stenzek 6fcb1c6c46 Add an ARM64 target to Visual Studio projects 2019-12-28 19:20:41 +10:00
Stenzek dd23a1ee79 Update VS projects/solutions to VS2019 2019-11-30 13:42:52 +10:00
Jordan Woyak 85ceb37ccd InputCommon: Make the "input gate" not racey. 2019-11-06 16:31:02 -06:00
Silent b3969e91d9
FixedSizeQueue: Bugfixes and improvements
- Fixed a bug where pushing items over queue's size left it in a corrupted state
- For non-trivial types, have clear() and pop() run destructors
- Added emplace(args...)
- Added empty()

FixedSizeQueue has semantics of a circular buffer,
so pushing items continuously is expected to keep overwriting oldest elements gracefully.

Tests have been updated to verify correctness of a previously bugged behaviour
and to verify correctness of destructing non-trivial types
2019-08-31 21:18:07 +02:00
Lioncash a9663669dc Common/CommonFuncs: Remove now-unneccessary ArraySize function
Since C++17, non-member std::size() is present in the standard library
which also operates on regular C arrays. Given that, we can just replace
usages of ArraySize with that where applicable.

In many cases, we can just change the actual C array ArraySize() was
called on into a std::array and just use its .size() member function
instead.

In some other cases, we can collapse the loops they were used in, into a
ranged-for loop, eliminating the need for en explicit bounds query.
2019-06-01 10:07:57 -04:00
Sintendo 9fe3150358 x64EmitterTest: Test 64-bit MOV with 32-bit immediate 2019-05-29 01:04:16 +02:00
MerryMage 12314577c1 Jit64AsmCommon: Make ConvertDoubleToSingle use RSCRATCH as output 2019-05-25 23:07:50 +01:00
MerryMage ec8d57d882 UnitTests/Jit64Common: Test GenConvertDoubleToSingle 2019-05-25 23:07:50 +01:00
David Korth 8417c78b7a Update Discord rich presence when the title changes
This allows us to update the rich presence description if a channel
is launched from the Wii Menu. It also handles other PPC title
launches, e.g. Smash Bros. Masterpieces.

Host.h: Added Host_TitleChanged().

DolphinNoGUI/MainNoGUI.cpp: Implemented Host_TitleChanged().
DolphinQt/Host.cpp: Implemented Host_TitleChanged().

Android/jni/MainAndroid.cpp: Stubbed Host_TitleChanged().
DSPTool/StubHost.cpp: Stubbed Host_TitleChanged().
UnitTests/StubHost.cpp: Stubbed Host_TitleChanged().
2019-05-24 14:12:48 +02:00
Techjar ff972e3673 Reformat repo to clang-format 7.0 rules 2019-05-06 18:48:04 +00:00
Léo Lam ab9ece9bca Replace MathUtil::Clamp with std::clamp 2019-05-04 23:12:17 +02:00
Filip Gawin c110ffcdaa Remove redundant initialization 2019-04-30 01:22:24 +02:00
Stenzek 113bd60fe7 Implement D3D12 backend 2019-04-01 11:24:55 +10:00
spycrab 61350b3d98 Core/Host: Allow frontends to block inputs 2019-03-21 13:16:21 +01:00
Tilka bfb9b1aca5
Merge pull request #7602 from CrystalGamma/stop-g_jit
stop using g_jit outside of JitInterface
2018-12-27 23:12:14 +01:00
MerryMage b7b552f20a x64EmitterTest: Add some missing tests 2018-12-26 15:22:45 +00:00
CrystalGamma 2f490e44fb stop using g_jit outside of JitInterface
Replace g_jit in x86-64 ASM routines code by m_jit member reference
2018-12-15 01:58:58 +01:00
Stenzek a3961750a7 Drop Host_GetRenderSurface and pass display to backend 2018-10-20 21:11:34 +10:00
Stenzek 134d967be2 Refactoring and cleanup of GLInterface (now GLContext) 2018-10-20 21:11:34 +10:00