Commit Graph

227 Commits

Author SHA1 Message Date
573863703a MemoryViewWidget: Fix some characters being truncated 2023-08-21 22:02:44 +04:00
24012cfc7f DolphinQt: Adjust panel-specific colors and syntax highlighting for dark theme. 2023-08-12 19:43:12 +02:00
e2fb8fab2f DolphinQt: Set window decorations for all top-level QWidgets. 2023-08-12 16:54:54 +02:00
696087cae0 Qt/NetworkWidget: Get rid of some trivial sign conversions
In all instances, these variables should be signed rather than unsigned.
2023-06-17 10:48:49 -04:00
6e9afd9a73 BreakpointDialog: Mark breakpoint help text as translatable
We already mark the title of the dialog box as translatable, so it
would be a bit odd to not mark the containing text as translatable too.
2023-06-12 09:50:17 -04:00
2b0a9477d0 MemoryViewWidget: Use QStringView with ConvertTextToBytes
Allows for avoiding string copies. While we're at it, we can also mark
ConvertTextToBytes as const.
2023-06-08 12:01:59 -04:00
cfd25f1d7c CodeDiffDialog: Construct Diff instance in CalculateSymbolsFromProfile() when necessary
We can move the construction of the Diff instance into the body of the
if statement, so that we only construct this if the condition is true.

While we're at it, we can move the symbol description string into the
instance, getting rid of a copy. The function itself can also be const
qualified.
2023-06-08 11:55:57 -04:00
496aea54c0 CodeDiffDialog: Pass QString by const reference to create_item
Avoids churning string copies when updating
2023-06-08 11:48:09 -04:00
c99b0f2eb8 BreakpointWidget: Pass QString by const reference to create_item
Avoids churning string copies when performing updates.
2023-06-08 11:46:16 -04:00
867e7d259d BreakpointDialog: Pass QString by const reference to invalid_input
Gets rid of redundant copying.
2023-06-08 11:45:14 -04:00
21df3ca572 StringUtil: Move IsPrintableCharacter() into Common namespace 2023-05-16 14:17:54 -04:00
6e6865a63a Merge pull request #11785 from shuffle2/qtnext3
DolphinQt: cache icons instead of single pixmaps
2023-04-29 17:32:29 +02:00
bb227ad7bb DolphinQt: reset stylesheets on colorSchemeChanged
This is required for switching system color scheme
(dark/light) dynamically at runtime.
2023-04-25 12:34:34 -07:00
51e528e45f DolphinQt: cache icons instead of single pixmaps
Fixes dynamically changing dpi scaling.
Load resources from svg if possible.
Currently svg support is not in Qt build in Externals,
and image files need to be added later.
2023-04-25 12:34:27 -07:00
258cf0ff28 DolphinQt: assume QT_VERSION_CHECK >= 6.0.0 2023-04-25 10:39:05 -07:00
ba150a6824 Merge pull request #11790 from AdmiralCurtiss/network-widget-workaround
Qt/NetworkWidget: Don't update if not paused.
2023-04-25 01:07:42 +01:00
d991cbaf3c Common: Move CodeTrace.cpp/.h into Core
This interface relies on Core details and shouldn't be in Common to
begin with, since it's not a general utility.
2023-04-24 09:10:43 -04:00
8a6118bec6 Qt/NetworkWidget: Don't update if not paused.
This is similar to https://github.com/dolphin-emu/dolphin/pull/11623 where the Core state change invoked by the CPUThreadGuard does indirectly cause another Update() call.
2023-04-23 21:48:23 +02:00
b2ee958058 IOS/WiiSockMan: Move instance to IOS Kernel. 2023-04-18 01:24:10 +02:00
e9dbb93cb5 Merge pull request #11756 from lioncash/ini
Common/IniFile: Move interface into Common namespace
2023-04-14 20:52:30 +02:00
ae18aa0639 Merge pull request #11687 from Minty-Meeo/warnings
Resolve GCC/Clang Warnings
2023-04-14 01:29:46 +01:00
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
d9a49c68d9 Resolve [-Wunused-lambda-capture] 2023-04-10 14:21:15 -05:00
23843583bf PowerPC: Refactor to class, move to System. 2023-04-09 21:48:37 +02:00
44e3993f2f DolphinQt: Prevent MemoryViewWidget updates when hidden 2023-04-07 11:21:19 -04:00
2d1f661118 DolphinQt: Avoid ppcState global. 2023-04-05 20:09:32 +02:00
f424e7815a DolphinQt: Fix memory leaks in MemoryWidget
QMenuBar::addMenu does not take ownership of the QMenu, setting their
parent allows them to be cleaned up
2023-04-04 16:10:31 -04:00
8dabd1a025 PowerPC/MMU: Refactor to class, move to System. 2023-03-28 03:47:51 +02:00
9217a9eba4 JitInterface: Refactor to class, move to System. 2023-03-26 14:38:07 +02:00
912cd456fb Core: Add System parameter to CPUThreadGuard. 2023-03-08 22:41:42 +01:00
3b364c5c16 HW/CPU: Refactor to class, move to System. 2023-03-08 12:23:37 +01:00
6d38dd9821 Qt/WatchWidget: Don't update if not paused. 2023-03-07 20:31:15 +01:00
4e6c89fbfd Qt/CodeViewWidget: Don't read PC in Update() if we don't have a CPU thread guard. 2023-02-20 03:10:12 +01:00
ef1520c2c6 Qt/CodeViewWidget: Don't try to pause emulator in Update() if we happen to be on a breakpoint. 2023-02-20 02:56:04 +01:00
4e6e510003 Debugger: Add string comparison to conditional breakpoints. 2023-02-20 01:40:33 +01:00
b6d476241a CodeViewWidget: Fix memory leak
Per https://doc.qt.io/qt-6/qabstractitemview.html#setItemDelegateForColumn setItemDelegateForColumn does not take ownership of the parameter, so it was not being deleted. Specifying a parent to QObject (via QStyledItemDelegate's constructor) will allow it to automatically be deleted, per https://doc.qt.io/qt-6/objecttrees.html. The other instance of a QItemDelegate in IOWindow.cpp already used this.
2023-02-17 18:29:32 -08:00
1c5e223532 MemoryViewWidget: Fix memory leaks
bp_item/row_item/item were never deleted, and the normal Qt ownership system wasn't applying to them because they were being cloned.
2023-02-17 18:17:01 -08:00
8802f96b7e Fix uninitialized variable warnings (C26495) 2023-02-15 19:18:39 -08:00
5b6784432c Follow-up fixes for "Properly lock CPU before accessing emulated memory" 2023-02-14 18:44:16 +01:00
6f0266e8de DolphinQt: Only update call stack if paused
This avoids a pseudo infinite loop where CodeWidget::UpdateCallstack
would lock the CPU in order to read the call stack, causing the CPU to
call Host_UpdateDisasmDialog because it's transitioning from running to
pausing, causing Host::UpdateDisasmDialog to be emitted, causing
CodeWidget::Update to be called, once again causing
CodeWidget::UpdateCallstack to be called, repeating the cycle.

Dolphin didn't go completely unresponsive during this, because
Host_UpdateDisasmDialog schedules the emitting of Host::UpdateDisasmDialog
to happen on another thread without blocking, but it was stopping certain
operations like exiting emulation from working.
2023-02-12 12:50:28 +01:00
7cecb28bdf DolphinQt: Properly lock CPU before accessing emulated memory
This fixes a problem I was having where using frame advance with the
debugger open would frequently cause panic alerts about invalid addresses
due to the CPU thread changing MSR.DR while the host thread was trying
to access memory.

To aid in tracking down all the places where we weren't properly locking
the CPU, I've created a new type (in Core.h) that you have to pass as a
reference or pointer to functions that require running as the CPU thread.
2023-02-12 11:27:50 +01:00
3bd655463d MemoryViewWidget: Fix warning: enumeration value ‘Null’ not handled in switch [-Wswitch] 2023-02-09 16:23:02 -08:00
5c8d8383e2 CodeWidget: Fix shadowing warning 2023-02-09 16:23:02 -08:00
8adabb86cf Debugger: Avoid ppcState global. 2023-01-27 15:22:45 +01:00
61ba516570 PowerPC: Move a few functions to PowerPCState. 2023-01-27 15:22:44 +01:00
c13ca271d8 PowerPC: Parametrize CTR macro. 2023-01-27 15:22:43 +01:00
0f301829d2 PowerPC: Remove rPS macro. 2023-01-27 15:22:42 +01:00
8fccefa3aa PowerPC: Remove GPR macro. 2023-01-27 15:22:42 +01:00
be8d0b76ca PowerPC: Remove PC macro. 2023-01-27 15:22:41 +01:00
e5b91f00b0 Common: Replace StringBeginsWith/StringEndsWith with std equivalents
Obsoletes these functions in favor of the standard member functions
added in C++20.
2023-01-24 14:58:20 -05:00