Commit Graph

19781 Commits

Author SHA1 Message Date
JosJuice e44b64b82c DolphinQt2: Don't use a mutex in GameFileCache
GameTracker's usage of GameFileCache is thread-safe even without
using a mutex. All of its access to GameFileCache happens on the
thread m_load_thread, except for the call to GameFileCache::Load,
which finishes before m_load_thread starts executing.
2018-01-04 16:33:15 +01:00
JosJuice 9988652d86 Fix launching DolphinQt2 from Visual Studio
Starting with 5.0-5504, trying to launch DolphinQt2 from Visual Studio
shows the error message "The operation could not be completed. Undefined
error" instead of launching the exe file. (The exe gets created
correctly, it just doesn't get launched. It's possible to work around
the problem by launching the exe manually outside of Visual Studio, but
then you won't have an attached debugger automatically.) This commit
fixes that by removing headers from DolphinQt2.vcxproj's ClInclude list
that already are in the QtMoc list. (The problem was originally about
LogWidget.h and LogConfigWidget.h, but 5.0-5600 made the problem be
about CheatWarningWidget.h and GeckoCodeWidget.h instead.)
2018-01-04 13:03:47 +01:00
Léo Lam 637fbec35d
Merge pull request #6274 from myfreeweb/freebsd-libusb-no-detach
passthrough: do not detach kernel driver on FreeBSD
2018-01-04 10:39:58 +01:00
Vlad Firoiu 330881ae80 Allow users to specify the encoder used for framedumping. 2018-01-03 13:23:10 +01:00
Léo Lam 1f89d91deb
Merge pull request #6280 from spycrab/qt_screensaver
Qt: Toggle Screensaver
2018-01-03 13:13:18 +01:00
spycrab adada16603 Qt: Toggle Screensaver 2018-01-03 12:38:34 +01:00
spycrab 0dd52ca7ab UICommon: Move screensaver code to UICommon 2018-01-03 12:38:33 +01:00
Markus Wick 075a226961
Merge pull request #4437 from sepalani/d3d11_fix_debug_build
MAX_XFB_HEIGHT: PAL value off by two fixed
2018-01-03 08:53:26 +01:00
Pierre Bourdon fd13851df2
Merge pull request #6076 from spycrab/qt_debugger
Qt: Implement Debugger (part 1 of ∞)
2018-01-03 03:44:27 +01:00
Markus Wick cb168b1843
Merge pull request #6134 from ligfx/soundstreamlifecycle
SoundStream: change Start/Stop lifecycle to Init/SetRunning/destruct
2018-01-02 09:58:36 +01:00
spycrab 4f4021686e Qt/KDE: Fix icon 2018-01-01 12:31:53 +00:00
Sepalani 44935c23e0 MAX_XFB_HEIGHT: PAL value off by two fixed 2017-12-30 20:22:10 +01:00
Vlad Firoiu 45ac9b678d Require WINDOW_BIT if we have a window handle. 2017-12-29 23:20:16 -05:00
Vlad Firoiu eb59267196 Surfaceless egl rendering. 2017-12-29 19:35:43 -05:00
JosJuice 82a6701f79 Optionally delete savestate that gets loaded at boot 2017-12-28 23:15:48 +01:00
spycrab b63ec57c1e Qt: Connect debugging widgets 2017-12-28 19:08:38 +01:00
spycrab 8795b342d1 Qt/Debugger: Implement "Breakpoints" window 2017-12-28 19:08:38 +01:00
spycrab 08716be43b Qt/Debugger: Implement "Watch" window 2017-12-28 19:07:56 +01:00
spycrab ec37ce093f Qt/Debugger: Implement "Registers" window 2017-12-28 19:07:18 +01:00
spycrab 2a19ccf806 Qt/InterfaceSettings: Add "Show Debugging UI" option 2017-12-28 18:59:42 +01:00
spycrab ff283ff912 Qt/Settings: Add debug mode flag 2017-12-28 18:59:42 +01:00
JosJuice 1df69c5750
Merge pull request #6051 from JosJuice/android-sys
Android: Extract Sys to a different folder than the User folder
2017-12-27 17:34:24 +01:00
JosJuice 9dd88d76dd Redesign the ability to load state at boot
BootParameters can now contain the path of a savestate to load at boot.
Movie has been made to use this instead of poking at Core.cpp's state.
2017-12-26 20:39:03 +01:00
Greg V 5c1c67d4d8 passthrough: do not detach kernel driver on FreeBSD
libusb_detach_kernel_driver() always fails as a regular non-root user:
https://lists.freebsd.org/pipermail/freebsd-usb/2016-March/014161.html
2017-12-26 21:50:50 +03:00
JosJuice b3b7aef09a Android: Extract Sys to a different folder than the User folder 2017-12-26 09:53:32 +01:00
JosJuice ac18cffcab DolphinQt2: Don't crash when trying to play without a game selected 2017-12-25 18:41:53 +01:00
JosJuice d1c1793a34 Don't expose SYSDATA_DIR in a header 2017-12-24 17:13:04 +01:00
Leo Lam b187d4cd08
Merge pull request #6269 from JosJuice/ini-section-mapping
GameConfigLoader: Map whole sections, not just individual keys
2017-12-24 15:26:47 +01:00
JosJuice f41273fe79 GameConfigLoader: Map whole sections, not just individual keys
There are two reasons for this change:

1. It removes many repetitive lines of code.

2. I think it's a good idea to enable the use of old-style section
names even for settings that previously haven't been settable in game
INIs. Mixing the two styles in INIs (using the new style only for new
settings) is not ideal, and people on the forums don't even seem to
know that the new style exists (nobody knew a way to set ubershader
settings per game, for instance). Encouraging everyone to start using
only the new style might work long-term, but it would take take time
and effort to make everyone get used to it. Considering that this commit
*reduces* the amount of code by adding the ability to use old-style
names for more settings, I'd say that adding this ability is worth it.
2017-12-23 18:59:27 +01:00
JosJuice 5296ee6d3d Reduce the indentation level of MapINIToRealLocation 2017-12-23 18:25:49 +01:00
iwubcode 50d96a4411 BPStructs: Use static cast for XFB/EFB copies 2017-12-21 21:19:26 -06:00
iwubcode e1332b1d7e Texture Cache Base: Move PAL vertical scaling to be baked into the texture size. This saves on a number of multiplications and fixes an issue where we were multiplying the y-scaling factor by the srcRectangle's height + 1 which was causing a crash in some GC titles 2017-12-21 21:19:26 -06:00
Ryan Meredith 1f226ec14f Update Readme.md and various fixes 2017-12-20 10:54:51 +01:00
JosJuice a3355a3e4a Only use the "Scaled EFB Copy" setting for EFB, not XFB
The hybrid XFB PR made it apply to both EFB copies and XFB copies.
2017-12-19 12:59:36 +01:00
Markus Wick 5006ac5c51
Merge pull request #6262 from linkmauve/no-shadow
Rename constructor parameters to avoid shadowing members
2017-12-19 12:23:32 +01:00
Emmanuel Gil Peyrot f5dc8e7737 Rename constructor parameters to avoid shadowing members 2017-12-19 12:05:06 +01:00
Emmanuel Gil Peyrot d9c2de90c0 Reimplement EFB copy for intensity formats
This is the direct continuation of #5887, and removes the last usage of
the colmat matrix in EFB copy conversion shaders.
2017-12-19 12:04:56 +01:00
Markus Wick 0bf24f549a
Merge pull request #6190 from JosJuice/is-trivially-copyable-vs
Remove IsTriviallyCopyable hack for VS
2017-12-19 11:15:58 +01:00
Markus Wick ed13a8d7a7
Merge pull request #6255 from JosJuice/strerrorr-detect
Handle both the XSI and GNU versions of strerror_r
2017-12-19 09:47:51 +01:00
Markus Wick 5afd07c033
Merge pull request #6254 from iwubcode/frame_counter_and_advance_fix
Video Common: frame logic fix
2017-12-19 09:44:49 +01:00
JosJuice bd5da5cfd6 Handle both the XSI and GNU versions of strerror_r
Trying to force the XSI version by undefining _GNU_SOURCE can lead
to compilation errors on some systems because of headers expecting
that _GNU_SOURCE is defined.

This commit uses define checks to detect which version we have.
I tried making an overloaded function (int and const char*) instead,
but that led to a warning about one of the variants being unused.
2017-12-18 22:09:02 +01:00
JosJuice 4973ae9952 Rename GFX_HACK_COPY_EFB_ENABLED to GFX_HACK_COPY_EFB_SCALED
Not sure why it was named like this... It doesn't affect whether
the copy happens or not, only what resolution it uses.
2017-12-18 21:55:02 +01:00
Leo Lam 4733bbd8f3
Merge pull request #6166 from ligfx/invokedeviceschangedcallbacks
ControllerInterface: cleanup callbacks API and logic
2017-12-15 21:05:17 +01:00
Leo Lam a4592bc3c5
Merge pull request #6210 from ligfx/qtmappingwindowdontstoredevq
MappingWindow: don't store devq separately from controller default device
2017-12-15 20:50:06 +01:00
Leo Lam 7e7f1fe713
Merge pull request #6226 from aldelaro5/add-xer-debugger
debugger: Add the XER to the register view
2017-12-15 20:49:24 +01:00
Leo Lam fa0cf5c038
Merge pull request #6247 from leoetlino/homebrew
Boot: Minor fixes for Wii homebrew
2017-12-15 20:47:02 +01:00
bobjrsenior 7589ade972 DolphinWX: Add TB and GQR to Register Window
The Time Base Register was added under the BAT registers. TBL and TBU
were ORed together to get one 64-bit value to display. It is labeled TB

The Graphics Quantisation Registers were added under the Segment
Registers. They are Labeled GQR0-GQR7.

All new registers are read only.
2017-12-15 20:38:46 +01:00
iwubcode 2f7eacd08c Video Common: move frame advance and counter logic to only happen when we actually render a frame. 2017-12-15 12:46:18 -06:00
Jonathan Hamilton a38103afbf Fix GLES GPU texture conversion shader
GLES doesn't support C-style array initialisers, so stuff like:

Type var[2] = {
VALUE_A,
VALUE_B
};

isn't supported in GLES (it was added in
GL_ARB_shading_language_420pack).

The texture conversion shader used this, so would fail to compile on
GLES.
2017-12-12 22:01:10 +00:00
Markus Wick a70c03a1c0
Merge pull request #6249 from stenzek/texture-dump
Texture dumping regression fixes
2017-12-11 08:44:09 +01:00
Jonathan Hamilton e401004766 Fix an invalid (uint < int) comparison in GLES with ubershaders 2017-12-10 10:52:32 -08:00
Stenzek 2579f8eaa5 TextureCache: Don't dump custom textures
They don't have a basename, therefore were being saved to empty files, and potentially can be compressed.
2017-12-10 15:31:46 +10:00
Stenzek 5f5aca7870 OGL: Fix incorrect usage of glGetTextureSubImage
Was causing issues with texture dumping on newer drivers.
2017-12-10 15:31:14 +10:00
Markus Wick eb1ae38304
Merge pull request #6027 from JonnyH/WIP/chained-signal-handler-android-debuggerd
Call the previously-set sigaction in fastmem handler if it's not our fault
2017-12-10 00:18:13 +01:00
Jonathan Hamilton 8ae76a6680 Fix arm64 MOVI2R for addresses between 2gb and 4gb offset from PC
The PC offset ADRP() path takes a s32 value, but the input offset was
being tested as abs(ptr) < 0xFFFFFFFF. This caused values between
0x80000000 and 0xFFFFFFFF to incorrectly use this path, despite the
offsets not being representable in an s32.

This caused a crash in the VertexLoader on android 8.1 immediate in wind
waker (and possibly all other apps on android 8.1) as the jit and data
sections happened to be loaded 4gb apart in virtual memory, causing some
pointers to hit this
2017-12-09 13:21:58 -08:00
Léo Lam 3dd777be70 Boot: Add default exception handlers
Some homebrew expect exception handlers to be present -- which is
almost always the case on console, since most of the time homebrew are
launched from either a libogc or SDK title) -- and break if they are
not. To fix this, we just need to include default, dummy handlers.
2017-12-09 17:24:04 +01:00
Léo Lam 520039ab28 Boot: Use values from libogc for booting Wii homebrew
Set HID0, HID4, GPR1 to values that are used by libogc for
initialisation. This makes boots more similar to a launch
from the HBC or another loader, since normally the registers
have already been initialised by the loader.

This fixes a crash in homebrew that assume GPR1 points to a correct
location and attempt to use it before initialising registers.
2017-12-09 17:24:03 +01:00
Léo Lam ecd7191b5a Boot: Fix BAT setup in Wii mode
HID4.SBE must be set before calling PowerPC::Update{D,I}BAT, otherwise
extended BATs will not be enabled.
2017-12-09 17:24:03 +01:00
Leo Lam 1a9d6b99e9
Merge pull request #6237 from lioncash/gekko-disasm
GekkoDisassembler: Correct disassembly of fabs, fnabs, and fneg
2017-12-08 22:50:40 +01:00
Lioncash e88c457276 DolphinWX: Resolve missing declaration warnings
Without the include, the prototypes of the functions can't be found
2017-12-07 18:58:20 -05:00
Anthony 3b887388cd
Merge pull request #6234 from amolloy/high_sierra
Fix Wiimote support on macOS 10.13 High Sierra
2017-12-07 12:04:37 -08:00
Pierre Bourdon 8a830074b6
Merge pull request #6220 from leoetlino/utf8
WX: Fix argument parsing
2017-12-07 15:16:39 +01:00
Leo Lam ecf30cfc74
Merge pull request #6240 from JosJuice/stream-path-encoding
Don't use wrong encoding for paths when opening streams on Windows
2017-12-07 10:04:55 +01:00
degasus 02dd062518 VideoCommon: Drop now unused efb2tex matrix generation. 2017-12-06 09:30:03 +01:00
JosJuice 9d8a82e1d9 Don't use wrong encoding for paths when opening streams on Windows 2017-12-05 21:23:35 +01:00
Stenzek d0601c0a83 TextureConversionShader: Use round() instead of roundEven() in HLSL
HLSL does not define roundEven(), only round(). This means that the
output may differ slightly for OpenGL vs Direct3D. However, it ensures
consistency across OpenGL drivers, as round() in GLSL can go either way.
2017-12-06 03:33:50 +10:00
Stenzek e0ffce2785 D3D: Use VideoCommon EFB-to-texture shaders 2017-12-06 03:33:50 +10:00
Stenzek beb35320f6 TextureConverterShaderGen: Make generated shaders HLSL-compatible 2017-12-06 03:33:50 +10:00
Leo Lam 08da19fc87
Merge pull request #6217 from ligfx/qtfifofix
FIFOPlayerWindow: don't reset frame/object limit every frame
2017-12-04 12:05:33 +01:00
Lioncash ed2be3b8e3 DolphinWX/Main: Fix shader compilation dialog translations
Fixes issue 10685
2017-12-04 04:33:49 -05:00
Markus Wick 30b5cbcb02
Merge pull request #6235 from lioncash/reorder
WiiSaveBanner: Resolve a -Wreorder warning
2017-12-04 08:52:42 +01:00
Lioncash de82330a74 GekkoDisassembler: Correct disassembly of fabs, fnabs, and fneg
These three instructions use the B field (bits 16-20 of the opcode)
to determine what the operand register is. However, the code was
using the path that uses the C field (bits 21-25).

This amends the code to use the B field (and also fixes the 64-bit PPC
opcodes, because why not?).

Fixes issue 10683.
2017-12-04 00:02:35 -05:00
Lioncash 050440fd5b OGL/TextureConverter: Remove unnecessary using declaration 2017-12-03 18:51:22 -05:00
Lioncash 93e85f9a7c OGL/TextureConverter: Resolve -Wmissing-variable-declaration warnings 2017-12-03 18:51:17 -05:00
Lioncash 666af4605e WiiSaveBanner: Resolve a -Wreorder warning 2017-12-03 18:34:49 -05:00
Andrew Molloy f5839f854a Fix whitespace in and around WiimoteScannerDarwin::~WiimoteScannerDarwin() (linter). 2017-12-03 12:31:18 -05:00
Andrew Molloy 8354e89cf1 Break out of the loop waiting for the SearchBT to be done in WiimoteScannerDarwin::FindWiimotes() when the object is destroyed. Allows the application to quit correctly when Continuous Scanning is enabled on macOS. 2017-12-03 11:41:06 -05:00
Andrew Molloy d306397bbc -[deviceInquiryComplete:error:aborted:] comes in on the main thread in macOS 10.13, so instead of using CFRunLoopRun()/CFRunLoopStop(), just let the run loop do one pass. This is already in a loop waiting for done to be false. This also means -[deviceInquiryComplete:error:aborted:] should no longer call CFRunLoopStop(). Fixes connecting to Wiimotes in macOS 10.13+, should continue to work as before in 10.12 and below. 2017-12-03 10:32:07 -05:00
Markus Wick 8bcc392d5d
Merge pull request #5887 from linkmauve/alpha-fix
Simplify EFB copy shaders
2017-12-03 11:21:08 +01:00
JosJuice f68956a614
Merge pull request #6232 from lioncash/d3d-vert-mgr
D3D/VertexManager: Add missing includes
2017-12-03 09:24:23 +01:00
Lioncash 6ca85dbf0a VKTexture: Add missing override specifier to the other ScaleRectangeFromTexture() prototype 2017-12-02 20:20:13 -05:00
Lioncash c7bc16811c VKTexture: Remove unimplemented ScaleRectangleFromTexture() prototype 2017-12-02 20:15:32 -05:00
Lioncash b0fadbb5de D3D/VertexManager: Add missing includes
Gets rid of reliance on indirect includes
2017-12-02 20:09:33 -05:00
Léo Lam d95177526f VideoBackends: Fix -Wswitch warnings 2017-12-02 21:52:07 +01:00
Léo Lam 67ba326ff6 VideoCommon: Fix -Wformat warnings 2017-12-02 21:48:01 +01:00
Emmanuel Gil Peyrot 85bb1d7bb0 VideoCommon: Reimplement texture format conversion
This fixes the rendering of the scan visor in Metroid Prime 2: Echoes,
as seen in https://fifoci.dolphin-emu.org/dff/mp2-scanner/

The alpha channel was off-by-one on Ivy Bridge due to the rounding
after multiplication with colmat.  This commit removes this matrix
altogether in most cases, making them simple GLSL swizzles.
2017-12-02 19:29:01 +01:00
Anthony d71f4168e9
Merge pull request #6229 from JosJuice/clarify-keys-dump
Clarify the "Select the OTP/SEEPROM dump" message
2017-12-02 09:49:22 -08:00
JosJuice c4db59e7b6 Clarify the "Select the OTP/SEEPROM dump" message
Most users don't know what OTP/SEEPROM means.
2017-12-02 18:23:38 +01:00
JosJuice 05879875f6 Make USB keyboard input respect the background input setting 2017-12-02 18:12:04 +01:00
Markus Wick 76fbdbb06e
Merge pull request #5903 from linkmauve/fix-mp2e
Round values in swizzlers
2017-12-02 17:38:21 +01:00
degasus e2a9ee384f VideoCommon: Rename TextureConversionShader namespace. 2017-12-02 15:17:39 +01:00
degasus e8febd0cef VideoCommon: Create a namespace for TextureConversionShaderGen. 2017-12-02 15:17:39 +01:00
Markus Wick 491c10ec96 VideoBackends: Use VideoCommon shader generators for efb2tex copies.
This will generate one shader per copy format. For now, it is the same
shader with the colmat hard coded. So it should already improve the GPU
performance a bit, but a rewrite of the shader generator is suggested.

Half of the patch is done by linkmauve1:
VideoCommon: Reorganise the shader writes.
2017-12-02 15:17:39 +01:00
aldelaro5 b7fdf374e6 debugger: Add the XER to the register view 2017-12-01 05:31:41 -05:00
Lioncash 1e7096dd27 D3DBase: Mark file-scope variables as internally linked where applicable 2017-11-30 23:46:46 -05:00
Stenzek cd68b3606c
Merge pull request #6193 from stenzek/readbacks
Abstract Staging Textures - VideoCommon interface for texture readbacks/uploads
2017-12-01 14:24:06 +10:00
Anthony 7c96e51bc8
Merge pull request #6187 from raelgc/1-exit-on-esc
Add an exit key to `dolphin-emu-nogui`
2017-11-27 13:30:33 -08:00
Léo Lam 291c99217e Qt: Fix NAND import menu item parent 2017-11-26 18:33:07 +01:00
Léo Lam 6e796a74fb Qt: Add support for --exec 2017-11-26 18:32:28 +01:00
Léo Lam 05c8d229af Config: Handle unknown system strings better
Currently, a simple typo in the system name will trigger an assert
message that complains about a "programming error". This is not
user friendly and misleading.

So this changes GetSystemFromName to return an std::optional, which
allows for callers to check whether the system exists and handle
failures better.
2017-11-26 18:24:01 +01:00