Commit Graph

2904 Commits

Author SHA1 Message Date
spycrab 7749e18ecc ConfigManager: Enable Auto-Updater by default 2018-04-26 15:12:15 +02:00
Lioncash 4637579375 Common: Amend CommonTypes include within BitSet.h
We do includes relative to the root, rather than direct pathing.
2018-04-23 00:14:00 -04:00
Lioncash d68f437e67 Common: Move BitSet helper functions into the Common namespace 2018-04-23 00:13:55 -04:00
Lioncash c1c360d9b1 NandPaths: Make function parameters consistent
Also drops trailing underscores from said parameter names.
2018-04-22 23:49:20 -04:00
Lioncash 62242331d8 NandPaths: Remove unused header inclusions 2018-04-22 23:49:16 -04:00
Lioncash 2ce0f42c14 Common: Move BitSet into the Common namespace
This should be under the common namespace, considering where it's living
2018-04-22 23:43:07 -04:00
Lioncash c23a998f9d
TraversalClient: Use u32 instead of enet_uint32
Lessens the dependence on the enet library (and we really don't need to rely on a third-party library for a 32-bit integer type)
2018-04-16 16:46:48 -04:00
Lioncash f1e92a1eae
TraversalClient: Make TestPacket() private
This is only used by the private InterceptCallback()
2018-04-16 16:46:48 -04:00
Lioncash 1b8ad49d1e
TraversalClient: In-class initialize members where applicable 2018-04-16 16:46:48 -04:00
Lioncash ca6a2970ea
TraversalClient: Make data externally read-only members private
These are only ever queried for state, not written. Therefore, prevent writing to the members
and make them private.
2018-04-16 16:46:44 -04:00
Léo Lam dfd6a228a6
Merge pull request #6654 from lioncash/log
Common/Logging/Log: Wrap GENERIC_LOG macro's body in do { } while (0)
2018-04-16 20:38:22 +02:00
Lioncash 236aed9fd1
Common/CMakeLists: Link curl and VTune libraries in privately
These are only used internally.
2018-04-16 12:38:24 -04:00
Lioncash b0dc823472
Common/Logging/Log: Wrap GENERIC_LOG macro's body in do { } while (0)
Enforces the termination of GENERIC_LOGs with semicolons.
2018-04-16 12:11:32 -04:00
Lioncash 939c5671a9 Common/Config: Remove unused header inclusions 2018-04-15 22:35:00 -04:00
Lioncash 4836739663 Common/Config: Remove unnecessary function declaration
This prototype declaration is already provided by the Config.h header
2018-04-15 22:33:53 -04:00
Mat M eecdb51709
Merge pull request #6645 from JosJuice/tie-constexpr
x64Emitter: Don't assume that std::tie is constexpr
2018-04-15 03:11:31 -04:00
JosJuice 8a146d5210 x64Emitter: Don't assume that std::tie is constexpr
Using constexpr tie broke building with older GCC versions according to
https://forums.dolphin-emu.org/Thread-build-error-on-linux-mint-18-3
2018-04-15 08:30:01 +02:00
Léo Lam 371f807e67
Merge pull request #6615 from leoetlino/sysconf
SysConf: Migrate to new filesystem interface
2018-04-14 23:29:25 +02:00
Lioncash b31281527a
CMakeLists: Define an OProfile target and use it
Allows us to bring includes and relevant libraries into scope by explicitly declaring linkage against the target
as opposed to using a variable. Also removes the dumping of OProfile includes into the top-level directory.
2018-04-13 19:35:17 -04:00
Léo Lam 52905a5fae
Merge pull request #6627 from sepalani/map-strip
PPCSymbolDB: Do not truncate fixed size symbols
2018-04-13 20:48:28 +02:00
Lioncash e28d063539 x64Emitter: Make the Align* functions return a non-const data pointer
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-04-12 19:46:55 -04:00
Tilka bbd1bb8eaa
Merge pull request #6636 from phire/fix_autoformatting
Fix change in comment meaning by autoformat.
2018-04-12 22:52:06 +01:00
Scott Mansell 0e6d01220a Fix change in comment meaning by autoformat. 2018-04-13 09:20:27 +12:00
Tilka 27515f4c9b
Merge pull request #6626 from lioncash/dcbz_l-disasm
GekkoDisassembler: Fix disassembly of dcbz_l
2018-04-12 22:18:56 +01:00
Léo Lam a287bbc3bd Move SysConf to Core
It's not common code that could be reused for, say, Citra;
it's absolutely specific to Wii emulation and only used by the Dolphin
core, so let's move it there.

Another reason for doing this is to avoid having Common depend on Core.
2018-04-12 22:16:37 +02:00
Léo Lam 0856d4a68a SysConf: Migrate to new filesystem interface
It was discovered that some titles rely on filesystem metadata to work
properly. Currently, in master they either simply won't find their
save files (for example Bolt) or will complain about the Wii system
memory being corrupted (on first use or every time depending on
the title).

In order to even be able to keep track of file metadata, we first need
to eliminate all direct accesses to the NAND and make all kinds of
operations go through the filesystem code added in PR 6421.

This commit starts the migration process by making SysConf use
the new FS interface.
2018-04-12 22:16:37 +02:00
spycrab 40bb9974f2 Reformat all the things! 2018-04-12 21:28:39 +02:00
Sepalani 7d36165489 PPCSymbolDB: Do not truncate fixed size symbols
Fix comparison warning
2018-04-10 21:50:33 +04:00
Lioncash 1c17329e2f
GekkoDisassembler: Fix disassembly of dcbz_l
Previously this would fall through and disassemble as a generic "ps_[number]" junk instruction.
2018-04-10 11:22:01 -04:00
JosJuice 0dca432836 Remove old code for using default locale
This isn't needed anymore now that the global C++ locale isn't
set to the classic locale.
2018-04-09 19:14:15 +02:00
Lioncash 88a80f118c Common/Swap: Amend BigEndianValue's operator= to return a reference to the object rather than returning void
The general convention is to return a reference to the object that was
acted on, otherwise you can get into situations with errors because the
type wasn't being propagated properly
2018-04-08 01:22:18 -04:00
Léo Lam a957bd1ecc
Merge pull request #6421 from leoetlino/fs-interface
IOS: Refactor the filesystem code
2018-04-06 12:17:09 +02:00
Markus Wick 2449be7f0c
Merge pull request #6571 from lioncash/rotate
CommonFuncs: Generify rotation functions and move them to BitUtils.h
2018-04-02 12:18:22 +02:00
Markus Wick dea30e08bf
Merge pull request #6576 from lioncash/iconv
CMakeLists: Remove iconv from the LIBS variable
2018-04-02 11:07:19 +02:00
Lioncash fd9eab73fb CPUDetect: Make CPUVendor enum an enum class
Avoids dumping the enum contents into the global namespace.
2018-04-01 17:47:50 -04:00
Lioncash 8db4ab7dd6
CMakeLists: Remove iconv from the LIBS variable
Adjusts Common to use the ICONV_LIBRARIES variable directly and doesn't
append it to the LIBS variable.

After this, there's only one remaining usage where libraries are added
to the LIBS variable, after which it can be removed once the rest of
the targets are migrated off add_dolphin_library
2018-04-01 14:00:55 -04:00
Lioncash c3483a1823 CommonFuncs: Generify rotation functions and move them to BitUtils.h
These are bit manipulation functions, so they belong within BitUtils.

This also gets rid of duplicated code and avoids relying on compiler
reserved names existing or not existing to determine whether or not we
define a set of functions.

Optimizers are smart enough in GCC and clang to transform the code to a
ROR or ROL instruction in the respective functions.
2018-03-31 18:09:45 -04:00
Léo Lam de15e09a4f Log: Rename IOS_FILEIO to IOS_FS
Let's use the actual name of the system module.

Also, the FS code is not all about files.
2018-03-31 10:58:37 +02:00
Léo Lam 5a7b966b6d IOS: Rewrite FS to use FileSystem
This is the large change in the branch.

This lets us use either the host filesystem or (in the future) a NAND
image exactly the same way, and make sure the IPC emulation code
behaves identically. Less duplicated code.

Note that "FileIO" and "FS" were merged, because it actually doesn't
make a lot of sense to split them: IOS handles requests for both
/dev/fs and files in the same resource manager, and as it turns out,
/dev/fs commands can *also* be sent to non /dev/fs file descriptors!
If we kept /dev/fs and files split, there would be no way to
emulate that correctly. I'm not aware of anything that does that (yet?)
but I think it's important to be correct.
2018-03-31 10:58:37 +02:00
Léo Lam 1bdfedf3c6 Common: Add a Result class
This adds a lightweight, easy to use std::variant wrapper intended to
be used as a return type for functions that can return either a result
or an error code.
2018-03-31 10:45:44 +02:00
Lioncash e93159e54a
CMakeLists: Link in system framework libraries explicitly on macOS
Makes our libraries explicitly link in which libraries they need.
This makes our dependencies explicit and removes the reliance on the
LIBS variable to contain the libraries that they need.
2018-03-30 16:14:10 -04:00
Léo Lam 03a6a9b240
Merge pull request #6546 from spycrab/updater_ui
Implement Updater UI
2018-03-28 20:04:32 +02:00
spycrab f700fcae2e HttpRequest: Add callback option 2018-03-28 17:33:34 +02:00
Pierre Bourdon ac97f0463f
Merge pull request #6548 from lioncash/const
LinearDiskCache: Don't cast away const in Read()
2018-03-28 03:14:38 +02:00
Lioncash 008442898c LinearDiskCache: Don't cast away const in Read()
We really shouldn't make the out pointer in the read function const and
then summarily cast it away. Also alters Write to be consistent with
casting.
2018-03-27 21:09:18 -04:00
Léo Lam ceed6890df
Merge pull request #6526 from lioncash/emitter
x64Emitter: Minor cleanup and changes
2018-03-27 08:49:36 +02:00
Lioncash 476c71efc1 x64Emitter: Make eligible register and immediate functions constexpr
Pointer variants aren't eligible as expressions with reinterpret cast
within them cannot be constexpr.
2018-03-26 18:21:22 -04:00
Lioncash 8b072e1383 x64Emitter: Make remaining eligible functions in OpArg constexpr 2018-03-26 18:21:21 -04:00
Lioncash 964201f2d3 x64Emitter: Use std::tie in OpArg's operator==. Provide operator!= for symmetry 2018-03-26 18:21:21 -04:00
Lioncash 7f583b66cb x64Emitter: Clean up constructors for OpArg
Default initializes members and moves initial assignments into the
initializer list.
2018-03-26 18:21:17 -04:00
Miikka Juomoja 7169be242f StringUtil: Fix possible bad free 2018-03-26 23:48:13 +02:00
Stenzek c82be53d5c GLInterface: Use EXT_swap_control or MESA_swap_control over SGI
The SGI extension does not define calling SwapInterval with a parameter
of zero as valid. It was just lucky that drivers interpreted this as
vsync off. The EXT_swap_control extension defines zero as a valid value.

Mesa does not appear to support the EXT variant, so we fall back to
MESA_swap_control here, which also supports zero.
2018-03-26 22:09:22 +10:00
Lioncash 2861e8f868 x64Emitter: Clean up constructor and destructors of XEmitter
In-class initializes members, defaults the default constructor and
virtual destructor, and puts members in the initializer list.
2018-03-25 16:50:02 -04:00
Léo Lam 4c5efb0f3a
Merge pull request #6508 from lioncash/cmake-common
Common/CMakeLists: Migrate off add_dolphin_library
2018-03-24 09:08:20 +01:00
Lioncash f889cae8c4
Arm64Emitter: Satisfy unrelated linter issues that cropped up by modifying the cpp file 2018-03-23 19:17:44 -04:00
Lioncash 91cefe6c8a
Arm64Emitter: Make IsImmArithmetic, IsImmLogical, FPImm8ToFloat, and FPImm8FromFloat internally linked
These aren't used anywhere outside of the emitter. Centralizes them under an anonymous namespace.
2018-03-23 19:17:26 -04:00
Lioncash 2548ccda8e
Common/CMakeLists: Migrate off add_dolphin_library
Continues the migration work that was started in 3a4c3bbe01
2018-03-23 19:08:30 -04:00
Lioncash b11c237c43
Arm64Emitter: Remove unnecessary V8_UINT64_C preprocessor macro
UINT64_C is provided via <cstdint>, so we can just use that instead.
2018-03-23 13:31:48 -04:00
Lioncash 03671a5534
Arm64Emitter: Remove duplicate IsPowerOf2 function
We can just use the generified version in MathUtil.
2018-03-23 13:31:44 -04:00
Lioncash 79f40fb8d7
MathUtil: Generify IsPow2
This will allow it to also be used in the AArch64 emitter.
2018-03-23 09:50:49 -04:00
Pierre Bourdon 9628333b86 AutoUpdater: support optionally restarting Dolphin after update 2018-03-23 11:10:25 +01:00
Léo Lam 5e76f3a6d4
Merge pull request #6488 from aldelaro5/symbols-log
LOG: Add a log type for Symbols
2018-03-22 22:06:04 +01:00
aldelaro5 c54e56793a
Add a log type for Symbols and move symbols related logs to it
This fix the awkwardness of having the symbols detection, parsing and loading related logs be in OS HLE while they don't have anything to do with that.
2018-03-22 14:57:28 -04:00
Pierre Bourdon fe600ab0ed
Merge pull request #6146 from HannesMann/qos-support
Netplay: Add Quality of Service (QoS) support
2018-03-21 02:46:46 +01:00
Anthony ad8c31699f
Merge pull request #6463 from delroth/auto-update
Initial implementation of the Dolphin auto-updater for Windows
2018-03-20 11:28:26 -07:00
Pierre Bourdon bc9deb7be3 HttpRequest: make curl initialization thread-safe 2018-03-20 00:36:43 +01:00
Pierre Bourdon 5498f9b7ef make_scmrev.h.js: set default auto-update track from environment 2018-03-19 00:11:55 +01:00
Lioncash 975ba4abf0 x64Emitter: Make FloatOp and NormalOp enum classes
Reduces the amount of identifiers placed in the Gen namespace internally.
2018-03-18 18:04:54 -04:00
Lioncash c22a6f4551 x64Emitter: Move FloatOp and NormalOp enums to the cpp file
These are only used internally. This also allows us to eliminate some
symbols that get dumped into the exposed Gen namespace.

By extension this also hides the Write[X] functions from OpArg's public
interface. This is only used internally by XEmitter, so they shouldn't
be usable by anything else.
2018-03-18 18:04:48 -04:00
Lioncash 7926a0c814 Use __func__ instead of __FUNCTION__ where applicable
This replaces usages of the non-standard __FUNCTION__ macro with the standard
mandated __func__ identifier.

__FUNCTION__ is a preprocessor definition that is provided as an
extension by compilers. This was the only convenient option to rely on
pre-C++11. However, C++11 and greater mandate the predefined identifier
__func__, which lets us accomplish the same thing.

The difference between the two, however, is that __func__ isn't a
preprocessor macro, it's an actual identifier that exists at function
scope. The C++17 draft standard (N4659) at section [dcl.fct.def.general]
paragraph 8 states:

"
The function-local predefined variable __func__ is defined as if a
definition of the form

static const char __func__[] = "function-name ";

had been provided, where function-name is an implementation-defined
string. It is unspecified whether such
a variable has an address distinct from that of any other object in the
program.
"

Thankfully, we don't do any macro or string concatenation with __FUNCTION__
that can't be modified to use __func__.
2018-03-16 13:41:53 -04:00
Lioncash 75f5fcdfee Assert: Remove unused parameter from DEBUG_ASSERT
This brings the macro in line with the regular ASSERT macro, which only has one
macro parameter.
2018-03-16 13:01:11 -04:00
Lioncash f44e2dc425 Assert: Wrap assertion macro bodies in do {} while (0)
Enforces the termination of the macro with a semicolon. Aside from that
requirement, behavior remains the same.
2018-03-16 12:35:23 -04:00
Lioncash 50a476c371 Assert: Uppercase assertion macros
Macros should be all upper-cased. This is also kind of a wart that's
been sticking out for quite a while now (we avoid prefixing
underscores).
2018-03-14 22:03:12 -04:00
Pierre Bourdon d72947d638
Merge pull request #6427 from JosJuice/thousandseparate-encoding
StringUtil: Fix Windows encoding in ThousandSeparate
2018-03-10 13:16:00 +01:00
JosJuice 34be8488a5 StringUtil: Fix Windows encoding in ThousandSeparate
Some locales use non-breaking spaces as separators, so getting the
encoding right is important. If DolphinWX gets a string that isn't
valid UTF-8, it flat out won't display the string.
2018-03-10 12:13:30 +01:00
Stenzek 93ab50c555 OGL: Move primitive restart enable logic to GLUtil 2018-03-10 16:11:20 +10:00
Stenzek 51a586d11a GLUtil: Encapsulate functions in a namespace 2018-03-10 16:11:19 +10:00
Hannes Mann 41682a07cb Add Quality of Service (QoS) support 2018-03-09 00:11:18 +01:00
Pierre Bourdon 9e0739f5e5 traversal: add systemd watchdog support 2018-03-08 06:10:17 +00:00
hubslave 4ae48e10e5
Include <endian.h> for byte swap macros on OpenBSD
There is code below that assumes the presence of those macros (by #undef'ing them), but none of the included headers provided them.

This fixes a build failure on OpenBSD where the undef'd macros _do_ get picked up later on in a compilation unit (through which include, I don't know), and thus shadow the Common::swap* functions.
2018-02-26 00:07:05 +02:00
Stenzek aaea515d71 GLUtil: Drop now-unused attributeless VAO helpers 2018-02-22 19:09:28 +10:00
degasus a5a0599145 CustomTexture: Drop old texture format. 2018-01-20 17:08:47 +01:00
34will 86a787bdf9 Modified StringUtil to change UTF16ToUTF8 to use a wstring_convert and codecvt_utf8<wchar_t> to convert a UTF16 wstring to a UTF8 string. 2018-01-11 21:49:25 +00:00
34will a949e98d9b Modified UTF16BEUTF8 to just convert the UTF-16 C-string into a std::u16string, and pass it into CodeToUTF8 with the 'from' parameter being "UTF-16BE", rather than manually performing the big endian to little endian encoding. 2018-01-11 19:51:19 +00:00
34will ba111959fa Modified StringUtil to use a u16string instead of a wstring in the non-win32 UTF16BEToUTR8 method. 2018-01-11 02:45:27 +00: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 b3b7aef09a Android: Extract Sys to a different folder than the User folder 2017-12-26 09:53:32 +01:00
JosJuice d1c1793a34 Don't expose SYSDATA_DIR in a header 2017-12-24 17:13:04 +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
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
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
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
Pierre Bourdon 8a830074b6
Merge pull request #6220 from leoetlino/utf8
WX: Fix argument parsing
2017-12-07 15:16:39 +01:00
JosJuice 9d8a82e1d9 Don't use wrong encoding for paths when opening streams on Windows 2017-12-05 21:23:35 +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
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
Stenzek f43d85921d VideoBackends: Add AbstractStagingTexture class
Can be used for asynchronous readback or upload of textures.
2017-11-22 18:47:04 +10:00
JosJuice b8c83dd5f3
Merge pull request #5973 from ligfx/renamefifoqueue
Rename Common::FifoQueue to Common::SPSCQueue
2017-11-19 13:51:22 +01:00
MerryMage 37419b9a57 Config/Layer: Allow all keys of a section to be iterated over 2017-11-15 18:04:40 +00:00
MerryMage 4c24629b95 Config: Flatten structures
Originally, Layer contained a std::map of Sections, which containted a std::map
containing the (key, value) pairs. Here we flattern this structure so that only
one std::map is required, reducing the number of indirections required and
vastly simplifying the code.
2017-11-15 18:04:40 +00:00
MerryMage e331a76176 ConfigInfo: Switch to doing case-insensitive comparison 2017-11-15 18:04:40 +00:00
MerryMage ec7b84c5f2 Config: Extract ConfigInfo into own header 2017-11-15 18:04:40 +00:00
MerryMage c8f970e2b0 Config: Remove recursive layer 2017-11-15 18:04:40 +00:00
JosJuice 72b7b96571 Remove IsTriviallyCopyable hack for VS 2017-11-13 19:51:16 +01:00
JosJuice 983b986303 Don't delete BitField copy assignment operator on VS 2017-11-13 19:51:11 +01:00
JosJuice 2c10ba9be1 Simplify StringUtil::UTF16ToUTF8 2017-11-11 20:30:06 +01:00
JosJuice 65c1df094f Remove unneeded check in StringUtil::UTF16ToUTF8
No code is relying on this unexplained null byte check, since
the only code that calls UTF16ToUTF8 on non-Windows systems
is UTF16BEToUTF8, which explicitly strips null bytes.
2017-11-11 20:30:06 +01:00
Greg Wicks c2dcb97d06 Android: Fix NDK r16b2 build 2017-11-07 11:02:27 -05:00
JosJuice 6902bbb696 When NAND is damaged, show title names from save files
The earlier code always tried to use TitleDatabase for getting
title names, but that didn't work for disc-based games, because
there was no way to get the maker ID.
2017-11-03 23:17:36 +01:00
JosJuice 5a6d90900e Add WiiSaveBanner class
This class is similar to the BannerLoaderWii class that was
removed in ee694e32.
2017-11-03 23:00:43 +01:00
Léo Lam 28d648b802 MemArena: Use names that are based on the PID
Fixes a regression which broke running several Dolphin instances at the
same time on Windows. Thanks to exjam for spotting the issue
pretty much immediately. Sorry about that!

Also changes the file names to be more consistent on all platforms.
2017-10-11 17:40:05 +02:00
Dane Z. Bush 4dfe6c0875 MemArena: Name shared memory handle
Assign a name to the CreateFileMapping handle on Win32 so third party
applications can read from Dolphin's memory and integrate with the
current emulation.

Built and tested, multiple sessions are still possible without
collisions.
2017-10-11 16:35:32 +02:00
Sepalani f65dcdcdca DebugInterface: Rename InsertBLR to Patch 2017-10-05 20:22:16 +02:00
Pierre Bourdon 43f067c6e1 StringUtil: support TryParse(u16*) 2017-09-18 05:04:11 +02:00
JosJuice 38304da947 DiscIO: Use Common::Lazy for loading filesystems
This simplifies FileMonitor a lot and also lets us
clean up FilesystemPanel.
2017-09-15 18:57:05 +02:00
Stenzek 4d36f0cc87 Bitfield: Cast value to storage type in assignment operator
This allows us to use enum classes in bitfields.
2017-09-11 19:40:25 +10:00
Léo Lam 8cd8e9d905 JIT: Don't always look up symbols for blocks
With tons of symbols, this results in noticeable stuttering, so
skip lookups if the perf dir option isn't set anyway.
2017-09-10 11:42:12 +02:00
Lioncash 696e1b40b5 Common: Move version strings to their own header
Ideally Common.h wouldn't be a header in the Common library, and instead be renamed to something else, like PlatformCompatibility.h or something, but even then, there's still some things in the header that don't really fall under that label

This moves the version strings out to their own version header that doesn't dump a bunch of other unrelated things into scope, like what Common.h was doing.

This also places them into the Common namespace, as opposed to letting them sit in the global namespace.
2017-09-09 19:28:10 -04:00
degasus 304e601ad3 JitArm64: Reimplement aarch64 cycle counters.
CNTVCT_EL0 is force-enabled on all linux plattforms.
Windows is untested, but as this is the best way to get *any* low
overhead performance counters, they likely use it as well.
2017-09-02 13:24:37 +02:00
JosJuice 87d982982d Fix regression in File::CopyDir
This apparently fixes https://bugs.dolphin-emu.org/issues/10499 somehow.

The first changed line of this commit is just for performance - the
second changed line is where the difference in behavior is.
2017-08-25 19:14:14 +02:00
Michael M b58f8d19ab Rename Common::FifoQueue to Common::SPSCQueue
Since all queues are FIFO data structures, the name wasn't informative
as to why you'd use it over a normal queue. I originally thought it had
something to do with the hardware graphics FIFO.

This renames it using the common acronym SPSC, which stands for
single-producer single-consumer, and is most commonly used to talk about
lock-free data structures, both of which this is.
2017-08-23 17:00:52 -07:00
Anthony 935c1da357 Merge pull request #5951 from ligfx/gametrackerworkqueuethread
GameTracker: use new Common::WorkQueueThread instead of signals/slots
2017-08-23 08:02:36 -07:00
Pierre Bourdon a641609857 WFSI: Implement patch install finalization. 2017-08-22 23:41:37 +02:00
Leo Lam 6e1cdfadc9 Merge pull request #5955 from leoetlino/copy
FileUtil: Simplify File::Copy on non-Windows platforms
2017-08-22 21:29:46 +02:00
Markus Wick 3094d6531d Merge pull request #5962 from degasus/arm-fixes
JitArm64: Fix rlwinmx.
2017-08-22 20:27:45 +02:00
JosJuice 09f3f9b41a Remove NonCopyable
The class NonCopyable is, like the name says, supposed to disallow
copying. But should it allow moving?

For a long time, NonCopyable used to not allow moving. (It declared
a deleted copy constructor and assigment operator without declaring
a move constructor and assignment operator, making the compiler
implicitly delete the move constructor and assignment operator.)
That's fine if the classes that inherit from NonCopyable don't need
to be movable or if writing the move constructor and assignment
operator by hand is fine, but that's not the case for all classes,
as I discovered when I was working on the DirectoryBlob PR.

Because of that, I decided to make NonCopyable movable in c7602cc,
allowing me to use NonCopyable in DirectoryBlob.h. That was however
an unfortunate decision, because some of the classes that inherit
from NonCopyable have incorrect behavior when moved by default-
generated move constructors and assignment operators, and do not
explicitly delete the move constructors and assignment operators,
relying on NonCopyable being non-movable.

So what can we do about this? There are four solutions that I can
think of:

1. Make NonCopyable non-movable and tell DirectoryBlob to suck it.

2. Keep allowing moving NonCopyable, and expect that classes that
   don't support moving will delete the move constructor and
   assignment operator manually. Not only is this inconsistent
   (having classes disallow copying one way and disallow moving
   another way), but deleting the move constructor and assignment
   operator manually is too easy to forget compared to how tricky
   the resulting problems are.

3. Have one "MovableNonCopyable" and one "NonMovableNonCopyable".
   It works, but it feels rather silly...

4. Don't have a NonCopyable class at all. Considering that deleting
   the copy constructor and assignment operator only takes two lines
   of code, I don't see much of a reason to keep NonCopyable. I
   suppose that there was more of a point in having NonCopyable back
   in the pre-C++11 days, when it wasn't possible to use "= delete".

I decided to go with the fourth one (like the commit title says).
The implementation of the commit is fairly straight-forward, though
I would like to point out that I skipped adding "= delete" lines
for classes whose only reason for being uncopyable is that they
contain uncopyable classes like File::IOFile and std::unique_ptr,
because the compiler makes such classes uncopyable automatically.
2017-08-22 16:40:34 +02:00
degasus b00c60618b JitArm64: Fix rlwinmx.
Seems like I was wrong that ANDI2R doesn't require a temporary register here.
There is *one* case when the mask won't fit in the ARM AND instruction:
mask = 0xFFFFFFFF
But let's just use MOV instead of AND here for this case...
2017-08-22 08:47:43 +02:00
Léo Lam 6f923ffae4 FileUtil: Simplify File::Copy on non-Windows platforms
The old way of doing it is error prone and unnecessarily complex.
2017-08-21 18:31:46 +02:00
Pierre Bourdon 873521ce0b Revert "Try to fix File::Copy with non-1024-byte aligned sizes" 2017-08-21 18:29:58 +02:00
Markus Wick 8280d15357 Merge pull request #5939 from JonnyH/WIP/broken-fstream-copy
Try to fix File::Copy with non-1024-byte aligned sizes
2017-08-21 17:01:16 +02:00
Lioncash 7a5577498b CommonTypes: Qualify standard integral types in typedefs with std::
Given a relatively recent proposal (P0657R0), which calls for deprecation of putting stuff into the global namespace when using C++ headers, this just futureproofs our code a little more.

Technically this is what we should have been doing initially, since an
implementation is allowed to not provide these types in the global
namespace and still be compliant.
2017-08-20 19:34:52 -04:00
Leo Lam 08004d409e Merge pull request #5937 from ligfx/miniupnpccmake
CMake: use miniupnpc target instead of global vars
2017-08-20 23:44:06 +02:00
Michael M 8c13e0230c GameTracker: use WorkQueueThread 2017-08-20 14:40:56 -07:00
Michael M de9378bf63 Common: add WorkQueueThread 2017-08-20 14:40:56 -07:00
Sepalani 4e5fe6366a CommonFuncs: LastStrerrorString added 2017-08-18 20:08:50 +01:00
Jonathan Hamilton 643b3ba9f8 Try to fix File::Copy with non-1024-byte aligned sizes
ifstream::read() sets the failbit if trying to read over the end, which
means that (!input) would be hit for the 'last' block if it wasn't
exactly BSIZE (1024) bytes.
2017-08-17 14:08:56 -07:00
Michael M fc306faad8 CMake: use miniupnpc target instead of global vars 2017-08-17 13:15:02 -07:00
Léo Lam 4b4e488189 WFS: Use a separate log type for WFS related logs
Makes it easier to turn off general IOS messages that can be
distracting (e.g. /dev/net/ssl being opened hundreds of time...)
without losing the ability to view WFS messages.
2017-08-16 22:27:29 +02:00
Leo Lam a53b01360c Merge pull request #5898 from ligfx/extractupnp
Common: extract UPnP namespace from NetPlayServer
2017-08-17 03:11:41 +08:00
Leo Lam 70931f460d Merge pull request #5929 from JonnyH/PR/fix-oprofile-build-linked-as-needed
Fix OPROFILE linux build with -Wl,--as-needed
2017-08-17 03:06:59 +08:00
Sepalani 93b5a5369b SymbolDB: Blank stripped symbol name fixed 2017-08-16 04:07:19 +01:00
Pierre Bourdon 9b79e0ac72 Merge pull request #5930 from delroth/wfs
Fix Dragon Quest X offline mode on Dolphin
2017-08-15 22:40:56 +02:00
Pierre Bourdon f810f1edb2 WFS/NAND: Better handle GID. 2017-08-15 22:29:10 +02:00
Jonathan Hamilton 2a66b88d01 Fix OPROFILE linux build with -Wl,--as-needed
The opagent library was (incorrectly) marked as a dependency for "Core"
instead of "Common".

When linked with --as-needed, any symbols the linker can tell are not
used are discarded. As the link is done in command-line order, and the
Core library (and dependencies) are processed before Common, it would
link in Core, then opagent, but as at that point no opagent symbols are
used the whole opagent library would be discarded.

Moving the opagent library to be a dependency of Common fixes this, as
after the Common library is linked, there *are* opagent symbols used.
2017-08-14 14:38:44 -07:00
Michael M 1ade08c607 Fix two small lint errors 2017-08-13 19:06:10 -07:00
Michael M 8702ffccc3 UPnP: use value-initialization instead of std::memset 2017-08-13 18:50:53 -07:00
Michael M 0e51082bbb UPnP: move variable declaration to where it's used 2017-08-13 18:50:52 -07:00
Michael M 7ce9f1f984 UPnP: remove unneeded vector in InitUPnP() 2017-08-13 18:50:52 -07:00
Michael M a09f8744b9 UPnP: cleanup variable name desc_xml 2017-08-13 18:50:52 -07:00