Commit Graph

27882 Commits

Author SHA1 Message Date
bc43f45119 Qt: make the pause play button only one button
This is to avoid several issue with using 2 actions and switching between them.  This commit will instead have one action get his property changed on pause and play.
2018-05-15 23:37:50 -04:00
1fe92b8be7 Merge pull request #6845 from lioncash/patch-dlg
NewPatchDialog/PatchesWidget: Use forward declarations where applicable
2018-05-13 22:00:43 +02:00
07b57c7ac6 Merge pull request #6843 from lioncash/patch
PatchEngine: Minor changes
2018-05-13 21:58:55 +02:00
5fd8cec7ea PatchEngine: Add s_ prefix to file-scope variables
Brings the translation unit in line with the convention used elsewhere
in the codebase.
2018-05-13 15:46:55 -04:00
0995cfef6a PatchEngine: Make PatchType an enum class
Makes the enum strongly typed. A function for retrieving the string
representation of the enum is also added, which allows hiding the array
that contains all of the strings from view (i.e. we operate on the API,
not the exposed internals). This also allows us to bounds check any
querying for the strings.
2018-05-13 15:46:51 -04:00
799e4154be PatchesWidget: Convert Core and UICommon includes into forward declarations
Avoids propagating inclusions through UI headers
2018-05-13 15:38:58 -04:00
df3f9af6d7 NewPatchDialog: Convert PatchEngine include into a forward declaration
Avoids needing to include Core headers in UI-related header files,
preventing unintentional propagation.
2018-05-13 15:34:46 -04:00
e67cbd462b Merge pull request #6841 from spycrab/qt_fix_rtmfocus
Qt/RenderWidget: Fix render-to-main focus
2018-05-13 21:16:26 +02:00
b9ae157835 Qt/RenderWidget: Fix render-to-main focus 2018-05-13 21:08:34 +02:00
a166cf2481 PatchEngine: Give Patch and PatchEntry default member initializers
Avoids potentially using the values uninitialized. While we're at it,
also drop the prefixed underscores from one of the constructors.
2018-05-13 15:08:32 -04:00
7a5e51cda7 Merge pull request #6840 from lioncash/iostream
DolphinQt2/NewPatchDialog: Remove unused <iostream> include
2018-05-13 20:12:15 +02:00
15a522fe9b DolphinQt2/NewPatchDialog: Remove unused <iostream> include
Including <iostream> causes a static constructor to be injected into the
translation unit, even if the everything from the header itself is
unused.
2018-05-13 14:04:22 -04:00
9d1157f695 Merge pull request #6839 from spycrab/qt_start_top
Qt: Fix render widget not being on top when using -n / -e
2018-05-13 18:20:00 +02:00
e828c243f3 Merge pull request #6836 from leoetlino/wii-save-cleanup
WiiSave: (not so) Minor cleanup
2018-05-13 18:19:22 +02:00
17795a615b Merge pull request #6838 from spycrab/qt_map_save
Qt/ControllersWindow: Fix changing devices while emulation is running
2018-05-13 18:17:13 +02:00
80b3d7ccb8 WiiSave: Allow users to specify export directory
Export and ExportAll now open a directory picker (that defaults to the
previous default directory, i.e. the Dolphin user dir).

Also removes the need to return the path in the export functions since
the user knows which path they chose.
2018-05-13 17:42:56 +02:00
87e5cd73dc WiiSave: Use std::array instead of C arrays
Makes copying, comparing more readable
2018-05-13 17:42:55 +02:00
a93d816c28 WiiSave: Move dialogs to UI code
This moves the result dialogs to DolphinQt2, since WiiSave should not
really be responsible for interacting with the user as a simple
Wii save importing/exporting class.

This also fixes Wii save import/export showing result dialogs twice,
once from WiiSave, and another time from DolphinQt2.
2018-05-13 17:42:55 +02:00
41c4486c65 WiiSave: Clean up constructors
Move the import/export operation into separate functions, as it doesn't
really make sense for the constructor to do *everything*, including
printing success/failure message boxes.

The existing constructor was split into two: one that takes a path,
and another taking a title ID. This makes it more obvious what is
actually done when a path/TID is passed and also clarifies what
parameters should be passed. (No more magic 0 or "" value.)
2018-05-13 17:42:55 +02:00
fbf36b85d2 WiiSave: Remove unused Extract() member function 2018-05-13 17:42:55 +02:00
956df21bd7 WiiSave: Use Common::BigEndianValue to simplify parsing
Gets rid of the need to manually cast when reading/writing, which is
error prone and repetitive.
2018-05-13 17:42:55 +02:00
fb39efbf90 WiiSave: Fix struct member naming 2018-05-13 17:42:55 +02:00
bae8bcde0a WiiSave: Do not expose internal constants 2018-05-13 17:42:55 +02:00
00bc1f28f2 Rename CWiiSaveCrypted to WiiSave 2018-05-13 17:42:55 +02:00
fa77e09239 Qt: Fix render widget not being on top when using -n / -e 2018-05-13 17:32:29 +02:00
5564150dd6 Merge pull request #6833 from leoetlino/dns
Use resolver to get default DNS nameserver
2018-05-13 15:49:50 +02:00
73bc20ead4 Use resolver to get default DNS nameserver 2018-05-13 14:05:23 +02:00
2ca75ae05a Qt/ControllersWindow: Fix changing devices while emulation is running 2018-05-13 14:04:39 +02:00
99dff10d43 Merge pull request #6837 from spycrab/qt_position
Qt/RenderWidget: Save position and size using QSettings
2018-05-13 11:47:04 +02:00
c267262a66 Merge pull request #6786 from stenzek/crop-negative-y
RenderBase: Ensure the draw size does not exceed the window size
2018-05-13 08:55:59 +02:00
760a0be28a Qt/RenderWidget: Save position and size using QSettings 2018-05-13 01:27:56 +02:00
66c1b909c2 Merge pull request #6765 from aldelaro5/Qt-debugger-fixes
Qt/debugger: fix a bunch of things
2018-05-13 01:20:11 +02:00
ad5a69be79 Merge pull request #6826 from spycrab/qt_netplay2
Qt/NetPlayDialog: Improve player list
2018-05-13 01:17:51 +02:00
5c688b2d2b Qt/debugger: Don't update the symbols list unnecessarily
It only needs to be updated when we changes the symbols, not every time the code widget updates and it does take a while to update them so this fixes some delay when updating the code window.
2018-05-12 19:15:26 -04:00
be6b4edb0c Qt/debugger: only resize the columns of the code view once per update
Putting the columns to resizeToContents causes way too much resizes per updates which can cause severe lags and even crashes.  This only does one resize at the end of the columns.
2018-05-12 19:15:26 -04:00
daf8df951c Qt/Debugger: Update the register view properly on pause and step 2018-05-12 19:15:24 -04:00
7388774f10 Qt/debugger: fix some possible crashes and inconsistencies in the breakpoint widget
One, which was also possible in Wx is to add an mbp after the core stopped which shouldn't be possible as it needs to add the memcheck on the core thread which wouldn't be running.  The other fix is Qt specific where it doesn't clear the breakpoints on stop.
2018-05-12 19:06:18 -04:00
09792fde70 Qt/debugger: recenter the code widget when selecting a breakpoint 2018-05-12 19:04:37 -04:00
53803c1fca Qt/debugger: fix minor issues in the breakpointWidget
The items were editable while you cannot edit the breakpoints at the moment and the last breakpoint deleted would not cause the row count to change to 0.
2018-05-12 19:04:37 -04:00
238c801711 Qt/debugger: properly updates when we break
The Host_UpdateDisasmDialog was unimplemented in Qt which is required to get updates when we break.  Additionally, this updates the debugger toolbar.
2018-05-12 19:04:30 -04:00
a4de3922e9 Merge pull request #6832 from leoetlino/wiiroot
WiiRoot: Copy initial NAND files with proper metadata
2018-05-12 18:25:21 -04:00
ecfb9d6691 Merge pull request #6835 from lioncash/move
Boot: Make BootExecutableReader's constructor take a std::vector by value
2018-05-12 23:52:30 +02:00
411fc01262 DolReader/ElfReader: Remove unnecessary FileUtil.h includes
These can be replace with File.h, as the only file-related things
necessary is the declaration of IOFile (which resides in File.h).
2018-05-12 17:41:17 -04:00
f7bc75ae6d Boot: Make BootExecutableReader's constructor take a std::vector by value
This allows avoiding two copies of the executable data being created in
the following scenario (using pseudocode):

some_function()
{
  std::vector<u8> data = ...;
  DolReader reader{data};

  ...
}

In this scenario, if we only use the data for passing it to DolReader,
then we have to perform a copy, as the constructor takes the std::vector
as a constant reference -- you cannot move from a constant reference,
and so we copy data into the DolReader, and perform another copy in the
constructor itself when assigning the data to the m_bytes member
variable. However, we can do better.

Now, the following is allowable as well:

some_function()
{
  std::vector<u8> data = ...;
  DolReader reader{std::move(data)};

  ...
}

and now we perform no copy at any point in the reader's construction, as
we just std::move the data all the way through to m_bytes.

In the case where we *do* want to keep the executable data around after
constructing the reader, then we can just pass the vector without
std::move-ing it, and we only perform a copy once (as we'll std::move
said copy into m_bytes). Therefore, we get a more flexible interface
resource-wise out of it.
2018-05-12 17:40:34 -04:00
48fa835bd3 WiiRoot: Copy initial NAND files with proper metadata 2018-05-12 22:54:34 +02:00
f91b729b61 Merge pull request #6825 from leoetlino/onion-types
Config: Fix implicit conversions/enum config types
2018-05-12 21:59:43 +02:00
e1169ef9ee Merge pull request #6824 from aldelaro5/custom-rtc-no-bias
RTC: Write 0 to the counter bias if we are on custom RTC
2018-05-12 21:59:13 +02:00
70ca98c8e7 Qt/debugger: change how the selected line in the code widget looks
Not only it colors the entire row instead of just the address, but if the pc is the selected row, the pc color will overwrite the selection, this is done via a stylesheet.
2018-05-12 15:47:16 -04:00
9a2dd470a0 Qt/debugger: change some colors logic in the codeWidget
This commit makes the colors hardcoded except when there is no symbols loaded, in which case, it uses the theme colors, except for the PC which is hardcoded to black on green.  This makes a compromise between making use of the corespoinding theme color and the text being nicely readable on all themes.
2018-05-12 15:47:16 -04:00
9bacb3cb26 Qt/RegisterView: fix minor aesthetic issues
This aligns the values to the right since It looks odd to be aligned to the left with any format other than hexadecimal.  It also sets the font tot he debugger font and disallow selection as a previous commit made the selection pointless since it now relies on the current item.
2018-05-12 15:47:16 -04:00