Commit Graph

15973 Commits

Author SHA1 Message Date
JosJuice 7a4f19ed98 IOS HLE: Correct handling of paths that don't start with / 2016-11-27 22:10:41 +01:00
JosJuice c74c317ab5 IOS HLE: More robust escaping of NAND paths
Prevents path traversal without needing an absolute path
function, and also improves accuracy (character sequences
like ../ appear to have no special meaning in IOS).

This removes the creation and usage of /sys/replace,
because the new escapes are too complicated to all
be representable in its format and because no other
NAND handling software seems to use /sys/replace.
2016-11-26 22:49:46 +01:00
JosJuice de355a8521 Revert "IOS HLE: Prevent accessing host file system"
This reverts commit 141f3bfb3a.
The implementation of getting absolute paths wasn't working
on non-Windows systems, which is a huge problem for IOS HLE.
2016-11-26 15:50:28 +01:00
Anthony c84ab13e81 Merge pull request #4375 from leoetlino/ipc-hle-small-cleanup
IPC_HLE: Small cleanup
2016-11-25 17:50:14 -06:00
Anthony 6473a485d0 Merge pull request #4460 from linkmauve/no-miniupnpc
NetPlay: Fix build when miniupnpc is disabled
2016-11-25 16:28:27 -06:00
aldelaro5 7e99d03b7f Add the ability to get partial input group
For hotkeys, changed HotkeyManager to allow to get and make partial groups of hotkeys.

Also preserved the old configuration naming scheme for the ini, this is done to preserve compatibility with the older groups structure.

Add the ability to get GCPad control groups

Used like the HotkeyManager methods, this is used for the new GCPad configuration dialog.

Add the ability to get groups of Keyboard input

Same reasons as the previous ones.

Add ability to get groups of Wiimote input

Add the ability to get extensions group

This needed to pass to 3 classes.  Will be used for their respective dialogs.
2016-11-25 02:37:22 -05:00
Anthony 11243ac358 Merge pull request #4470 from aldelaro5/fix-slowdown-logs
Change the patch engine log to be debug level log
2016-11-24 16:25:53 -06:00
Léo Lam 5b44b37902 IPC_HLE: USB_KBD: Use the correct log type
Fixes logging to use the correct log type; it was originally STM
(likely an oversight).
2016-11-24 20:23:52 +01:00
Léo Lam 20f2955ad9 IPC_HLE: Remove dead code (Wiimote and emulated BT)
Neither needed or used in the emulated Bluetooth code.
2016-11-24 20:23:52 +01:00
Léo Lam f82051a365 IPC_HLE: In-class initialise member variables 2016-11-24 20:23:52 +01:00
Léo Lam 3263831928 IPC_HLE: Clean up includes (IWYU)
Apply automated fixes by include-what-you-use (IWYU) (with some minor
changes).

IPC_HLE should now be essentially free of indirect includes.
2016-11-24 20:23:51 +01:00
Léo Lam 1e94fdba3c IPC_HLE: Device: Separate implementation from declaration
I know there is already #3521, but it currently needs a rebase and I
needed to add something to IPC_HLE_Device properly, that is, without
putting everything in the header, so this commit cleans up
IPC_HLE_Device first. (And only IPC_HLE_Device: the rest will still
be handled by #3521.)

Also fixes a few indirect includes (removing unused header includes
from IPC_HLE_Device.h broke building)
2016-11-24 20:19:19 +01:00
Léo Lam 741a638f3e IPC_HLE: USB_VEN: Clean up (includes and naming) 2016-11-24 20:19:18 +01:00
Léo Lam b0377f02f0 IPC_HLE: Deduplicate syscall reply enqueue function
This is something that was copy-pasted across the IPC_HLE code
(because it's often used). Since all of the duplicated pieces of code
do the same thing as the previous EnqueueReply, except that they also
write to command_address + 0 and + 8 (to write the correct reply type),
this commit changes EnqueueReply to do that instead of having it
duplicated all over IPC HLE.
2016-11-24 20:19:18 +01:00
JosJuice 9bfea4a0f2 Merge pull request #4447 from JosJuice/hthh-hle-issues
Fix exploitable HLE problems reported by hthh
2016-11-24 15:53:23 +01:00
aldelaro5 c6b3c67ea1 Change the patch engine log to be debug level log
It was apparently causing heavy slowdowns on game even though it wouldn't spam much, probably caused by the amount of additional check caused by the logs levels changes.
2016-11-23 00:58:07 -05:00
Stenzek 6d0b9b816f VideoCommon: Support dumping frames to images
This is mainly for potential Android fifoci usage, and thus is not
exposed anywhere in the UI. To enable, set DumpFramesAsImages under
Settings in GFX.ini.
2016-11-23 12:07:49 +10:00
Ryan Meredith 6d55aebcf7 Typo_Fix 2016-11-21 23:23:48 -05:00
Emmanuel Gil Peyrot c4cd0d444a NetPlay: Fix build when miniupnpc is disabled. 2016-11-19 15:36:26 +00:00
Stenzek 1aecf90765 DolphinNoGUI: Receive resize events and notify backend when this occurs
Solves the viewport sizing issue for backends that cannot tell when the
window is resized (Vulkan on NV at least).
2016-11-19 23:03:20 +10:00
Stenzek d6d3341183 D3D: Fix strided XFB copies 2016-11-19 20:29:51 +10:00
Stenzek 6b88a854a7 Vulkan: Handle strided XFB copies
Where src_rect.width * 2 != dst_stride.
2016-11-19 20:29:47 +10:00
Léo Lam 165e3a9936 IPC_HLE: Fix emulated BT crash (uninitialised memory)
When the emulated BT device is created, m_HCIEndpoint (which is a
CtrlBuffer)'s m_cmd_address is not initialised to 0. So it ends up
being a random value. This is normally not an issue… but the
emulated Bluetooth code relies on m_cmd_address to know whether the
HCI endpoint is still valid.

This is a problem with ES_Launch, because the bt_emu class is
destructed and re-constructed, and while m_cmd_address is still
uninitialised, the ES_Launch code disconnects all Wii remotes,
which triggers a HCI event and hence the bug.
2016-11-19 00:11:41 +01:00
Stenzek 725ef4c5dc Vulkan: Pass target_rect to framebuffer draw methods
Fixes the black borders in frame dumps when the window was not sized to
the framebuffer aspect ratio.
2016-11-18 22:55:22 +10:00
hthh 4d2f058fe8 DolphinWX: Fix toolbar creation on macOS 2016-11-18 21:32:12 +11:00
Markus Wick 6c16f1be8a Merge pull request #4416 from stenzek/vulkan-cmdpool
Vulkan: Use multiple command pools, one per frame
2016-11-16 10:25:10 +01:00
Stenzek 3c92b35422 Vulkan: Use multiple command pools, one per frame
Instead of resetting two command buffers, now we only have to call
vkResetCommandPool once at the start of a frame.

NV's recommends using one pool per frame/thread. May offer a very small
boost in performance on some systems.
2016-11-15 00:40:15 +10:00
Stenzek e83bf5705a JitArm64: Don't emit normal block exit for branch-to-self instructions
The normal block exit is redundant as the exception exit will jump out of
the block first, meaning this code is never executed.
2016-11-15 00:28:14 +10:00
Stenzek c657134c86 Jit64: Treat branch-to-self instruction as an idle loop 2016-11-15 00:26:59 +10:00
Stenzek bd67adb362 Vulkan: Use correct sample count for EFB pokes with MSAA enabled 2016-11-14 20:24:16 +10:00
Stenzek 89176fe2ab Vulkan: Fix crash on EFB poke 2016-11-14 20:19:59 +10:00
Pringo f848418efa Update FIFO Player Window Capitalization 2016-11-13 20:44:18 -08:00
Jules Blok 99de9fbe33 Merge pull request #4443 from Armada651/exclusive-ui
D3D: Move exclusive mode switching to UI thread.
2016-11-14 01:45:07 +01:00
Jules Blok 7e35a47b51 Cosmetics. 2016-11-13 22:17:40 +01:00
Markus Wick bc98ec77be Merge pull request #4441 from stenzek/vulkan-max-image-count
Vulkan: Handle maxImageCount of zero when creating swap chain
2016-11-13 14:12:32 +01:00
Markus Wick c723532f0d Merge pull request #4430 from stenzek/vulkan-no-relaxed-vsync
Vulkan: Don't use FIFO_RELAXED present mode for vsync.
2016-11-13 14:10:58 +01:00
JosJuice 141f3bfb3a IOS HLE: Prevent accessing host file system 2016-11-13 10:03:23 +01:00
JosJuice a79c449493 Avoid buffer over-reads in /dev/net/ip/top
Also fixes the less serious problem of buffer overflows
in emulated memory when BufferOutSize is less than 2.
2016-11-13 08:44:05 +01:00
JosJuice b47e607105 HLE_OS: More bounds checking in GetStringVA 2016-11-12 19:17:15 +01:00
JosJuice 3d80d454ce HLE_OS: Implement %n in GetStringVA
%n writes to a pointer that's provided as a parameter.
We didn't have a custom implementation of this before,
meaning that %n would trigger a write to the host
memory instead of the emulated memory!
2016-11-12 19:16:55 +01:00
JosJuice 656999d4c2 Correct bounds checking for /dev/sdio/slot0
The bounds checks in IOCtl were using 0x200 as the size of
m_Registers, which is more than the actual size, 0x200 / 4.

This commit turns m_Registers into an std::array to allow
for a correct and obvious way of getting its size.
2016-11-12 19:09:03 +01:00
Jules Blok aa0e4472c0 Frame: Move exclusive mode switching to helper function. 2016-11-11 21:24:08 +01:00
Lioncash f207c01586 NetPlayLauncher: Add missing #pragma once 2016-11-11 14:58:20 -05:00
Jules Blok d8201a7e8b Frame: Remove exclusive mode OSD messages. 2016-11-11 20:36:11 +01:00
Jules Blok d7cf5e28b6 Frame: Use PauseAndLock when switching fullscreen modes.
This allows us to regain exclusive mode directly from OnActive().
2016-11-11 20:36:10 +01:00
Jules Blok 9909babe2c D3DBase: Create the swapchain in fullscreen mode if enabled. 2016-11-11 20:36:10 +01:00
Jules Blok 0028ee96b3 Host: Remove the Host_RequestFullscreen() method.
No longer needed, since the exclusive mode switch is now handled synchronously on the CPU thread.
2016-11-11 20:36:09 +01:00
Jules Blok 0a194f8a3e VideoConfig: Remove fullscreen flags.
These weren't actually settings, they were used as a bad way to communicate with the GPU thread.
2016-11-11 20:36:09 +01:00
Jules Blok c21efa0cad D3D: Move exclusive mode switching to UI thread.
This prevents deadlocks when switching to exclusive mode.
And it also allows the CPU thread to block until we've completed the switch.
2016-11-11 20:36:04 +01:00
Jules Blok f0ce3275af Merge pull request #4439 from Armada651/yield-ui
CPU: Fix deadlocks by periodically yielding to the UI message pump.
2016-11-11 20:30:31 +01:00
Lioncash cd9520f458 CodeWindow: In-class initialize variables where applicable 2016-11-11 13:31:36 -05:00
Lioncash 492b82042d CodeWindow: Remove unused parameter from constructor 2016-11-11 13:20:47 -05:00
Stenzek 160fee6791 Vulkan: Handle maxImageCount of zero when creating swap chain
anv seems to set this to zero, which is fine according to the spec, but
we were using it as a maximum, which was resulting in a swap chain
without any buffers being created.
2016-11-11 23:33:40 +10:00
Jules Blok 20d49ba97f DolphinQt2: Implement Host_YieldToUI(). 2016-11-11 13:42:18 +01:00
Jules Blok 05a3f927ee CPU: Fix deadlocks by periodically yielding to the UI message pump. 2016-11-11 13:37:03 +01:00
Jules Blok 8203ea929b BlockingLoop: Yield to UI message pump while waiting. 2016-11-11 13:37:02 +01:00
Lioncash 2d9ef3412a GCAdapterConfigDiag: Mark OnUpdateAdapter parameter as unused. 2016-11-10 20:19:53 -05:00
Lioncash 1ae9027a6b GCAdapterConfigDiag: Rename UpdateAdapter to OnUpdateAdapter
Uses the general naming convention for event functions.
2016-11-10 20:18:59 -05:00
Lioncash c5c7ff9fd6 GCAdapterConfigDiag: Make functions private where applicable
These don't need to be in the public interface.
2016-11-10 20:12:02 -05:00
Mat M c77d4a765d Merge pull request #4425 from lioncash/ipc
IPC_HLE: Move NWC24Config and WiiNetConfig to their own source files
2016-11-10 16:55:43 -05:00
Jules Blok 03878a44e1 Merge pull request #4433 from Armada651/the-emu-that-runs-faster-than-its-race-condition
FrameTools: Avoid deadlock in UpdateGUI().
2016-11-10 16:50:13 +01:00
Lioncash 97bd77c928 Frame: Remove unused menu variable
This has been unused since the introduction of the MainMenuBar class
that abstracts away all of the wxMenuBar UI loading.
2016-11-10 07:33:52 -05:00
Mat M 0b9562b0d5 Merge pull request #4434 from lioncash/path
PathConfigPane: Eliminate main frame global usage
2016-11-10 07:31:31 -05:00
degasus 193dd97759 VideoCommon: Drop FlipImageData.
This function isn't used any more, and good code shouldn't use it at all. Use negative strides instead.
2016-11-10 12:59:22 +01:00
degasus 3816207d7b OGL: Fix frame dump on emulation close. 2016-11-10 12:59:22 +01:00
degasus 21774bdc81 OGL: Only flush the frame dumping thread on dumping.
This fixes the screenshot stutter, as this needs more than a frame.
So we won't stall on the png writing at all until emulation stops or
a new screenshot is requested.
2016-11-10 12:59:22 +01:00
degasus 52caa4f2f5 VideoCommon/Render: Inplace frame dump encoding.
This increase the performance of good backends a bit, but slows down the bads one a lot.
Let's fix those backends instead of forcing stupid memcpy in the common code.
2016-11-10 12:59:19 +01:00
Stenzek 38c3ca5cd4 Vulkan: Implement asynchronous frame dumping 2016-11-10 01:07:46 +10:00
Lioncash be04215857 FrameTools: Clean up variable naming in UpdateLoadWiiMenuItem 2016-11-08 21:22:17 -05:00
Lioncash 2acf3570e0 PathConfigPane: Eliminate main frame global usage 2016-11-08 21:19:24 -05:00
Jules Blok de50fead5c FrameTools: Avoid deadlock in UpdateGUI(). 2016-11-09 01:45:30 +01:00
Mat M e05553acfc Merge pull request #4428 from lioncash/event
DolphinWX: Move common wxUpdateUIEvent functions to WxEventUtils
2016-11-08 17:11:16 -05:00
Markus Wick 5378b6ab85 Merge pull request #4345 from degasus/framedump_threaded
Renderer: Threaded frame dumping.
2016-11-08 11:01:40 +01:00
degasus 741debe229 OGL: Avoid reallocation of frame dumping PBO. 2016-11-07 22:32:54 +01:00
degasus f6a6cc9c67 OGL: Use PBO for framedump, with async readback. 2016-11-07 22:17:32 +01:00
degasus a47332bf8a VideoCommon/Render: Use a flag for screenshot. 2016-11-07 22:16:34 +01:00
degasus d79840078f Renderer: Threaded frame dumping. 2016-11-07 22:11:13 +01:00
Stenzek c09ce029df Vulkan: Don't use FIFO_RELAXED present mode for vsync. 2016-11-07 19:22:27 +10:00
Sepalani 744b993dcd CodeWindow: Fix step out issues 2016-11-06 20:30:24 +00:00
Lioncash 5022c0dfb5 DolphinWX: Move common wxUpdateUIEvent functions to WxEventUtils 2016-11-06 09:02:59 -05:00
Mat M 136a10482f Merge pull request #4427 from lioncash/config-update
DolphinWX: Enable/disable config UI options based on core state
2016-11-06 08:21:02 -05:00
Lioncash c2d00d25fe DolphinWX: Make the main config dialog modeless 2016-11-06 08:04:54 -05:00
Markus Wick 3924a99942 Merge pull request #4423 from degasus/framedump
Framedump: Use an object for the framedumping state.
2016-11-06 02:07:08 +01:00
Lioncash bfa9cc2736 DolphinWX: Enable/disable config UI options based on core state 2016-11-05 11:14:37 -04:00
Mat M 0ad4e70fc5 Merge pull request #4422 from lioncash/codewindow-menu
CodeWindow: Migrate more menubar handling code to CFrame
2016-11-05 08:19:28 -04:00
Lioncash b19842eec3 IPC_HLE: Move NWC24Config and WiiNetConfig to their own source files
Makes for a cleaner separation of functionality, as well as removing
multiple includes from the main header file. It also gets a bunch of
structs and enums out of the global namespace.

Coincidentally, this also gets rid of an indirect include cycle that
could have broken compilation of Core.cpp in the future, since it was
relying on IPC network includes to resolve functions in Common/NandPaths.h.

This makes it easier to separate out the individual net classes in a
follow-up. Separating these out would also make it less of a pain to
figure out what's going on, since you wouldn't need to sift through 1000+
lines of code.i
2016-11-05 03:12:07 -04:00
Lioncash 9543b9d20d CodeWindow: Rename GetMenuBar() to GetParentMenuBar() 2016-11-04 22:02:36 -04:00
Lioncash 07e3835a49 GeneralConfigPane: rename cpu_cores to m_cpu_cores 2016-11-04 21:57:46 -04:00
degasus 3c65c5f2c5 AVIDump: Drop frames which are delayed over a savestate. 2016-11-04 18:39:50 +01:00
degasus be29090aae AVIDump: Add a struct for the state.
So AddFrame use no global state and can be threaded well.
2016-11-04 18:35:42 +01:00
degasus dad5041737 AVIDump: Inline OSD error handling.
This fixes a review feedback in PR #4345.
2016-11-04 18:03:14 +01:00
degasus 03d8efc270 AVIDump: Merge redundant variables.
They were always the same. We also don't scale at all.
2016-11-04 18:03:14 +01:00
degasus 112e18a5d1 AVIDump: Drop stored frame.
This used an invalid pointer, which was only valid within AddFrame.

This drops a feature which shall dump the last frame as it might was dropped before.
A good implementation however should "overwrite" the last frame if the time matches.
But this needs to delay every frame a bit.
2016-11-04 18:03:14 +01:00
JosJuice d88295d5a1 Merge pull request #4421 from Pringo/wiimote-log
Change "Wiimote" to "Wii Remote" in Logs
2016-11-04 17:03:11 +01:00
Markus Wick 234691abf7 Merge pull request #4385 from leoetlino/disable-bt-check
Disable descriptor check for BT passthrough in some cases
2016-11-04 14:38:19 +01:00
Stenzek ac2971b30e Merge pull request #4374 from stenzek/vulkan-xfb
Vulkan: Cleanup and implement XFB support
2016-11-04 23:11:10 +10:00
Markus Wick d2fdafa155 Merge pull request #4415 from degasus/arm
JitArm64: Also push/pop gpr.R(addr).
2016-11-04 09:33:53 +01:00
Lioncash 5d4c714662 CodeWindow: Hide GetMenuBar()
This eliminates public usage of the GetMenuBar() function in CodeWindow.
The benefit of this is it also gets rid of the need to perform direct
access across the config dialog and the main frame. It also gets rid of
the use of the main_frame global.

GetMenuBar() will be removed entirely from CodeWindow in a follow-up that
also removes any related remnants of code made obsolete with its removal.
2016-11-04 00:09:47 -04:00
Lioncash 5ae6c21c2e CodeWindow: Eliminate explicit menu item updating from CodeWindow
Gets rid of more menu-related code from CodeWindow and puts it back in
CFrame where it belongs.

This turns the previous menu update function within CodeWindow into one
that simply updates the debugger font for its managed controls. It also
improves how the font is actually updated. Previously, fonts would change,
however this wouldn't actually reflect onto the respective controls until
a refresh or update event occurred. Since codeview, callstack, symbols,
callers, and calls windows are all managed by a wxAuiManager instance,
calling Update() on it after the font has been set will reflect font
changes immediately.
2016-11-04 00:01:45 -04:00
Pringo 93bdab64fa Change "Wiimote" to "Wii Remote" in Logs 2016-11-03 17:58:28 -07:00