Commit graph

2932 commits

Author SHA1 Message Date
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
Lioncash
7b11ce3dd2 Compiler: Use [[maybe_unused]] in the Windows DOLPHIN_UNUSED macro
The required version of MSVC already supports [[maybe_unused]], so we
can utilize this here. When GCC 7 and clang 3.9 become hard
requirements, we can eliminate this macro entirely and replace it with
[[maybe_unused]].
2018-06-09 12:20:29 -04:00
Lioncash
d8f6d60189 Compiler: Rename UNUSED macro to DOLPHIN_UNUSED
UNUSED is quite a generic macro name and has potential to clash with
other libraries, so rename it to DOLPHIN_UNUSED to prevent that, as well
as make its naming consistent with the force inline macro
2018-06-09 12:20:29 -04:00
Lioncash
3f210836ad Compiler: Rename __forceinline define to DOLPHIN_FORCE_INLINE
This is much better as prefixed double underscores are reserved for the
implementation when it comes to identifiers. Another reason its better,
is that, on Windows, where __forceinline is a compiler built-in, with
the previous define, header inclusion software that detects unnecessary
includes will erroneously flag usages of Compiler.h as unnecessary
(despite being necessary on other platforms). So we define a macro
that's used by Windows and other platforms to ensure this doesn't
happen.
2018-06-09 12:20:25 -04:00
Lioncash
03414e8e84 Common: Add header for compiler-specifics
Instead of globbing things under an ambiguous Common.h header, move
compiler-specifics over to Compiler.h. This gives us a dedicated home
for anything related to compilers that we want to make functional across
all compilers that we support.

This moves us a little closer to eliminating Common.h entirely.
2018-06-09 12:10:05 -04:00
Lioncash
d1e278218e Common/CMakeLists: Link in libraries privately for traversal_server
Without this, CMake script errors can occur, as explicit linkage
specifiers and non-explicit specifier commands aren't compatible with
one another.
2018-06-08 17:40:44 -04:00
Pierre Bourdon
de0fe0e210
Merge pull request #6928 from leoetlino/random
Common: Add Random utilities
2018-06-08 00:41:08 +09:00
Léo Lam
c93210155f
Merge pull request #7075 from Ebola16/DumpObjects
Software Renderer "Dump Objects" needs dedicated folder and tooltip
2018-06-06 15:20:14 +02:00
Ryan Meredith
45b9b7d211 Give Dump Objects dedicated folder and tooltip 2018-06-06 08:42:41 -04:00
Léo Lam
6ce9c96d91
Merge pull request #7027 from leoetlino/cleanup
Use some C++17 features available since GCC 6
2018-06-04 20:50:50 +02:00
Léo Lam
83324fe77d StringUtil: Remove ValueToString(std::string)
Doesn't make a lot of sense to have a function that gives the string
representation for a string.
2018-06-03 15:11:59 +02:00
Léo Lam
7e79bf97ab IniFile: Use templates for Get()
Gets rid of duplicated code.
2018-06-03 14:53:56 +02:00
Léo Lam
cba32b12e7 IniFile: Use templates for Set() 2018-06-03 14:53:56 +02:00
Léo Lam
fc0193c4b1 Move Config ValueToString to StringUtil
An identical implementation is used by IniFile, so move those functions
to StringUtil. A future commit will modify IniFile to use them.
2018-06-03 14:10:52 +02:00
Léo Lam
fff1db9730 Common: Add Random utilities
This makes it easier to generate random numbers or fill a buffer with
random data in a cryptographically secure way.

This also replaces existing usages of RNG functions in the codebase:

* <random> is pretty hard to use correctly, and std::random_device does
  not give enough guarantees about its results (it's
  implementation-defined, non cryptographically secure and could be
  deterministic on some platforms).
  Doing things correctly is error prone and verbose.

* rand() is terrible and should not be used especially in crypto code.
2018-05-31 17:54:43 +02:00
Lioncash
81e11b2406 x64Emitter: Amend parameter ordering for WriteModRM()'s prototype
The definition of the function uses the ordering {mod, reg, rm}, which
is correct. Match the prototype to this, so that the parameter list
isn't misleading.
2018-05-30 09:30:24 -04:00