Commit Graph

3454 Commits

Author SHA1 Message Date
b319f823bf Merge pull request #8337 from CookiePLMonster/log-widget-improvements
Log widget improvements
2019-10-01 23:42:16 +10:00
0a75e71672 DolphinNoGUI: Add a FBDev platform
And the associated GLContext bits
2019-09-01 14:00:40 +10:00
43fe02ee9b GLContext: Get size using eglQuerySurface()
Also no longer assumes that a nullptr display is not headless (needed for fbdev)
2019-09-01 13:35:11 +10:00
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
eab086b880 ConsoleListenerWin: Properly output console logging in UTF-16 so UTF-8 displays properly 2019-08-31 00:44:44 +02:00
3eb360b818 VolumeVerifier: Add zip support for datfile 2019-08-24 16:37:19 +02:00
22933d8502 VolumeVerifier: Add datfile parsing 2019-08-24 16:37:19 +02:00
288dd649da Merge pull request #8273 from CookiePLMonster/config-threading-fixes
Threading fixes for config layers
2019-08-21 08:55:03 -07:00
e67eb4693e Fix implicit false-to-nullptr conversions 2019-08-15 17:49:57 +02:00
48a4b62125 Change Layer code not to create superfluous std::optional entries in LayerMap 2019-08-01 22:22:05 +02:00
cb4eecde52 Fix race conditions in Config Layers
API has been made stricter, layers are now managed with shared pointers,
so using them temporarily increased their reference counters.
Additionally, any s_layers map has been guarded by a read/write lock,
as concurrent write/reads to it were possible.
2019-07-30 22:10:17 +02:00
117a60ceb2 StringUtil: Comply with variable naming style 2019-07-23 14:49:13 +02:00
a2a1e04fc9 StringUtil: Use std::string_view more 2019-07-23 14:49:12 +02:00
66e7a11139 Merge pull request #8235 from lioncash/move
Common/DebugInterface: Minor cleanup changes
2019-07-22 15:07:14 -07:00
15679a9a70 Merge pull request #8227 from lioncash/gekko
Common/GekkoDisassembler: Don't print out '\0' as a character
2019-07-22 21:39:49 +08:00
73a9b4148b Merge pull request #8257 from CookiePLMonster/assert-fixes
Fixes to assertions
2019-07-22 08:47:13 +02:00
518d96ad48 Remove duplicated "Ignore and countinue?" 2019-07-21 15:36:24 +02:00
e792a67dc6 Improve thread safety and remove an unnecessary string allocation from MsgAlert
s_msg_handler still seems thread unsafe, not sure if it should be or not
2019-07-20 21:03:45 +02:00
13a454d603 Common/SettingsHandler: Use fmt for printing out the serial number
Same thing, less code.
2019-07-16 04:23:20 -04:00
af576839d8 Common/SettingsHandler: Use std::string_view where applicable
Allows passed in strings to be non-allocating.
2019-07-16 04:15:25 -04:00
d2d7bf5c3b Common/DebugInterface: Remove GetInstructionSize()
This is completely unused, so it can be removed.
2019-07-09 14:19:40 -04:00
92c1782726 Common/DebugInterface: Mark a few member functions as const
Quite a few member functions act as a means to query information. Given
these don't actually modify object state, they can be made const.
2019-07-09 14:19:40 -04:00
d4d485b692 Common/DebugInterface: Make return value of GetColor() a u32
At its only usage point, its return value is stored into a u32, and the
default implementation returns 0xFFFFFFFF (-1), which would be an
unsigned integer. Given all of the bits are used to determine a color,
it makes slightly more sense to treat this as an unsigned value as
opposed to a signed one.
2019-07-09 14:19:38 -04:00
a9a9b193bb Common/DebugInterface: Use forward declarations where applicable
We're allowed (by the standard) to forward declare types within
std::vector, so we can replace direct includes with forward declarations
and then include the types where they're directly needed.

While we're at it, we can remove an unused inclusion of <cstring>, given
nothing in the header uses anything from it. This also revealed an
indirect inclusion, which this also resolves.
2019-07-08 18:59:11 -04:00
457bff92c1 Common/DebugInterface: Use u32 instead of unsigned int consistently
Previously u32 was being used for part of the interface and unsigned int
was being used for other parts. This makes the interface fully consistent by
using only one type.

We opt for u32 here given they communicate the same thing (for platforms
we care about where int is 32-bit), while also being less to read.
2019-07-08 18:52:45 -04:00
b1b9c6aa1e Common/DebugInterface: Default virtual destructor
While we're at it, we can also default the constructor and destructor of
inheriting classes in their respective cpp file to prevent the
construction and destruction of non-trivial types being inlined into
other regions of code.
2019-07-08 17:44:58 -04:00
bc8778203e Common/Watches: std::move strings where applicable
Allows calling code to move the std::string into the Watch instances,
avoiding copies.
2019-07-08 17:41:06 -04:00
ce30efc6cf Common/GekkoDisassembler: Don't print out '\0' as a character
Prevents a few instructions from having mangled names in some cases.
2019-07-03 20:12:50 -04:00
e388f01e11 Merge pull request #8215 from CookiePLMonster/appverifier-sanitize
Fixed various errors spotted with Application Verifier
2019-06-30 01:27:25 +10:00
a88deda307 Merge pull request #8193 from lioncash/disasm
Common/GekkoDisassembler: Minor changes
2019-06-29 10:38:36 +02:00
58c78a495d Merge pull request #8213 from JosJuice/filesystem-u8string
Work around C++20 std::filesystem changes related to u8string
2019-06-28 19:42:34 +02:00
9eab3feddf Fix out of bounds read in HttpRequest::Impl::Fetch logging 2019-06-23 21:44:51 +02:00
c0a6fa5dcc Work around C++20 std::filesystem changes related to u8string 2019-06-21 18:34:21 +02:00
84b9b37fef Merge pull request #8210 from spycrab/httpreq_error_msg
Common/HttpRequest: Use CURLOPT_ERRORBUFFER for error messages
2019-06-20 10:59:25 -07:00
ba4c1c5947 Common/HttpRequest: Use CURLOPT_ERRORBUFFER for error messages 2019-06-20 19:44:51 +02:00
63bb646721 Fix opening controller config when there is no profile directory
https://bugs.dolphin-emu.org/issues/11771
2019-06-20 18:35:14 +02:00
973bba7c1e Merge pull request #8191 from lioncash/ini
Common/IniFile: Use std::string_view where applicable
2019-06-20 13:44:20 +02:00
4885130799 Merge pull request #8194 from lioncash/common-msg
Common/MsgHandler: Tidy up interface and namespace code
2019-06-20 13:37:24 +02:00
fab15edb53 Replace <experimental/filesystem> includes with <filesystem>
https://bugs.dolphin-emu.org/issues/11770
2019-06-20 10:39:56 +02:00
4f1f55093f Common/MsgHandler: Namespace code within the Common namespace
Closes another gap in the Common library where code isn't being
namespaced under it.
2019-06-19 16:03:55 -04:00
e7dd46a531 Common/MsgHandler: Brace if statement in MsgAlert
The condition travels more than one line, so the body should be braced.
While we're at it, make the comparison against nullptr explicit.
2019-06-19 16:03:33 -04:00
0eddf6dd8f Common/MsgHandler: Use std::string's empty for emptiness checking in MsgAlert
Provides more straightforward code compared to negating a length check.
2019-06-19 16:00:16 -04:00
ff96dc0e6f Merge pull request #8199 from lioncash/namespace
General: Use nested namespace specifiers where applicable
2019-06-18 11:33:08 +02:00
c4def7c814 Common: Add missing header guards 2019-06-17 18:37:56 -04:00
8e030a4a45 Common: Use nested namespace specifiers where applicable 2019-06-17 16:36:48 -04:00
1968643297 Common/MsgHandler: Amend file-scope variable names
Makes them follow our coding style.
2019-06-16 23:37:03 -04:00
76b675e9f0 Common/MsgHandler: Make default message handler and translator's internally linked
Previously these functions were declared without the static specifier,
giving them external linkage, which isn't really ideal.

Instead, we can place these functions up by the relevant file-scope
variables and place them inside an anonymous namespace with said variables,
giving them internal linkage.
2019-06-16 23:37:03 -04:00
d1475f6d59 Common/MsgHandler: Convert type aliases over to using
Same thing, nicer to read.
2019-06-16 23:37:03 -04:00
027c17558f Common/MsgHandler: Use fmt::print on non-Windows OSes
Provides the same behavior.
2019-06-16 23:37:00 -04:00
188234b4cd Common/GekkoDisassembler: Use std::string_view where applicable
Avoids the use of the null pointer to represent an empty string.
Instead, we can simply pass an empty string_view instance. Using
std::string_view enforces this invariant at the API level.
2019-06-16 19:51:23 -04:00