Commit Graph

24014 Commits

Author SHA1 Message Date
spycrab 0abce1419b Qt/NetPlayDialog: Fix broken IP label 2018-05-11 21:22:57 +02:00
spycrab 76f6c7523f
Merge pull request #6810 from spycrab/qt_fix_hotkey_conf
Qt/MappingButton: Fix occasionally broken indicator
2018-05-11 21:05:43 +02:00
spycrab 49d2f6f15a Qt/HotkeyScheduler: Use onion config 2018-05-11 20:47:30 +02:00
Léo Lam 1b070c4b6f IOS/KD: Migrate to new filesystem interface 2018-05-11 20:30:22 +02:00
Jonathan Hamilton 791c8401c1 Update mpark::variant implementation to 1.3.0
Fixes building on the latest clang shipping on MacOS
(Apple LLVM version 9.1.0 (clang-902.0.39.1))
2018-05-11 11:15:06 -07:00
Lioncash cdeed038bd
SDCardUtil: Replace macros with typed equivalents
Instead use a general template and specify which type we're writing out.
2018-05-11 12:33:07 -04:00
spycrab 16e2ac9257 VideoCommon/RenderBase: Refactor OSD messages 2018-05-11 18:24:08 +02:00
spycrab 1dfcffcce2 Qt/Debugger: Implement "JIT" widget 2018-05-11 18:10:35 +02:00
spycrab 082573bd6b
Merge pull request #6808 from spycrab/qt_hotkey_osd
Qt/HotkeyScheduler: Show OSD information
2018-05-11 15:51:37 +02:00
Lioncash 3b0139b258
SDCardUtil: Namespace SDCardUtil
Brings yet another header in the common library under the Common
namespace.
2018-05-11 09:19:30 -04:00
Lioncash 4e1547b3b2
SDCardUtil: Remove the use of IOFile's GetHandle() function
GetHandle() should really not even be part of IOFile's interface, but
since it is (for the time being), we can cull unnecessary usages of it.
In this case, the WriteBytes() function does what we need without using
the underlying handle directly.
2018-05-11 09:19:29 -04:00
Lioncash ad4150dae9
SDCardUtil: Join variables with declarations where applicable 2018-05-11 09:19:26 -04:00
Lioncash 1ffd0d2572
SDCardUtil: Make type of write_empty's "count" parameter size_t
This allows getting rid of casts. We can also leverage std::min to allow
making relevant variables const. Also make the "empty" table const to
allow it to be read-only.
2018-05-11 08:55:05 -04:00
Lioncash c26de8107d
SDCardUtil: Convert return type of write_* functions to bool
Converts them from 0 == success, 1 == failure to using the built-in
standard bool. Also while we're at it, const qualify write_sector's
"sector" parameter, since nothing in the function modifies the data
being pointed to.
2018-05-11 08:29:37 -04:00
Lioncash 5fc18aa639
SDCardUtil: Replace sector size magic value with relevant named constant
Makes variable use consistent throughout the file.
2018-05-11 08:25:35 -04:00
spycrab 66190ae4d6 Qt/HotkeyScheduler: Show OSD information 2018-05-11 12:49:20 +02:00
spycrab 242fadc76f Qt/MappingButton: Fix occasionally broken indicator 2018-05-11 12:37:48 +02:00
Léo Lam e1866d35e5
Merge pull request #6807 from leoetlino/boot
Boot: Migrate to new filesystem interface
2018-05-11 10:41:00 +02:00
Léo Lam 5071973a51
Merge pull request #6805 from spycrab/qt_netplay
Qt/NetPlayDialog: Multiple improvements
2018-05-11 10:39:53 +02:00
Léo Lam d1bb5249ec
Merge pull request #6801 from stenzek/copy-filter-typo
D3D/Vulkan: Fix incorrect clamp in EFB RAM copy
2018-05-11 10:36:47 +02:00
Léo Lam 066e4ea463
Merge pull request #6809 from lioncash/macro
CommonFuncs: Convert ROUND_UP_POW2 macro to a function
2018-05-11 10:16:29 +02:00
Lioncash 6d0cab3743 DolphinQt2/MemoryWidget: Use QString's toUtf8() where applicable instead of toStdString()
Avoids needing to iterate and append the characters in one case. This also
alters the function to not need to construct a temporary std::string
(QString's toUtf8() is sufficient, as QByteArray exposes iterators).

toStdString() is equivalent to retrieving the QString's underlying
QByteArray via calling QString's .toUtf8 member function and then
calling .toStdString() on the result of it (discarding the QByteArray
afterwords), so this just trims off an unnecessary step in the process.

This is also somewhat more indicative of the conversions going on:
toStdString() converts the underlying character sequence of a
QString to UTF-8, not strict ASCII, so we're really using a superset of
ASCII.
2018-05-10 22:10:45 -04:00
Lioncash ba01f6dba3 CommonFuncs: Convert ROUND_UP_POW2 macro to a function
Also move it to MathUtils where it belongs with the rest of the
power-of-two functions. This gets rid of pollution of the current scope
of any translation unit with b<value> macros that aren't intended to be
used directly.
2018-05-10 19:42:20 -04:00
Léo Lam a977a56434 Boot: Migrate to new filesystem interface 2018-05-10 22:34:03 +02:00
Léo Lam e6c489f1d4 ES: Move title dir creation logic into separate function
Since we're going to need it in the boot code, move it out to a
separate, easily reusable function. This also makes the InitImport
logic clearer.
2018-05-10 22:33:49 +02:00
Léo Lam 722d31124c SettingsHandler: Fix const correctness 2018-05-10 21:35:27 +02:00
Léo Lam 09d2afa91f SettingsHandler: Migrate to new filesystem interface
Change SettingsHandler to take a buffer instead of assuming that the
setting file to read is always on the host filesystem for more
flexibility and make it possible to use the new filesystem interface.
2018-05-10 21:35:27 +02:00
spycrab 3cca051850
Merge pull request #6806 from spycrab/qt_iowindow_crash
Qt/IOWindow: Fix crash
2018-05-10 21:18:48 +02:00
spycrab 146979f67e Qt/IOWindow: Fix crash 2018-05-10 21:12:19 +02:00
spycrab 09449e2bca Qt/NetPlayDialog: Use QToolButton instead of a QComboBox 2018-05-10 20:51:12 +02:00
spycrab 26bee93943 Qt/NetPlayDialog: Show more friendly interface names 2018-05-10 20:51:12 +02:00
spycrab 0141ce9305 Qt/NetPlayDialog: Restore window geometry 2018-05-10 20:51:12 +02:00
spycrab 0ee7bddd4f Qt/NetPlayDialog: Add splitter 2018-05-10 20:51:12 +02:00
spycrab 6ea2b2e7e5 Qt/NetPlayDialog: Fix duplicate messages 2018-05-10 20:51:12 +02:00
spycrab 7550389c72 Qt/NetPlayDialog: Escape HTML in chat 2018-05-10 19:19:09 +02:00
spycrab 893c5e694e Qt/NetPlayDialog: Use more readable colors 2018-05-10 19:14:19 +02:00
Léo Lam d8e1d2d573
Merge pull request #6803 from lioncash/tidy
FloatUtils: Remove IntDouble and IntFloat
2018-05-10 19:04:49 +02:00
Lioncash 0a3631cc76
FloatUtils: Remove IntDouble and IntFloat
Type punning via unions in C++ invokes undefined behavior. Instead, leverage BitCast,
our variant of C++2a's std::bit_cast
2018-05-10 12:28:09 -04:00
Lioncash bde4e970f1
FloatUtils: Clean up memcpy usages
Now that we have BitCast, we can use that instead.
2018-05-10 12:28:09 -04:00
Lioncash b3292298c9
BitUtils: Add C++14/C++17 compatible equivalent of std::bit_cast from C++2a
Given bit conversions between types are quite common in emulation
(particularly when it comes to floating-point among other things) it
makes sense to provide a utility function that keeps all the boilerplate
contained; especially considering it makes it harder to accidentally
misuse std::memcpy (such as accidentally transposing arguments, etc).

Another benefit of this function is that it doesn't require separating
declarations from assignments, allowing variables to be declared const.
This makes the scenario of of uninitialized variables being used less
likely to occur.
2018-05-10 12:28:05 -04:00
spycrab 6e9d0ff6de
Merge pull request #6802 from Neui/qt-remember-main-window-position-and-size
Qt: Save and restore main window size and position
2018-05-10 18:26:38 +02:00
Neui f6d5896bc7 Qt: Save and restore main window size and position 2018-05-10 18:19:17 +02:00
Léo Lam 28915049b5
Merge pull request #6797 from leoetlino/uid
Move all UID constants to a single file
2018-05-10 18:16:04 +02:00
Stenzek 3493d738ca D3D/Vulkan: Fix incorrect clamp in EFB RAM copy
This could cause darker-than-expected EFB copies if clamping was not
enabled, and the user forced EFB copies to RAM only.
2018-05-11 00:32:39 +10:00
spycrab 273579bc32 Qt/Win32: Fix font weight calculation 2018-05-10 14:01:55 +02:00
spycrab fd1ea63383
Merge pull request #6788 from spycrab/qt_gconf_fixes
Qt/GraphicsWindow: Fix multiple issues
2018-05-10 12:16:19 +02:00
spycrab be007b436c Qt/GraphicsWindow: Fix software renderer breaking layout 2018-05-10 12:08:23 +02:00
spycrab 074a17482b Qt/GraphicsWindow: Refresh settings on construction 2018-05-10 12:08:23 +02:00
spycrab 6a34f2b47c Qt/GeneralWidget: Fix "No" response to backend switch confirmation 2018-05-10 12:08:23 +02:00
spycrab b7b6b5162c Qt/GeneralWidget: Refresh backend settings properly 2018-05-10 12:08:23 +02:00
spycrab e380df2e59 Qt/MainWindow: Call Config::Save last before destruction 2018-05-10 12:05:58 +02:00
spycrab 18c7d295c9 Qt/FilesystemWidget: Fix moc compilation 2018-05-09 22:35:27 +02:00
Léo Lam e56387970a Move all UID constants to a single file
Keeps them all next to each other and deduplicates a few constants,
notably the PPC UIDs. Apparently I forgot that I already added them
for SetupStreamKey.
2018-05-09 21:08:24 +02:00
Léo Lam 169e1d3368
Merge pull request #6795 from lioncash/atomic
Atomic_Win32: Replace deprecated (and since been removed) barrier intrinsics
2018-05-09 19:46:00 +02:00
Léo Lam 91f59aa7e1
Merge pull request #6794 from lioncash/float
FloatUtils: Minor cleanup
2018-05-09 19:36:33 +02:00
Léo Lam 274f418f4b
Merge pull request #6789 from leoetlino/rename-bug
IOS/FS: Fix rename not handling existing target correctly
2018-05-09 19:07:39 +02:00
Léo Lam 1016674242
Merge pull request #6791 from aldelaro5/wii-epoch-fix
Wii: Fix the Wii epoch and make the IPL.CB 0 by default
2018-05-09 19:06:25 +02:00
Lioncash e020f5b04b RenderBase: Remove unused PixelPerfQuery enum
Neither the values or the identifier name of the enum is used anywhere
in the codebase.
2018-05-09 12:11:29 -04:00
Lioncash 593bad3253 Atomic_Win32: Replace deprecated (and since been removed) barrier intrinsics
As of VS 15.7, these seem to have been removed. Given we shouldn't have
been using these for some time, just replace them with the standard
library equivalent.

This fixes building on Windows with VS 15.7
2018-05-09 11:35:35 -04:00
Lioncash f29e7fea2a FloatUtils: Remove union type punning from ClassifyX functions
Type-punning via unions is undefined behavior in C++

Also take the liberty of cleaning these up a little bit by removing
unnecessary else usages.
2018-05-09 10:25:23 -04:00
Lioncash fe218ea3f6 FloatUtils: Remove union type punning from ApproximateReciprocal functions
This form of type punning invokes undefined behavior in C++
2018-05-09 10:05:29 -04:00
Lioncash 46a4243d9a FloatUtils: Remove using namespace std in ApproximateReciprocal()
This was made quite a long time ago when we supported 32-bit ARM targets
2018-05-09 09:36:23 -04:00
spycrab 5cd02f0853
Merge pull request #6793 from spycrab/qt_hotkeys
Qt: Implement missing hotkeys
2018-05-09 13:28:53 +02:00
aldelaro5 224a9426db
Fix the Wii epoch and make the IPL.CB 0 by default
It was off by about 8 years because it was actually the same as the GC epoch, however, the reason it worked all this time was because the default RTC counter bias of the Wii was not 0, but a value that is about 8 years in seconds.  This broke custom RTC as a custom RTC of the gc epoch was underflowing b ecause the wii epoch was thought to be much later.
2018-05-09 02:45:56 -04:00
spycrab ce32447726 Qt: Implement missing hotkeys 2018-05-09 08:27:04 +02:00
Starsam80 ebf6149ad4
Qt: Use `addLayout` instead of `addItem` when adding layouts 2018-05-08 17:54:47 -06:00
Léo Lam 7feabcd096 IOS/FS: Fix rename not handling existing target correctly
The existing backend did not handle cases where the target exists
correctly.

This is a bug that has been around forever but was only recently
exposed when ES started to use our FS code.

Also adds some unit tests to make sure this won't get broken again.
2018-05-08 23:55:13 +02:00
Léo Lam 10d230a512
Merge pull request #6784 from leoetlino/file-creation
IOS: Make file creation + open more concise
2018-05-08 23:27:35 +02:00
spycrab 2852959811 Qt: Restore render widget size and position 2018-05-08 16:03:13 +02:00
Léo Lam a9987588eb
Merge pull request #6768 from spycrab/qt_stylesheet
Qt: Allow custom stylesheets
2018-05-08 15:20:19 +02:00
Stenzek fd5aaa096c RenderBase: Ensure the draw size does not exceed the window size
This was happening when crop was enabled, causing blank outputs for some
Vulkan drivers (namely radv), as the draw rectangle is used as the
viewport.
2018-05-08 23:19:38 +10:00
spycrab 0170052f5d Qt: Allow custom stylesheets 2018-05-08 15:07:50 +02:00
Léo Lam f0e6fcfb07
Merge pull request #6785 from JosJuice/stringutil-order
StringUtil.h: Move ThousandSeparate down
2018-05-08 14:31:57 +02:00
JosJuice 965c423f1c StringUtil.h: Move ThousandSeparate down
It calls UTF16ToUTF8 on Windows, so it should come after UTF16ToUTF8.
2018-05-08 13:55:07 +02:00
Léo Lam 71afe6b4a6 IOS: Make file creation + open more concise
Creating a file then opening it in read write mode is a pretty common
operation. This commit adds a helper function that makes it easier
to read and clearer.
2018-05-08 13:07:30 +02:00
Léo Lam 90f869e940
Merge pull request #6772 from leoetlino/fs-es
IOS/ES: Migrate to new filesystem interface
2018-05-08 11:55:52 +02:00
Léo Lam f97711ac02
Merge pull request #6777 from lioncash/header
Common: Move floating-point utility functions to FloatUtils.h/.cpp
2018-05-08 11:55:25 +02:00
booto 823fdda30c intrinsics: stop defining _xgetbv/_XCR_XFEATURE_ENABLED_MASK, which are reserved 2018-05-08 17:25:33 +08:00
Anthony 1ec3a4db6c
Merge pull request #6763 from spycrab/qt_fix_prog
Qt/AdvancedWidget: Fix "Enable Progressive Scan"
2018-05-07 09:59:32 -07:00
Anthony 46236920ef
Merge pull request #6767 from spycrab/qt_whatsthis2
Qt: Make dialogues more consistent
2018-05-07 09:58:15 -07:00
Anthony 8212b6e9cf
Merge pull request #6769 from spycrab/qt_fix_netplay
Qt/NetPlay: Fix crashes on start
2018-05-07 09:57:02 -07:00
Anthony ecd9b94415
Merge pull request #6779 from spycrab/qt_trans_fix
Qt/WrapInScrollArea: Only use transparency on Windows
2018-05-07 09:56:47 -07:00
Anthony e62c26c34b
Merge pull request #6781 from spycrab/qt_rtm_addendum
Qt/GeneralWidget: Various fixes
2018-05-07 09:53:20 -07:00
spycrab 8f9bc2f3e4 Qt: Implement custom fullscreen resolution support 2018-05-07 18:38:59 +02:00
spycrab a2448c5b66 Qt/GeneralWidget: Various fixes 2018-05-07 17:50:03 +02:00
Markus Wick 6f0ad84a5e
Merge pull request #6764 from spycrab/qt_fix_rtm
Qt: Fix "Render To Main"
2018-05-07 17:33:56 +02:00
spycrab fc069f709e Qt/WrapInScrollArea: Only use transparency on Windows 2018-05-07 17:23:03 +02:00
Stenzek 501b35bbf2 OGL: Fix broken format changes in i965 driver 2018-05-08 00:11:27 +10:00
Markus Wick e31c571f51
Merge pull request #6646 from spycrab/fbm_strings
OGL/FramebufferManager: Clean up inline GLSL code
2018-05-07 08:58:56 +02:00
Lioncash 86018b503b Common: Move floating-point utility functions to FloatUtils.h/.cpp
Keeps all of the floating-point utility functions in their own file to
keep them all together. This also provides a place for other
general-purpose floating-point functions to be added in the future,
which will be necessary when improving the flag-setting within the
interpreter.
2018-05-07 02:56:32 -04:00
Markus Wick 756ef54ab6
Merge pull request #6770 from lioncash/ile
PowerPC: Fix copying of the MSR.ILE bit to MSR.LE
2018-05-07 08:52:05 +02:00
Markus Wick b007210761
Merge pull request #6774 from lioncash/enum
Interpreter_FPUtils: Make FPCC enum an enum class
2018-05-07 08:48:22 +02:00
Markus Wick 6ec1e742ae
Merge pull request #6773 from lioncash/fpscr
PowerPC: Make the PowerPCState's fpscr member variable a UReg_FPSCR instance
2018-05-07 08:47:14 +02:00
Anthony fcc5095d8c
Merge pull request #6776 from lioncash/type
x64Emitter: Use an enum class to represent FixupBranch branch types
2018-05-06 19:09:54 -07:00
Anthony d131e4d2bc
Merge pull request #6775 from lioncash/flags
Interpreter_FPUtils: Properly update the FPSCR's FEX bit in UpdateFPSCR()
2018-05-06 19:07:13 -07:00
Lioncash 82b1518342 x64Emitter: Use an enum class to represent FixupBranch branch types
Gets rid of the use of magic values and replaces them with strongly
typed symbolic names.
2018-05-06 22:05:03 -04:00
Lioncash 64d1865448 Interpreter_FPUtils: Properly update the FPSCR's FEX bit in UpdateFPSCR()
FPSCR.FEX is supposed to be a logical OR of all floating-point exception
bits masked by their respective enable bits.

Currently UpdateFPSCR() isn't called by anything in the interpreter
except for mcrfs and mffs, so this doesn't alter existing behavior that much.
However, this will be necessary in future PRs when making the interpreter more
accurate in how it sets flags.
2018-05-06 21:40:00 -04:00
Lioncash d5de49f9aa Interpreter_FPUtils: Make FPCC enum an enum class
Avoids dumping two letter identifiers into global scope
2018-05-06 19:32:09 -04:00
Lioncash 69a0aaebd4 Gekko: Make UReg_FPSCR's single argument constructor explicit
Prevent implicit conversions to UReg_FPSCR. Given the semantics of a
random magic value and the FPSCR are different, make explicit
conversions a requirement to signify intent.
2018-05-06 18:46:57 -04:00
Lioncash cb5926c1ca PowerPC: Make the PowerPCState's fpscr member variable a UReg_FPSCR instance
Gets rid of the need to cast the actual member to access information without bit shifts and masking.
2018-05-06 18:46:52 -04:00