Commit Graph

23128 Commits

Author SHA1 Message Date
Léo Lam 59155b4d5e
Merge pull request #8150 from lioncash/kbd
IOS/USB_KBD: Minor cleanup
2019-06-14 15:25:10 +02:00
Léo Lam 3b7a7ae2e7
Merge pull request #8155 from Techjar/dtm-get-origin
Core/Movie: Store PAD_GET_ORIGIN bit in ControllerState
2019-06-14 15:13:43 +02:00
Léo Lam e2d59abaa7
Merge pull request #8173 from lioncash/fmt
Externals: Add libfmt to externals
2019-06-14 14:47:22 +02:00
Léo Lam 79ea55c912
Merge pull request #8169 from lioncash/fallthrough
Core/GeckoCodeConfig: Use the [[fallthrough]] attribute in LoadCodes()
2019-06-13 13:36:32 +02:00
Lioncash d52e69bab1
Common/CMakeLists: Link in fmt
While not currently used by common, this will become the case when the
logging system eventually transitions to it, among other things.
2019-06-10 15:26:46 -04:00
Lioncash 92b445618a VideoCommon/DriverDetails: Make look-up table immutable
Previously, this array potentially wouldn't be placed within the
read-only segment, since it wasn't marked const. We can make the lookup
table const, along with any other nearby variables.
2019-06-08 18:06:36 -04:00
Lioncash 632b953ebf Core/GeckoCodeConfig: Use the [[fallthrough]] attribute in LoadCodes()
Makes it explicit that this fallthrough is intentional.
2019-06-08 17:55:01 -04:00
Léo Lam d927cd2b03
Merge pull request #8162 from lioncash/label
DSP/LabelMap: C++17 transitional changes/cleanup
2019-06-08 18:16:20 +02:00
Connor McLaughlin 951b66e4ac
Merge pull request #8049 from stenzek/crop
Renderer: Adjust source rectangle when crop would draw off screen
2019-06-08 20:57:52 +10:00
Connor McLaughlin b13e00b003
Merge pull request #8165 from lioncash/linkage
{Android/ButtonManager, ResourcePack/Manager}: Make file-scope variables/functions internally linked where applicable
2019-06-08 20:56:13 +10:00
Connor McLaughlin ab66e91766
Merge pull request #8134 from JosJuice/filesystem-string-view
DiscIO: Use std::string_view in FileSystem::FindFileInfo
2019-06-08 20:52:34 +10:00
Connor McLaughlin bed2d66bed
Merge pull request #8117 from weihuoya/threaded_env
android: get java env from thread local storage
2019-06-08 20:42:15 +10:00
Connor McLaughlin 5a4e2a6b2f
Merge pull request #7734 from stenzek/mojave-warning
Vulkan: Display a warning when using MoltenVK on HS and earlier
2019-06-08 20:41:39 +10:00
Stenzek 3f1586dbce Vulkan: Display a warning when using MoltenVK on HS and earlier 2019-06-08 20:16:24 +10:00
Stenzek 1028e2c1a6 D3D12: Remove unnecessary includes in DXContext.h 2019-06-08 20:12:15 +10:00
Stenzek 9316e25652 D3DCommon: Fallback to base CreateSwapChain on failure
It appears that some older drivers do not support
CreateSwapChainForHwnd, resulting in DXGI_ERROR_INVALID_CALL. For these
cases, fall back to the base CreateSwapChain() from DXGI 1.0.

In theory this should also let us run on Win7 without the platform
update, but in reality we require the newer shader compiler so this
probably won't work regardless. Also any hardware of this vintage is
unlikely to run Dolphin well.
2019-06-08 20:11:49 +10:00
Connor McLaughlin 0177c6c2c7
Merge pull request #8146 from Techjar/netplay-network-opts
Qt/NetPlayDialog: Change network mode options to radio buttons
2019-06-08 20:05:35 +10:00
Connor McLaughlin 6b4ca318c9
Merge pull request #8139 from lioncash/const
VideoCommon/PixelShaderGen: Make look-up table arrays immutable where applicable
2019-06-08 20:03:02 +10:00
Connor McLaughlin 67a9fc6784
Merge pull request #8163 from lioncash/config
Core/ConfigManager: Use forward declarations where applicable
2019-06-08 20:01:15 +10:00
Connor McLaughlin b7fba95cdf
Merge pull request #8166 from lioncash/mbedtls
Externals: Update mbedTLS from 2.1.1 to 2.16.1
2019-06-08 19:58:37 +10:00
JosJuice 7fcc3dd605 DolphinQt: Don't leave Export Recording disabled always 2019-06-08 08:39:12 +02:00
Lioncash 5512876842 General: Migrate from deprecated mbedTLS functions
As indicated by mbedTLS' documentation, all of the relevant functions
have been superseded by _ret-suffixed variants in mbedTLS version
2.7.0.
2019-06-07 22:51:58 -04:00
Lioncash eb15a52fd5 UICommon/ResourcePack/Manager: Make GetPackConfig() internally linked
Silences a -Wmissing-declarations warning.
2019-06-07 20:27:27 -04:00
Lioncash c0c0e412e0 Core/ConfigManager: Use forward declarations where applicable
Avoids dragging in IniFile, EXI device and SI device headers in this header which is
quite widely used throughout the codebase.

This also uncovered a few cases where indirect inclusions were being
relied upon, which this also fixes.
2019-06-07 19:54:39 -04:00
Lioncash 6e9329455c DSP/LabelMap: std::move std::string instances where applicable
We can std::move the std::string parameter in Label's constructor,
allowing the constructor to be moved into in calling code.

We can cascade this outwards in the interface as well.
2019-06-07 17:42:10 -04:00
Lioncash 32427af79e DSP/LabelMap: Make label_t's definition hidden
Given this is a private struct and it's used in a container that
supports incomplete types, we can forward-declare it and move it into
the cpp file. While we're at it, we can change the name to Label to
follow our formatting guidelines.
2019-06-07 17:37:48 -04:00
Lioncash a3ed4ceec5 DSP/LabelMap: Use std::optional with GetLabelValue()
Rather than use a bool and out parameter, we can collapse them into one
by using a std::optional.
2019-06-07 17:26:24 -04:00
Lioncash 747128b093 DSP/LabelMap: Collapse DeleteLabel loop into std::find_if
Same thing, no explicit loops.
2019-06-07 17:13:10 -04:00
Lioncash 98ec2ab2ac DSP/LabelMap: Default constructor and destructor
We also move the destructor definition into the cpp file, as that will
allow us to make the entire label_t type hidden from external view in a
following change.
2019-06-07 17:07:06 -04:00
Lioncash 0a1249ea40 DSP/LabelMap: Amend class formatting
Places the most important stuff, the public interface first.
2019-06-07 17:05:25 -04:00
Lioncash 60d10d2813 Core/DSP/DSPTables: Make FindOpInfoByName/FindExtOpInfoByName use std::string_view
These functions only ever compare against another string, so these can
have their parameters turned into std::string_view to make them more
flexible.
2019-06-06 12:22:02 -04:00
Léo Lam 3f4952d57c
Merge pull request #8152 from lioncash/array-size
Common/CommonFuncs: Remove now-unneccessary ArraySize function
2019-06-06 13:35:57 +02:00
Léo Lam 824ec84e82
Merge pull request #8154 from lioncash/analytics
{Common/Analytics, Core/Analytics}: Minor C++17 transitional changes
2019-06-06 13:25:17 +02:00
booto 37919144c8 SI_DeviceGCAdapter: Stop it being detected as a steering wheel 2019-06-05 23:31:48 -04:00
Lioncash e59f72739a Core/Analytics: Turn analytics URL into a C-string
Less reading and also doesn't store an unnecessary pointer value in the
executable, making it smaller by 8 bytes.
2019-06-05 13:24:35 -04:00
Lioncash ea9f887170 Core/Analytics: Use inline on static member variables
Starting with C++17, this allows for the same behavior as the existing
code, but without the need to manually write the out-of-class
definitions as well.
2019-06-05 13:24:35 -04:00
Lioncash ebf3de4d93 Core/Analytics: Use std::lock_guard deduction guides
Starting with C++17, the type of the mutex being locked no longer needs
to be hardcoded into the type declaration.
2019-06-05 13:24:35 -04:00
Lioncash 57454e90a7 Core/Analytics: Make MakeUniqueId() a const member function
This function doesn't modify instance state, so we can mark it as const.
2019-06-05 13:24:34 -04:00
Lioncash a5caa95a4b Core/Analytics: Use std::string_view where applicable
In these cases, the strings are treated as views anyways, so we can use
them here to avoid potential allocations.
2019-06-05 13:24:34 -04:00
Lioncash 2c2b9690bb Core/Analytics: Simplify static_assert
We can just use a std::array here to simplify the size calculation.
2019-06-05 13:24:34 -04:00
Lioncash 7935c27b52 Common/Analytics: Convert std::string overload into std::string_view
Allows for both string types to be non-allocating. We can't remove the
const char* overload in this case due to the fact that pointers can
implicitly convert to bool, so if we removed the overload all const
char arrays passed in would begin executing the bool overload instead of
the string_view overload, which is definitely not what we want to occur.
2019-06-05 13:24:31 -04:00
spycrab 78e566aaa5
Merge pull request #8156 from 8times9/resourcepack-header
Qt/ResourcePackManager: Remove column header bold text
2019-06-05 14:27:39 +02:00
Techjar 5f3bf405d4 Core/Movie: Store PAD_GET_ORIGIN bit in ControllerState
This fixes the desync on playback of start-from-boot input recordings
made while using the GC adapter, as well as other desyncs that could
potentially occur in other circumstances where this bit is used.

I used a previously reserved bit in the ControllerState to store the
new data, so this shouldn't significantly break backwards
compatibility. However, tools that aren't aware of this new bit may set
it to 0, which will break input recordings that contain it.
2019-06-05 02:36:23 -04:00
8times9 ffb8f56a83 Qt/ResourcePackManager: Remove column header bold text 2019-06-04 19:13:39 -05:00
Lioncash 58e2cd5486 Common/Analytics: std::move std::string constructor parameter
Allows calling code to move into the constructor, avoiding the creation
of another string copy.
2019-06-03 20:13:00 -04:00
Lioncash f813c4951a Common/Analytics: Use deduction guides for std::lock_guard
Avoids needing to hardcode the type of mutex. We can also make use of
scoped_lock where two consecutive lock_guard instances are used.
2019-06-03 20:12:55 -04:00
Lioncash 6df65d7a5d Common/Analytics: Default AnalyticsReportingBackend()'s destructor
Stays consistent with AnalyticsReportBuilder.
2019-06-03 18:27:45 -04:00
Tillmann Karras 84e3391535 Mark files as non-executable 2019-06-02 12:31:40 +01:00
Lioncash a9663669dc Common/CommonFuncs: Remove now-unneccessary ArraySize function
Since C++17, non-member std::size() is present in the standard library
which also operates on regular C arrays. Given that, we can just replace
usages of ArraySize with that where applicable.

In many cases, we can just change the actual C array ArraySize() was
called on into a std::array and just use its .size() member function
instead.

In some other cases, we can collapse the loops they were used in, into a
ranged-for loop, eliminating the need for en explicit bounds query.
2019-06-01 10:07:57 -04:00
Lioncash c8b950e716 IOS/USB_KBD: Normalize variable names
Now, with all of the tidying done, we can cap it off by normalizing
variable names to abide by our code formatting guidelines.
2019-05-31 09:05:31 -04:00