Commit graph

3147 commits

Author SHA1 Message Date
Lioncash
5b92d5076a
Common: Use fmt where applicable
Begins the transition to using fmt for string formatting where
applicable. Given fmt supports formatting std::string instances out of
the box, we can remove now-unnecessary calls to .c_str() and .data().

Note that this change does not touch the actual logging subsystem aside
from converting the final StringFromFormat call in the process over to
fmt::format. Given our logging system is heavily used throughout the
entire codebase, and converting that over will be quite a large change
by itself, this will be tackled near the end of the conversion process.
2019-06-14 15:04:09 -04: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
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
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
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
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
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
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
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
48b82e82db Common/CMakeLists: Specify headers alongside source files
Allows these files to show up as part of the project when generating IDE
builds from CMake.
2019-05-31 06:52:44 -04:00
Lioncash
66596c5176 Common/x64Emitter: Resolve TODO in OpArg's operator==
We now require C++17, so we can use std::tie here.
2019-05-30 10:27:28 -04:00
Lioncash
7346679986 Common/FileUtil: Use std::string::data within ReadFileToString
With C++17, .data() for std::string now has a non-const overload, so we
can make use of that instead of taking the address of the first element.
2019-05-29 07:06:56 -04:00
Lioncash
c0f499b7f7 Common/FileUtil: Use std::string_view with WriteStringToFile
Allows writing out other forms of strings (e.g. C strings) without the
need to allocate a std::string and discard it after use.
2019-05-29 07:06:56 -04:00
Lioncash
eb475025b8 Common/FileUtil: Make WriteStringToFile consistent with ReadFileToString
Makes the parameter ordering consistent and less error-prone.
2019-05-29 07:06:53 -04:00
Sintendo
c84f34bd50 x64Emitter: Short MOVs for 32bit immediates
Prior to this commit, the emitter would emit a 7-byte instruction when
loading a 32-bit immediate to a 64-bit register.

0:  48 c7 c0 ff ff ff 7f    mov    rax,0x7fffffff

With this change, it will check if it can instead emit a load to a
32-bit register, which takes only 5 or 6 bytes.

0:  b8 ff ff ff 7f          mov    eax,0x7fffffff
2019-05-29 01:04:09 +02:00
Lioncash
ab2adfb0a7 Common/HttpRequest: Simplify cURL initialization
std::call_once is guaranteed to execute the given callable object
exactly once. This guarantee holds even if the function is called
concurrently from several threads.

Given that, we can replace the mutex and boolean flag with
std::call_once and a std::once_flag to perform the same behavior.
2019-05-27 09:46:57 -04:00
Lioncash
b15f595130 Common/HttpRequest: Avoid unnecessary copies in loop in Fetch()
Previously, every entry pair within the map would be copied. The reason
for this is subtle.

A std::map's internal entry type is defined as:

std::pair<const Key, Value>

but the loop was declaring it as:

std::pair<Key, Value>

These two types aren't synonymous with one another and so the compiler
is required to always perform a copy.

Using structured bindings avoids this (as would plain auto or correcting
the explicit type), while also allowing the use of more appropriate
names compared to first and second.
2019-05-27 09:36:31 -04:00
Lioncash
8dc8cf8019 Common/HttpRequest: std::move callback in constructor
std::function is allowed to heap allocate in order to hold any necessary
bound data in order to execute properly (e.g. lambdas with captures), so
this avoids unnecessary reallocating.
2019-05-27 09:26:28 -04:00
Léo Lam
617747e905
Merge pull request #8113 from lioncash/ini-key
Common/IniFile: Simplify Set()
2019-05-23 12:15:30 +02:00
Léo Lam
67c2aa0701
Merge pull request #8114 from lioncash/ini-line
IniFile: Prevent potential out-of-bounds access in ParseLine()
2019-05-23 12:12:41 +02:00
Lioncash
2ae370fc37 IniFile: Prevent potential out-of-bounds access in ParseLine()
While current usages of ParseLine aren't problematic, this is still a
public function that can be used for other purposes. Essentially makes
the function handle potential external inputs a little nicer.
2019-05-22 21:09:11 -04:00
Lioncash
869acb96c6 Common/IniFile: Simplify Set()
We can just utilize map's insert_or_assign() function and check the
return value to determine whether or not we need to insert the key into
the keys_order vector.
2019-05-22 20:58:49 -04:00
Connor McLaughlin
68877c52d1
Merge pull request #8027 from MerryMage/MOVAPS
Jit64: Prefer MOVAPS where possible
2019-05-22 15:05:17 +10:00
Léo Lam
d2c7a6f239
Merge pull request #8094 from leoetlino/log-type-names
Qt/LogConfigWidget: Show log type short names
2019-05-20 18:27:57 +02:00
spycrab
ec734065db
Merge pull request #8087 from spycrab/cmake_win2019
Support CMake on Windows
2019-05-14 21:07:26 +02:00
Connor McLaughlin
707266aeed
Merge pull request #8069 from iwubcode/passive_support
VideoCommon: Implement passive stereoscopic 3D
2019-05-12 15:15:34 +10:00
spycrab
b5160ec685 Common/CMake: Fix Windows build 2019-05-12 00:05:08 +02:00
Léo Lam
453c1d4170 Qt/LogConfigWidget: Show log type short names
Makes it easier for users to determine which option they need to
enable/disable as log messages only show the short name.
2019-05-11 16:05:22 +02:00
Michael M
916a97b869 TraversalServer: use C++ <chrono> instead of gettimeofday 2019-05-10 21:33:26 +02:00
Léo Lam
123bbbca2c
Merge pull request #8073 from vladfi1/re-frame-mw
Bring back MemoryWatcher, but without CoreTiming
2019-05-10 14:55:27 +02:00
Techjar
ff972e3673 Reformat repo to clang-format 7.0 rules 2019-05-06 18:48:04 +00:00
Vlad Firoiu
f4d950f4e2 Revert "Core: Remove MemoryWatcher"
This reverts commit 0c02e77eee.
2019-05-05 21:43:45 +01:00
iwubcode
c513bb5309 VideoCommon: Implement passive stereoscopic 3D 2019-05-04 22:58:00 -05:00
Léo Lam
ab9ece9bca Replace MathUtil::Clamp with std::clamp 2019-05-04 23:12:17 +02:00
Léo Lam
cb168f22d6 Replace custom UNUSED macro with [[maybe_unused]] 2019-05-04 23:04:18 +02:00
Léo Lam
04c8201c32 Enable C++17
All supported platforms now have easy access to a compiler with C++17
support.

C++17 potentially allows for some nice cleanups and removes the need
for standard library backports (optional/variant).

See discussion at https://dolp.in/pr6264#discussion_r158134178
2019-05-04 23:04:18 +02:00
Léo Lam
99a4ca8de7
Merge pull request #7839 from ShFil119/impr/redundant
Remove redundant initialization
2019-05-04 22:50:51 +02:00
Léo Lam
6c7aeb3ffb
Merge pull request #8064 from JosJuice/notify-host-symbols-clear
Call Host_NotifyMapLoaded when clearing g_symbolDB
2019-05-03 11:47:26 +02:00
booto
2ff0486335 Debugger/Memory: Add support for address spaces
Different address spaces can be chosen in the memory view panel.
 * Effective (or virtual): Probably the view people mostly want. Address
   translation goes through MMU.
 * Auxiliary: ARAM address space. Does not display anything in Wii mode.
 * Physical: Physical address space. Only supports mem1 and mem2 (wii
   mode) so far.
2019-05-02 21:14:30 -04:00
JosJuice
8fd6f8f6e9 Call Host_NotifyMapLoaded when clearing g_symbolDB
Otherwise DolphinQt will have a stale symbol list and
you can get nullptr dereferences when trying to use it.
2019-05-01 17:48:27 +02:00
Filip Gawin
c110ffcdaa Remove redundant initialization 2019-04-30 01:22:24 +02:00
Techjar
0c02e77eee Core: Remove MemoryWatcher
MemoryWatcher only works on Linux and affects emulation determinism due
to scheduling additional events, which causes NetPlay to desync.
Considering that this interface is a rather specialized use case, the
communication with it is kinda crappy *and* it's affecting emulation, I
think it's best to just axe it and come up with a better implementation
of the functionality.
2019-04-28 06:22:27 -04:00
MerryMage
1baa8ee970 x64Emitter: Prefer MOVAPS to MOVSD
* The high half of regOp is immediately overwritten so the value in it is irrelevant.
* MOVSD produces an unnecessary dependency on the high half of regOp.
* MOVAPS is implemented as a register rename on modern microarchitectures.
2019-04-27 12:56:05 +01:00
MerryMage
2d4dd8cdc1 x64Emitter: Prefer MOVAPS to MOVAPD
There is no reason to use MOVAPD over MOVAPS, for two reasons:
* There has never been a microarchitecture with separate single and double domains.
* MOVAPD is one byte longer than MOVAPS
2019-04-27 12:54:43 +01:00
Connor McLaughlin
664cfb2ca5
Merge pull request #7970 from Techjar/netplay-mii-sync
NetPlay: Synchronize Mii data
2019-04-27 13:26:55 +10:00
Jordan Woyak
ba1b335118 WiimoteEmu: Improve emulated swing. 2019-04-23 19:02:41 -05:00
Connor McLaughlin
44d5a71e27
Merge pull request #7965 from jordan-woyak/condvar-fixes
Minor changes to usages of std::condition_variable.
2019-04-21 23:50:53 +10:00
spycrab
eddcb70b84 Common/HttpRequest: Add option to allow non 200 response codes 2019-04-13 12:58:23 +02:00
Techjar
1b8eda827b NetPlay: Synchronize Mii data
It's bundled with the Wii saves for simplicity, since it's quite small.
2019-04-08 07:06:21 -04:00
Jordan Woyak
d34a9afe04 Minor changes to usages of std::condition_variable. 2019-04-06 17:39:25 -05:00
spycrab
ca5eac0c63 Common/HttpRequest: Fix EscapeComponent leaking memory 2019-04-06 13:27:49 +02:00
spycrab
094bf0d2ff Qt/NetPlay: Integrate NetPlayIndex 2019-04-06 12:27:30 +02:00
spycrab
3dbf44417a Common/HttpRequest: Implement EscapeComponent 2019-03-30 17:13:57 +01:00
Stenzek
a4f7c04470 Common: Add DynamicLibrary helper class 2019-03-29 19:52:33 +10:00
Tilka
a865cc0bf6
Merge pull request #7806 from jordan-woyak/wiimote-emu-swing-improve
WiimoteEmu: Reimplement tilt/swing/camera/orientation data using matrix math.
2019-03-05 23:37:00 +00:00
Jordan Woyak
bbc6bf5294 Common/Config: Add a utility class to suppress config change callbacks. 2019-03-03 17:35:22 -06:00
Jordan Woyak
4db4840d7c WiimoteEmu: Reimplement tilt/swing/camera/orientation data using matrix math. 2019-03-03 12:43:25 -06:00
spycrab
3e3f6922c0 Common/FileUtil: Fix GetExePath() cutting off the bundle name 2019-02-26 20:00:23 +01:00
Stenzek
f039149198 Move most backend functionality to VideoCommon 2019-02-19 16:57:54 +10:00
Tilka
131f4931fb
Merge pull request #7792 from jordan-woyak/auto-calibration
DolphinQt/ControllerEmu: Add stick calibration "wizard".
2019-02-13 02:13:27 +00:00
Tilka
8d59d1bb11
Merge pull request #7798 from ShFil119/impr/empty
Use empty instead of size
2019-02-13 01:59:43 +00:00
Filip Gawin
49fe9f5db1 Use empty instead of size 2019-02-13 00:03:49 +01:00
Mat M
6b22693e6e
Merge pull request #7796 from stenzek/glx-context
GLContext: Fix shared context creation error on Mesa
2019-02-11 09:23:52 -05:00
Jordan Woyak
0064f70c8a DolphinQt/ControllerEmu: Replace Input Radius/Shape settings with an input calibration "wizard". 2019-02-10 07:55:47 -06:00
Stenzek
cecefa2d97 ChunkFile: Don't access element zero of empty container
This was causing assertion failures in debug MSVC builds.
2019-02-10 13:28:50 +10:00
Stenzek
ef3306e954 GLContext: Fix shared context creation error on Mesa
This was failing if the first version tried (4.6) didn't succeed.
2019-02-09 21:51:23 +10:00
spycrab
63cdebba88 UICommon/AutoUpdate: Add macOS support 2019-02-06 20:50:09 +01:00
Jordan Woyak
69b617ce76 WiimoteEmu: Remove redundant Matrix library and use the one in Common. 2019-02-03 12:02:02 -06:00
Jordan Woyak
b9a00a40a9 Common: Move Matrix classes out of MathUtil into their own files and make their interface more friendly. 2019-02-03 11:35:31 -06:00
Jordan Woyak
9c1a8891e5 WiimoteEmu: Code cleanups. 2019-02-02 19:40:31 -06:00
Jordan Woyak
0d1fbe7bbc WiimoteEmu: Major renaming and cleanup. 2019-02-02 19:40:31 -06:00
Tilka
0115906e41
Merge pull request #7767 from Tilka/chunkfile
ChunkFile: treat vectors/strings as sized arrays
2019-02-02 12:25:42 +00:00
Tillmann Karras
3ff0e7dbd4 Common/HttpRequest: optionally follow redirects 2019-02-01 13:44:58 +00:00
Tillmann Karras
04a92482bf ChunkFile: treat vectors/strings as sized arrays 2019-02-01 05:13:16 +00:00
Stenzek
c9c0b85056 VideoBackends: Store a backbuffer 'scale'
This is a scaling factor, used for hi-dpi configurations.
2019-01-25 11:15:57 +10:00
Mat M
2749c50843
Merge pull request #7653 from jordan-woyak/ini-cleanup
IniFile: Minor cleanup. Removed unused function. Improved template usage.
2018-12-28 06:21:24 -05:00
Jordan Woyak
ceb28a2302 Add ability to reshape analog sticks from square/circle to octagon and make the analog stick mapping indicator pretty. 2018-12-27 18:31:46 -06:00
Jordan Woyak
a464025bba IniFile: Minor cleanup. Removed unused function. Improved template usage. 2018-12-26 20:15:32 -06:00
MerryMage
da7608ff9f x64Emitter: Add some single-precision instructions 2018-12-26 00:23:42 +00:00
spycrab
fc998093cc
Merge pull request #7600 from spycrab/resource_pack
Implement resource packs
2018-12-23 16:04:05 +01:00
spycrab
71d53c922f Implement resource packs 2018-12-19 11:03:09 +01:00
Lioncash
6d394d03fe Common/GLContext: Make member functions const qualified where applicable
These don't modify object state, so they can be const qualified.
2018-12-14 11:02:26 -05:00
Connor McLaughlin
6388992f62
Merge pull request #7039 from stenzek/moltenvk
Vulkan: macOS support via MoltenVK
2018-11-30 21:55:30 +10:00
Jordan Woyak
fae368d2ee
Fix spurious error logs for conversions of empty strings on Windows. 2018-11-22 06:50:11 +01:00
Techjar
d94922002b NetPlay: Implement chunked data transfer
This sends arbitrary packets in chunks to be reassembled at the other
end, allowing large data transfers to be speed-limited and interleaved
with other packets being sent. It also enables tracking the progress of
large data transfers.
2018-11-19 06:37:09 -05:00
Pierre Bourdon
61b9ef33ab
Merge pull request #7492 from MerryMage/regcache2
JitRegCache: Refactor register cache
2018-11-09 04:45:47 +01:00
Stenzek
041b977523 Common: Use GCD semaphores on macOS
Unnamed semaphores are not supported.
2018-11-07 05:12:20 -08:00
Pierre Bourdon
7094f225d4
Merge pull request #7515 from JosJuice/wcsftime
Use wcsftime instead of strftime on Windows to fix encoding errors
2018-10-28 23:58:17 +01:00
Pierre Bourdon
53a45e5c28
Merge pull request #7445 from Techjar/improve-sfmlhelper
Improve SFMLHelper
2018-10-28 23:53:59 +01:00
MerryMage
9f683f9bb1 BitSet: Add << operator 2018-10-28 17:57:46 +00:00
MerryMage
2dce7e6e21 Common: Add variant utilities 2018-10-28 17:57:43 +00:00
Pierre Bourdon
d98c0da41b Common/Analytics: add basic support for vector serialization
Only supports u32 for now since that's the only thing we need.
2018-10-27 17:16:58 +02:00
JosJuice
5718b870d1 Use wcsftime instead of strftime on Windows to fix encoding errors
Reported by https://forums.dolphin-emu.org/Thread-odd-codes-appear-in-save-load-state-when-chinese-language-is-used
2018-10-26 14:26:21 +02:00
Stenzek
2c6d96433c GLContext: Try GL versions 3.2-4.6 when getting a context
GLX previously was only creating a 4.0 context.
2018-10-20 21:11:34 +10:00
Stenzek
c95802afeb CMake: Make X11 and EGL optional 2018-10-20 21:11:34 +10:00
Stenzek
0559311f92 GLContext: Runtime selection of EGL/GLX on Linux 2018-10-20 21:11:34 +10:00
Stenzek
025e909773 GLContext: Use destructor instead of Shutdown() to cleanup
Also uses the Initialize() method to make the context current.
2018-10-20 21:11:34 +10:00
Stenzek
4b8d1c2b42 GLContext: Combine shared context initialization and creation 2018-10-20 21:11:34 +10:00
Stenzek
dcdd02d646 GLContext: Remove global context pointer 2018-10-20 21:11:34 +10:00
Stenzek
eb284b5d66 VideoBackends: Pass window system info from host on creation 2018-10-20 21:11:34 +10:00
Stenzek
9c57a98723 GLContext: Use host connection
This also removes the need for a sleeping event thread.
2018-10-20 21:11:34 +10:00
Stenzek
134d967be2 Refactoring and cleanup of GLInterface (now GLContext) 2018-10-20 21:11:34 +10:00
Stenzek
74b82bab3b GLInterface: Drop Haiku support 2018-10-20 21:11:33 +10:00
Tillmann Karras
97cc9894e4 Update to Visual Studio's default Windows SDK 2018-10-20 00:53:08 +01:00
Tillmann Karras
b37886580b GekkoDisassembler: fix mtfsf yet again 2018-10-08 02:43:34 +01:00
Tillmann Karras
29c271d0eb GekkoDisassembler: fix disassembly of mtfsf
This fixes https://dolp.in/i11411.
2018-10-07 17:27:02 +01:00
Tilka
32ef8706e5
Merge pull request #7414 from Sintendo/shortmovs
x64Emitter: emit shorter MOVs for 64-bit immediates
2018-10-06 00:01:35 +01:00
Tilka
b480db9392
Merge pull request #7419 from Sintendo/miscopts
Miscellaneous x64 micro-optimizations
2018-10-05 23:44:25 +01:00
Techjar
c5b4e1a5f6 Improve SFMLHelper
Switch to using additional overloads of sf::Packet, so we can eliminate
some of the messy code and just use the normal syntax for
BigEndianValue.

We can't avoid helper functions with u64 due to SFML's non-standard way
of defining 64-bit integer types.
2018-10-02 05:44:50 -04:00
Shawn Hoffman
d594d4f12f Fix sram accesses. 2018-09-29 22:52:29 -07:00
Sintendo
d8953dbe57 x64Emitter: nit, use helper method in CMP_or_TEST 2018-09-29 09:52:54 +02:00
Sintendo
53a947749a x64Emitter: short MOV for 64bit immediates (2)
Prior to this commit, the emitter would unconditionally emit a 10-byte
instruction known as MOVABS when loading a 64-bit immediate to a
register.

0:  48 b8 ef be ad de 00    movabs rax,0xdeadbeef
7:  00 00 00

With this change, it will instead rely on the fact that on x64 writes to
32-bit registers are automatically zero extended to 64-bits, allowing
us to emit a 5 or 6-bytes instruction with the same effect for certain
immediates.

0:  b8 ef be ad de          mov    eax,0xdeadbeef
2018-09-16 19:52:03 +02:00
Sintendo
575f1b309a x64Emitter: short MOV for 64bit immediates (1)
Prior to this commit, the emitter would unconditionally emit a 10-byte
instruction known as MOVABS when loading a 64-bit immediate to a
register.

0:  48 b8 ef be ad de ff    movabs rax,0xffffffffdeadbeef
7:  ff ff ff

With this change, it will instead emit a 7-byte instruction when it is
possible to express the 64-bit immediate using a signed 32-bit value.

0:  48 c7 c0 ef be ad de    mov    rax,0xffffffffdeadbeef
2018-09-14 23:11:26 +02:00
MerryMage
9753f21cc7 Arm64Emitter: Remove unsequenced expressions
Incrementing `it` twice between sequence points is undefined behavior.
2018-08-30 07:38:37 +01:00
JosJuice
fbdc239199 Fix reducing log paths when building with MSVC
The LogManager code had trouble detecting the "/Source/Core/" substring
for two reasons, neither of which seemed to happen a few years ago:

1. __FILE__ is in lowercase on MSVC
2. __FILE__ uses backslash as the directory separator on MSVC

Fixes https://bugs.dolphin-emu.org/issues/11366
2018-08-28 11:48:43 +02:00
Pierre Bourdon
2033d660d2
Merge pull request #7376 from lioncash/sfml
Externals: Update SFML to 2.5.0
2018-08-28 02:53:05 +02:00
Lioncash
d10a0b440f SFMLHelper: Simplify 64-bit packet reading function and remove 64-bit write function
Now that SFML's packet class can properly handle 64-bit values, we don't
need a helper function just to write values to the packets.
2018-08-27 17:38:07 -04:00
Lioncash
e6a4116bf2 Common/SFMLHelper: Remove unused forward declaration
BigEndianValue isn't used in either the header or SFMLHelper.cpp, so it
can be removed.
2018-08-27 16:48:12 -04:00
Lioncash
208be26bb4 Arm64Emitter: Make the Align* functions return a non-const data pointer
Similar in nature to e28d063539 in which
this same change was applied to the x64 emitter.

There's no real requirement to make this const, and this should also
be decided by the calling code, considering we had places that would
simply cast away the const and carry on
2018-08-27 09:44:38 -04:00
Pierre Bourdon
ea26ccbbe1
Merge pull request #7318 from VinDuv/rename-master-log
LogManager: Change Master Log short name to fix log configuration loading
2018-08-27 13:36:04 +02:00
Pierre Bourdon
f2323331ea
Merge pull request #7240 from lioncash/namespace
Common/DebugInterface: Namespace code under the Common namespace
2018-08-27 04:49:26 +02:00
Pierre Bourdon
246b1f4459
Merge pull request #7350 from zackhow/android-analytics
Android: Add usage statistics to android
2018-08-27 04:37:17 +02:00
zackhow
82f82a6b7d Android: Add usage statistics to android.
Added an option in General config to enable/disable usage statistics. Added a popup on first open if
the user would like to engage in reporting. Clicking cancel or out of the box opts out. Only
clicking 'Ok' will enable reporting. Also added a new android specific values to report.
2018-08-23 17:31:17 -04:00
Markus Wick
3c354d9280
Merge pull request #7333 from weihuoya/gamecover-nomedia
Hide game cover in android gallery
2018-08-20 10:01:50 +02:00
JosJuice
be890c56ac Fix critital buffer overflow in LoadPNG 2018-08-19 17:35:15 +02:00
Pierre Bourdon
0fdb6f4267
Merge pull request #7249 from yourWaifu/discord-rpc-join
Add Discord Join Net Play functionally
2018-08-19 13:43:33 +02:00
Admiral H. Curtiss
5df424a1ec Use simplified libpng PNG reading API to avoid PNG reading bugs. 2018-08-19 13:14:11 +02:00
BreadFish64
b246678c8c
Fix spelling in assert macro 2018-08-15 12:12:19 -05:00
weihuoya
2fac523e10 hide game cover in android gallery 2018-08-15 16:37:00 +08:00
Lioncash
67b015d76b Arm64Emitter: Get rid of a pointer cast within SetJumpTarget()
Type punning like this is undefined behavior. Instead, we use std::memcpy to
copy the necessary data over, which is well defined (as it treats both
the source and destination as unsigned char).
2018-08-14 23:47:53 -04:00
Sleepy Flower Girl
158c0d54b1 Force IPv4 on external IP addresses 2018-08-13 21:17:38 -04:00
Billy Robert O'Neal III
6640d1ec81 Attempt to fix linter issues. 2018-08-13 12:17:56 -07:00
Billy Robert O'Neal III
a0af0bf588 Workaround use of private constant _Snan no longer being present in <limits>. 2018-08-13 12:05:50 -07:00
Vincent Duvert
e2a557e739 LogManager: Change Master Log short name
Change the Master Log short name from “*” to “MASTER”. This fixes
saving the master log enable state, as INI files may not start with *.
2018-08-11 18:37:33 +02:00
spycrab
7cb310791b Cleanup: Remove some left over references to wxWidgets 2018-08-07 15:48:17 +02:00
spycrab
8fb3085b07 Revert "Revert "Qt/GameList: Add option to show covers in grid mode"" 2018-07-30 03:16:37 +02:00
Pierre Bourdon
9b94c76f81
Revert "Qt/GameList: Add option to show covers in grid mode" 2018-07-28 03:03:21 +02:00
spycrab
5ade5f4fe7 Qt/GameList: Add option to show covers in grid mode 2018-07-27 11:14:24 +02:00
Techjar
4407854e9c NetPlay save data synchronization
This adds the functionality of sending the host's save data (raw memory
cards, as well as GCI files and Wii saves with a matching GameID) to
all other clients. The data is compressed using LZO1X to greatly reduce
its size while keeping compression/decompression fast. Save
synchronization is enabled by default, and toggleable with a checkbox
in the NetPlay dialog.

On clicking start, if the option is enabled, game boot will be delayed
until all players have received the save data sent by the host. If any
player fails to receive it properly, boot will be cancelled to prevent
desyncs.
2018-07-19 18:09:20 -04:00
Lioncash
dfdfe6c972
Common/DebugInterface: Namespace code under the Common namespace
Gets more identifiers out of the global namespace and makes it more in
line with the rest of the (mostly) namespaced Common code.
2018-07-09 22:23:57 -04:00
David Korth
0149d22385 Removed some more double-expansions of CMAKE_SYSTEM_NAME. 2018-07-02 13:01:16 -04:00
Lioncash
c4fb07f428 Common, DSP: Only compile in x86-64 emitter related utilities on x86 platforms
Previously these were required to be built into the executable so that
the JIT portion of the DSP code would build properly, as the
x86-64-specifics were tightly coupled to the DSP common code. As this is
no longer the case, this is no longer necessary.
2018-06-21 06:53:31 -04:00
Lioncash
dddac76b8c Common/MemoryPatches: Silence variable shadowing warnings 2018-06-19 21:33:50 -04:00
Lioncash
6f473b96d0 PowerPC: Convert CPUCore enum into an enum class
Makes the enum values strongly-typed and prevents the identifiers from
polluting the PowerPC namespace. This also cleans up the parameters of
some functions where we were accepting an ambiguous int type and
expecting the correct values to be passed in.

Now those parameters accept a PowerPC::CPUCore type only, making it
immediately obvious which values should be passed in. It also turns out
we were storing these core types into other structures as plain ints,
which have also been corrected.

As this type is used directly with the configuration code, we need to
provide our own overloaded insertion (<<) and extraction (>>) operators
in order to make it compatible with it. These are fairly trivial to
implement, so there's no issue here.

A minor adjustment to TryParse() was required, as our generic function
was doing the following:

N tmp = 0;

which is problematic, as custom types may not be able to have that
assignment performed (e.g. strongly-typed enums), so we change this to:

N tmp;

which is sufficient, as the value is attempted to be initialized
immediately under that statement.
2018-06-15 10:27:59 -04:00
Léo Lam
58606702f7
Merge pull request #7107 from lioncash/mac
Common/Network: Get rid of out parameters for MAC address utilities
2018-06-14 19:44:09 +02:00
Lioncash
189d277cfc Common/Random: Add convenience template for simple arithmetic values
In cases where we just want a random value for a primitive arithmetic
type, we can wrap this in a template to allow convenient direct
assignment instead of keeping declaration and initialization separate
(making it more difficult to use values uninitialized). This also allows
the use of Common::Random with functions such as std::generate, making
it more flexible in how random values can be generated.
2018-06-14 10:31:13 -04:00
Lioncash
ce69201f33 Common/Network: Get rid of out parameters for MAC address utilities
Given we have std::array and std::optional, we can use these in
conjunction with one another to avoid the need for out parameters.
2018-06-10 15:43:26 -04:00
Lioncash
c825eecbc9 ChunkFile: Remove unnecessary includes
ChunkFile doesn't use any of the file utilities, so we can drop these
headers to avoid pulling in unnecessary dependencies. This also
uncovered a few indirect inclusions.
2018-06-09 16:49:59 -04:00