Commit Graph

2800 Commits

Author SHA1 Message Date
Lioncash d68f437e67 Common: Move BitSet helper functions into the Common namespace 2018-04-23 00:13:55 -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