Commit graph

20771 commits

Author SHA1 Message Date
Léo Lam
ad5a69be79
Merge pull request #6826 from spycrab/qt_netplay2
Qt/NetPlayDialog: Improve player list
2018-05-13 01:17:51 +02:00
Mat M
a4de3922e9
Merge pull request #6832 from leoetlino/wiiroot
WiiRoot: Copy initial NAND files with proper metadata
2018-05-12 18:25:21 -04:00
Lioncash
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
Lioncash
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
Léo Lam
48fa835bd3 WiiRoot: Copy initial NAND files with proper metadata 2018-05-12 22:54:34 +02:00
Léo Lam
f91b729b61
Merge pull request #6825 from leoetlino/onion-types
Config: Fix implicit conversions/enum config types
2018-05-12 21:59:43 +02:00
Léo Lam
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
Lioncash
0ef7dca0d4 SettingsHandler: Remove redundant type qualifier in SetBytes()
Given the qualifier isn't used for the constructor taking a buffer, remove it here
to be consistent.
2018-05-12 13:53:42 -04:00
Lioncash
1da2091801 SettingsHandler: Remove unnecessary includes
All Windows-specific includes aren't needed here anymore.
2018-05-12 13:53:37 -04:00
Lioncash
5677e5d74a SettingsHandler: Namespace code under the Common namespace
Adds another file in Common to the Common namespace.
2018-05-12 13:39:37 -04:00
spycrab
bf0ee9f702
Merge pull request #6822 from spycrab/qt_fix_defaults
Qt: Fix mapping defaults
2018-05-12 19:22:53 +02:00
spycrab
d8a95834f3 Qt/NetPlayDialog: Improve player list 2018-05-12 18:25:38 +02:00
Léo Lam
6763a3fce1 Config: Add support for enums
This makes it possible to use enums as the config type.
Default values are now clearer and there's no need for casts
when calling Config::Get/Set anymore.

In order to add support for enums, the common code was updated to
handle enums by using the underlying type when loading/saving settings.

A copy constructor is also provided for conversions from
`ConfigInfo<Enum>` to `ConfigInfo<underlying_type<Enum>>`
so that enum settings can still easily work with code that doesn't care
about the actual enum values (like Graphics{Choice,Radio} in DolphinQt2
which only treat the setting as an integer).
2018-05-12 18:10:26 +02:00
Markus Wick
be0f4f7fb2
Merge pull request #6828 from ScoreUnder/syntaxfix2
Fix syntax error in GLSL_GS
2018-05-12 17:37:33 +02:00
Léo Lam
94dc746351 Copy Wii NAND data to user NAND in WiiRoot
Dolphin doesn't use any of the WC24 files, so this can be done when
actually starting emulation in WiiRoot. The benefit of moving the
copy is that we don't need to handle temporary NANDs in a special way.
2018-05-12 17:08:50 +02:00
Léo Lam
5f567b38fe WiiRoot: Move content manipulation to separate functions
{Initialize,Shutdown}WiiRoot should only be responsible for setting the
SESSION_WII_ROOT or managing the temporary NAND directory.

Move all the content manipulation out of these functions to ensure
separation of concerns and call them after/before WiiRoot init/shutdown
to make sure they operate on the correct root.
2018-05-12 17:06:31 +02:00
Stenzek
a446b096cb Jit64: Invalidate cached constant values w/o host register on flush
If we don't flush the values, they persist in the register cache,
potentially resulting in the values being out of sync with PPCSTATE.

This was causing random crashes in games, mainly booting, when certain
JIT instructions were disabled, or forced to fall back to interpreter.
2018-05-13 00:50:31 +10:00
Score_Under
4e7caa2818 Fix syntax error in GLSL_GS 2018-05-12 15:42:18 +01:00
Score_Under
70b00f2b2d Remove stray quote sign
This allows GLSL_EFB_POKE_GEOMETRY_GS to compile again.
2018-05-12 15:21:29 +01:00
Léo Lam
7dca7c237e Config: Fix template deduction for implicit conversions
This excludes the second argument from template deduction.

Otherwise, it is required to manually cast the second argument to
the ConfigInfo type (because implicit conversions won't work).

e.g. to set the value for a ConfigInfo<std::string> from a string
literal, you'd need a ugly `std::string("yourstring")`.
2018-05-12 14:30:18 +02:00
Léo Lam
e78235943e
Merge pull request #6823 from spycrab/qt_reset_hotkey
Qt: Implement "Reset" hotkey
2018-05-12 13:12:24 +02:00
Léo Lam
a712cfe339
Merge pull request #6624 from spycrab/qt_dbg_jit
Qt/Debugger: Implement "JIT" widget
2018-05-12 13:02:47 +02:00
aldelaro5
4b2906c569
RTC: Write 0 tot he counter bias if we are on custom RTC
This can be considered a hack, but it essentially neuter the bias applied on boot for both console on the RTC.  This avoids having the time on boot be changes significantly while the user would want a specific RTC and it also avoids possible underflow of the RTC if it is near the epoch.
2018-05-12 01:37:48 -04:00
spycrab
226b6888d6 Qt: Implement "Reset" hotkey 2018-05-12 03:56:10 +02:00
spycrab
c118af73c2 Qt: Fix mapping defaults 2018-05-12 01:31:42 +02:00
Lioncash
a85aa73c4d
FileUtil: Remove unnecessary IOFile GetHandle() call in ReadFileToString()
We can just use IOFile's GetSize() function to do the same thing. While
we're at it, get rid of unnecessary variables.
2018-05-11 16:27:33 -04:00
Anthony
f0c5b76186
Merge pull request #6677 from 404-Name-Not-Found/master
Fix test rumble feature in controller configuration
2018-05-11 12:51:52 -07:00
Anthony
968779e623
Merge pull request #6814 from lioncash/sd
SDCardUtil: Minor changes
2018-05-11 12:39:17 -07:00
Anthony
ee1a175205
Merge pull request #6816 from leoetlino/kd
IOS/KD: Migrate to new filesystem interface
2018-05-11 12:37:10 -07:00
Mat M
b938e15699
Merge pull request #6818 from JonnyH/WIP/variant-update
Update mpark::variant implementation to 1.3.0
2018-05-11 15:36:23 -04:00
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