Commit graph

31240 commits

Author SHA1 Message Date
JosJuice
64c0ff576c
Merge pull request #8285 from lioncash/dinput-ffe
InputCommon/DInputJoystick: Correct force-feedback flag testing
2019-08-03 10:09:31 +02:00
JosJuice
2770707587
Merge pull request #8287 from lioncash/static-ctor
DiscIO/Volume: Make Partition's interface constexpr
2019-08-03 10:07:53 +02:00
Lioncash
db3b31c246 DiscIO/Volume: Make Partition's interface constexpr
PARTITION_NONE technically has a runtime static constructor otherwise.
This allows compile-time instances of Partition to be created without
the use of a static constructor.
2019-08-02 18:25:09 -04:00
Mike Kuijl
cbfc442e90 DolphinQt: Limit numeric widget width 2019-08-02 18:20:37 +02:00
Stenzek
d6460e0b18 FramebufferShaderGen: Fix upside-down EFB being restored in OpenGL 2019-08-03 01:48:57 +10:00
Stenzek
25b3e5e029 FramebufferManager: Fix restoring of EFB depth buffer
Correct state wasn't being set.
2019-08-03 01:46:54 +10:00
Connor McLaughlin
7afba6776f
Merge pull request #8279 from spycrab/fix_save_state_wait
Fix saving states freezing up emulation
2019-08-03 01:26:07 +10:00
Lioncash
37d643c7d3 InputCommon/DInputJoystick: Correct force-feedback flag testing
Introduced in a995e2f5ba

We need to be performing a bitwise AND on the flags and not a logical
AND, otherwise we could end up counting device objects that don't
support forced feedback.
2019-08-02 10:26:44 -04:00
Stenzek
d78a9356d2 D3D11: Only use integer RTV when logic op is supported+enabled 2019-08-02 18:47:19 +10:00
JMC47
b01cacb27e
Merge pull request #8236 from booto/si_greatest_hits_vol_1
SI: Minor bugfixes
2019-08-02 03:17:54 -04:00
JosJuice
7a82e0f10f Translation resources sync with Transifex 2019-08-01 22:56:52 +02:00
spycrab
04764f8b7f Fix saving states freezing up emulation
Only for about half a second but noticeable nonetheless
2019-08-01 21:33:12 +02:00
Lioncash
ff8f627499 DolphinQt/Config/GeckoCodeWidget: Use forward declarations where applicable
Avoids propagating headers into scopes where they're not needed.
2019-07-31 09:54:54 -04:00
Lioncash
14263ec6dd DolphinQt/Config/GeckoCodeWidget: Call LoadDefaultGameIni() directly
This is a static class function, so we don't need to go through the
SConfig instance in order to call it.
2019-07-31 09:54:54 -04:00
Lioncash
6002529ece DolphinQt/Config/GeckoCodeWidget: Make exec() outcomes explicit
Makes it a little more explicit which dialog outcomes we're expecting.
While we're at it, we can invert them into guard clauses to unindent
code a little bit.
2019-07-31 09:54:54 -04:00
Lioncash
255d2ff2d2 DolphinQt/Config/GeckoCodeWidget: Deduplicate ini path
We can store this to a local variable to avoid duplicating the same
string creation twice.
2019-07-31 09:54:53 -04:00
Lioncash
a07d19a2fd DolphinQt/Config/ARCodeWidget: Use forward declarations where applicable
Avoids propagating headers into scopes where they're not necessary.

Also uncovered reliance on an indirect inclusion within
CheatsManager.cpp, which is now fixed.
2019-07-31 09:48:45 -04:00
Lioncash
e08a76f9e2 DolphinQt/Config/ARCodeWidget: Call LoadDefaultGameIni() directly
This is a static function, so we don't need to go through the instance
of SConfig in order to call it.
2019-07-31 09:08:31 -04:00
Lioncash
4d8d2acae7 DolphinQt/Config/ARCodeWidget: Avoid unnecessary disk operations
If a user indicates that they want to clone and edit an AR code, then
click cancel on the following dialog, we shouldn't actually clone the
code.

We also shouldn't resave the codes if the edit dialog is opened and then
closed again via cancel, as there's nothing that actually changed. This
way we don't perform disk accesses unless they're actually necessary.
2019-07-31 09:01:38 -04:00
Lioncash
0d406f2bdc DolphinQt/Config/ARCodeWidget: Deduplicate ini path
We can just store this to a const local and use it to avoid doing the
same work twice.
2019-07-31 08:36:00 -04:00
Stenzek
06daf58032 FramebufferManager: Correctly handle read back D24S8 textures
Needed for the Adreno/Vulkan workaround, and if we ever switch to a D24
texture for the depth buffer w/ unrestricted depth range.
2019-07-31 15:33:28 +10:00
Stenzek
2698e311aa Vulkan: Use correct aspect for D24S8 textures 2019-07-31 15:33:05 +10:00
Léo Lam
c70da390a7
Merge pull request #8274 from lioncash/parent
DolphinQt/Config/GameConfigEdit: Pass parent pointer to base class
2019-07-31 11:07:55 +08:00
Lioncash
6e14dcf70a DolphinQt/Config/GameConfigEdit: Pass parent pointer to base class
Previously, the constructor of GameConfigEdit wasn't doing anything with
the passed in parent pointer. This is dangerous because it can result in
memory being leaked in certain scenarios. It can also affect layout
decisions made by the parent. Instead, pass it through to the base class.

Current usages of the class pass in nullptr as the parent, so this is a
safe change to make with regards to the class hierarchy.

While we're at it, we can std::move the passed in QString into the class
member, allowing calling code to move strings into the constructor,
avoiding copies.
2019-07-30 19:17:25 -04:00
Lioncash
fef1b84f0a DolphinQt: Replace QStringLiteral with alternatives where applicable
QStringLiterals generate a buffer so that during runtime there's very
little cost to constructing a QString. However, this also means that
duplicated strings cannot be optimized out into a single entry that gets
referenced everywhere, taking up space in the binary.

Rather than use QStringLiteral(""), we can just use QString{} (the
default constructor) to signify the empty string. This gets rid of an
unnecessary string buffer from being created, saving a tiny bit of
space.

While we're at it, we can just use the character overloads of particular
functions when they're available instead of using a QString overload.
The characters in this case are Latin-1 to begin with, so we can just
specify the characters as QLatin1Char instances to use those overloads.
These will automatically convert to QChar if needed, so this is safe.
2019-07-30 09:06:03 -04:00
Connor McLaughlin
dea2b9c509
Merge pull request #8258 from CookiePLMonster/dx11.1-detection-fixes
D3D11 resources refactor and DX11.1 feature detection fixes
2019-07-30 01:24:57 +10:00
Silent
baa9636d48
D3D11: Add extra logging to StateCache::Get 2019-07-29 16:48:24 +02:00
Silent
43bfb183c2
D3D11: Show a warning message about unsupported features when switching to D3D11 backend on Windows 7 2019-07-29 16:47:45 +02:00
Silent
ff00873610
D3D11: Query for output merger logic op support and use logic op code only if supported
Previously code assumed that if DX11.1 runtime is supported, logic ops will,
but Windows 7 SP1 with a Platform Update supports DX11.1 runtime without logic ops.
This created pretty jarring visual artifacts, which now should be gone OR replaced
with much less jarring errors.
2019-07-29 16:47:39 +02:00
Silent
a6b8e8b9c3
D3D11: Ownership fixes for objects in DXTexture 2019-07-29 16:43:02 +02:00
Silent
77425ef83b
D3D11: Ownership fixes for objects in D3DState 2019-07-29 16:39:21 +02:00
Silent
88db577c17
D3D11: Correctly poll ALL possible AA levels. 2019-07-29 16:39:06 +02:00
Lioncash
c93fffaed6 DolphinQt/HotkeyScheduler: Correct string within Run()
AddMessage() by itself doesn't perform string formatting facilities, so
this message was actually using the EFB scale as a duration value, not a
format argument. This corrects that.
2019-07-28 23:16:23 -04:00
Lioncash
3f947f086f VideoCommon/OnScreenDisplay: Use deduction guides for std::lock_guard
Same behavior without hardcoding the type of the mutex within the lock
guards. This means the type of the mutex would be able to be changed
without needing to also change all occurrences lock guards are used.
2019-07-28 23:08:21 -04:00
Lioncash
a565e41cb8 VideoCommon/OnScreenDisplay: Remove unused headers
While we're at it, fix up the imgui include to use the convention we use
for referencing external library headers.
2019-07-28 23:04:52 -04:00
Lioncash
c212310fbe VideoCommon/OnScreenDisplay: Take Message's std::string parameter by value
Allows callers to std::move strings into the functions (or automatically
assume the move constructor/move assignment operator for rvalue
references, potentially avoiding copies altogether.
2019-07-28 23:00:58 -04:00
Lioncash
50b240fcbd VideoCommon/OnScreenDisplay: Default initialize all Message members
Provides a deterministic initial state in the case of the default
constructor.
2019-07-28 22:42:45 -04:00
Connor McLaughlin
b0113b6c64
Merge pull request #8266 from lioncash/shadowing
D3DCommon/Shader: Use std::optional where applicable
2019-07-28 14:24:32 +10:00
Connor McLaughlin
5bad233b1a
Merge pull request #8265 from lioncash/view
OGL/ProgramShaderCache: Use std::string_view where applicable
2019-07-28 14:21:59 +10:00
Anthony
a9e04e0a72
Merge pull request #8267 from lioncash/null
VideoBackends/Null: Minor cleanup
2019-07-27 15:06:26 -07:00
Lioncash
6db305a4e8 VideoBackends/Null: Add missing override specifiers
Applies a missing override specifier to VertexManager's destructor.
2019-07-27 17:33:18 -04:00
Lioncash
23c5b362a5 VideoBackends/Null: Apply final to classes where applicable
These aren't intended to be further specialized, so we can make this
obvious with final.
2019-07-27 17:33:18 -04:00
Lioncash
86000fc6b4 VideoBackends/Null: Remove unnecessary constructors and destructors
Removes constructors and destructors that don't actually provide any
behavior (i.e. doesn't constain generated code related to non-trivial
members in a cpp file, etc).

Lessens the amount of code present.
2019-07-27 17:33:18 -04:00
Lioncash
bdcc5853d5 VideoBackends/Null: Remove unnecessary includes 2019-07-27 17:33:16 -04:00
Lioncash
aca02f9734 D3DCommon/Shader: Use std::optional with CompileShader()
Allows removing the use of an out parameter, making it nicer to use.
2019-07-26 20:06:14 -04:00
Lioncash
0ce6264f90 D3DCommon/Shader: Create vector via iterators in CreateByteCode()
Same behavior, but without unnecessary zeroing of data contents.
Instead, we supply the dataset to use directly.
2019-07-26 19:45:33 -04:00
Lioncash
287b446ef7 D3D/DXShader: Remove duplicate GetByteCode function
This is already provided in the base class, which performs the same
exact behavior. Given the function in the base class isn't virtual, this
also essentially resolves an instance of shadowing.
2019-07-26 19:45:23 -04:00
JMC47
f04a01eb4f
Merge pull request #8242 from CrankySupertoon/marioparty-netplay-communitysettings-update
Mario Party Netplay Community Settings: remove widescreen on community code
2019-07-26 19:38:36 -04:00
Lioncash
67bd2de73e OGL/ProgramShaderCache: Convert typedef over to a using alias
Same thing, but nicer to read from left to right.
2019-07-26 18:43:44 -04:00
Lioncash
d6617d399f OGL/ProgramShaderCache: Use std::lock_guard deduction guides where applicable
Same thing, less reading.
2019-07-26 18:22:55 -04:00