Commit Graph

3516 Commits

Author SHA1 Message Date
JosJuice 7b8e846d0a
Merge pull request #10367 from Pokechu22/fmt-8.1.1
Update to fmt 8.1.1
2022-01-20 21:14:41 +01:00
Pokechu22 6e5f4125e3 Use Common::ToLower and Common::ToUpper 2022-01-16 17:00:12 -08:00
Pokechu22 aaec64501a Create Common::ToLower and Common::ToUpper 2022-01-16 16:56:53 -08:00
Pokechu22 fefde0481d Use EnumFormatter to generate names for EXI devices
This simplifies the code in GameCubePane, and allows us to use the EXIDeviceType enum in error messages.
2022-01-14 20:24:53 -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 fd04f4f32d Replace use of of unsigned char* with fmt
Using unsigned char* or signed char* results in a deprecation warning, which is treated as an error.  It needs to be casted to regular char* for it to work.
2022-01-13 11:11:08 -08:00
Pokechu22 1a92699455 Cast to int for enums that are not formattable 2022-01-13 11:11:08 -08:00
Pokechu22 ac46b91673 Make all fmt::formatter constructors constexpr 2022-01-13 11:11:08 -08:00
Pokechu22 78e43a4404 Make all custom fmt::formatter's format functions const
fmt 8.0.0 requires this.
2022-01-13 11:11:08 -08:00
Pokechu22 cc592ab814 Use fmt::runtime in FmtFormatT
This format string is by definition dynamic and can't be checked at compile time.  There are other similar strings in the log handler and in asserts, but they use vformat and thus don't need fmt::runtime.  We might be able to do a similar thing where the untranslated string is compile-time checked, but FmtFormatT is used in so few places that I don't want to handle that in this PR.
2022-01-13 11:11:08 -08:00
Pokechu22 54cf8d030c Add fmt/xchar includes where wstring is used 2022-01-13 11:11:08 -08:00
Pokechu22 140c8217f6 Common: Create HRWrap
HRWrap now allows HRESULT to be formatted, giving useful information beyond "it failed" or a hex code that isn't obvious to most users.  This commit does not add any uses of it, though.
2022-01-09 12:44:15 -08:00
Pokechu22 c296c34e00 Common/MsgHandler: Use caller's file and line number in log messages
This will assist with finding the source of a panic alert based on logs; before, Common\MsgHandler.cpp:113 (or similar) was always used.
2022-01-09 12:44:14 -08:00
Pokechu22 f55571ee5d Common/MsgHandler: Fix PanicAlertFmtT not actually being translated 2022-01-09 12:44:14 -08:00
Pokechu22 2a5016c2f8 Common/MsgHandler: Remove use of lambda, as it breaks __func__
Specifically, this meant that __func__ in macros (namely ASSERT) would always be evaluate to "operator ()".
2022-01-09 12:44:14 -08:00
Pokechu22 558de04cfc Common/Assert: Actually use the ASSERT_MSG's log type parameter
Since it was unused, nonexistent values were used in a few places.  I've replaced them.
2022-01-09 12:44:14 -08:00
Pokechu22 bab3ff0157 Common/MsgHandler: Remove non-format variants of PanicAlert
They're no longer used.
2022-01-09 12:44:14 -08:00
Pokechu22 44e93e91d7 Common/Assert: Switch to fmt 2022-01-09 12:43:11 -08:00
Pokechu22 1c0ca09e6f Common/Assert: Include the condition and function in the message 2022-01-09 12:43:11 -08:00
JosJuice 804f78e0e4 Android: Mark s_android_send_report as static
Fixes a compiler warning.
2022-01-06 12:20:09 +01:00
Mai M 7bd14c5d9f
Merge pull request #10338 from Pokechu22/natvis-improvements
Natvis improvements
2022-01-06 04:01:25 -05:00
JMC47 9a914d33d5
Merge pull request #9414 from DevJPM/master
Fix CPU Core Count detection and Enable Parallel Shader Compilation
2022-01-04 10:15:12 -05:00
Pokechu22 8e2b06906b Create EnumMap natvis 2022-01-02 15:36:47 -08:00
Pokechu22 b96297f2ee Improve BitField natvis
Now, enums are properly displayed, and BitFieldArray is also displayed nicely.  Signed values also work correctly, and 1-bit fields are not treated as bools unless the bitfield is explicitly marked as a bool.
2022-01-02 14:39:34 -08:00
Pokechu22 301bc49efe Common: Remove MD5.h
It uses DiscIO, and Common shouldn't depend on DiscIO.  Instead, put this code in NetPlayClient.cpp.
2022-01-01 11:52:53 -08:00
Pokechu22 0c19f895d3 Replace remaining uses of zlib crc32 with Common/Hash.h 2022-01-01 10:36:38 -08:00
Pokechu22 2652aed85c Common: Merge CRC32.h into Hash.h
This makes it easier to find the relevant functions.
2022-01-01 10:36:38 -08: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
JMC47 1c8a7f1867
Merge pull request #10277 from AdmiralCurtiss/memarena-cleanup
MemArena: Cleanup & interface changes for safer memory mapping.
2021-12-29 19:06:47 -05:00
Admiral H. Curtiss 319b00f1fd
Config: Allow unregistering callbacks. 2021-12-25 23:32:49 +01:00
Admiral H. Curtiss e54657254a
Core: Make format of D_WIIROOT_IDX consistent with the rest of the user directories. 2021-12-25 20:21:32 +01:00
Admiral H. Curtiss 3e1511ce98
Common/FileUtil: Ensure consistency for custom user paths. 2021-12-25 20:21:32 +01:00
Admiral H. Curtiss 1554128560
MemArena: Prepare interface for proper memory reservation. 2021-12-25 20:20:36 +01:00
Admiral H. Curtiss 812cc8b632
MemArena: Split into three separate files for each OS. 2021-12-25 20:20:36 +01:00
Pokechu22 95e0f833f9 Fifo analyzer: Display equations for color/alpha combiners 2021-12-18 15:21:48 -08:00
Pokechu22 2025763420 Treewide: Adjust order of includes 2021-12-10 14:49:57 -08:00
Pokechu22 8cf841ecc7 Fix saving RGBA images
PNG_FORMAT_RGB and PNG_COLOR_TYPE_RGB both evaluate to 2, but PNG_FORMAT_RGBA evaluates to 3 while PNG_COLOR_TYPE_RGBA evaluates to 6; the bit indicating a palette is 1 while the bit indicating alpha is 4.
2021-11-24 14:56:12 -08:00
Pokechu22 99e589cc98 Log libpng warnings and errors 2021-11-24 14:56:12 -08:00
Léo Lam aa5cb35c86
Merge pull request #10143 from Pokechu22/png-compression-level
Add option for setting the PNG zlib compression level
2021-11-23 16:40:34 +01:00
JMC47 e5a4a86672
Merge pull request #10055 from JosJuice/jitarm64-reuse-memory
JitArm64: Codegen space reuse
2021-11-20 17:35:24 -05:00
DevJPM 61cfd8696e Fix CPU Core Count detection and Enable Parallel Shader Compilation
This does this following things:

- Default to the runtime automatic number of threads for pre-compiling shaders
- Adds a distinct automatic thread count computation for pre-compilation  (which has less other things going on
and should scale better beyond 4 cores)
- Removes the unused logical_core_count field from the CPU detection
- Changes the semantics of num_cores from maximaum addressable number of cores to actually available CPU cores
(which is also how it was actually used)
- Updates the computation of the HTT flag now that AMD no longer lies about it for its Zen processors
- Background shader compilation is *not* enabled by default
2021-11-20 16:08:10 +01:00
Pokechu22 94ccf765af Add option for setting the PNG zlib compression level 2021-11-18 13:10:22 -08:00
Pokechu22 d2041b4c2a VideoCommon: Add signed version of BitfieldExtract 2021-11-17 20:04:33 -08:00
JosJuice 3e84279919
Merge pull request #10208 from thatSteveFan/patch-1
Minor comment fix in Matrix.cpp
2021-11-13 15:09:28 +01:00
Shawn Hoffman 4008188654 msvc: update to vs2022 and windows sdk 10.0.22000 2021-11-11 08:01:26 -08:00
thatSteveFan 834a59d89b
Minor comment fix in Matrix.cpp
Fix comment to say (NxM times MxP).
2021-11-08 15:30:39 -08:00
Mai M 6c72e6814d
Merge pull request #10169 from leoetlino/fmt-localtime
Use fmt::localtime instead of thread-unsafe std::localtime
2021-11-07 00:08:14 -04:00
Merry 7c2b09e156 Arm64Emitter: Add FRINTI instruction 2021-11-06 19:15:26 +00:00
Emmanuel Gil Peyrot 3d662e746b Core: Fix a -Wshadow warning in gcc 11
This moves the only direct call to zlib’s crc32() into its own
translation unit, but that operation is cold enough that this won’t
matter in the slightest.  crc32_z() would be more appropriate, but
Android has an older zlib version…
2021-11-02 13:50:21 +01:00
Pokechu22 04d8cdfe88 Convert LOG_TYPE and LOG_LEVELS to enum class 2021-10-24 11:48:36 -07:00