Commit Graph

2567 Commits

Author SHA1 Message Date
Léo Lam 01faa5c852 FileUtil: Use errno for printing errors in IsDirectory
stat() returns an error code in errno on both POSIX compliant
platforms and Windows.

This means we should always use errno instead of GetLastErrorMsg
which uses GetLastError() (Win32) on Windows.
2017-06-16 12:43:41 +02:00
Léo Lam aa63199977 FileUtil: Don't manually strip trailing slashes
POSIX allows one or more trailing slashes for directories.

From POSIX.1-2008, section 3.271 (Base Definitions / Pathname):

> A pathname can optionally contain one or more trailing <slash>
> characters. Multiple successive <slash> characters are considered to
> be the same as one <slash>, except for the case of exactly two
> leading <slash> characters.

On Windows, the extra trailing slashes are ignored for directories too.
2017-06-16 12:31:26 +02:00
Shawn Hoffman f469d86467 cmake/win32: add CompatPatches 2017-06-15 21:26:40 -07:00
Shawn Hoffman 1210c74955 [windows]: Apply compatibility patches to problematic gamepad vibration drivers.
Move ucrtFreadWorkaround to use the new LdrWatcher.
2017-06-15 21:21:01 -07:00
Leo Lam 8f460a1cda Merge pull request #5611 from JosJuice/reorganize-file-namespace
Reorganize File namespace
2017-06-15 23:28:36 +02:00
JosJuice cf94ce6305 Add a namespace to OpenFStream
For consistency with the other functions in FileUtil.h.
2017-06-15 21:34:04 +02:00
JosJuice f09ceaa735 Move IOFile to a separate file
Reduces the number of files that need to be recompiled
when making changes to FileUtil.h.
2017-06-15 21:33:50 +02:00
Léo Lam 0d58a0bfe2 HttpRequest: Add support for custom timeouts 2017-06-13 19:17:11 +02:00
Léo Lam ba3f16edbf HttpRequest: Add support for sending custom headers 2017-06-13 12:52:31 +02:00
Léo Lam 8f87433719 HttpRequest: Log response body on failure 2017-06-13 12:52:31 +02:00
Léo Lam 18678afa6d Common: Add HttpRequest to simplify HTTP requests
Too much boilerplate that is duplicated if we use curl directly.
Let's add a simple wrapper class that hides the implementation details
and just allows to simply make HTTP requests and get responses.
2017-06-13 12:52:31 +02:00
Léo Lam 17ef4c8046 StringUtil: Make SplitString return by value
Simpler usage.
2017-06-11 16:48:20 +02:00
MerryMage 33879bf611 Config: Remove creation of unnecessary CommandLine layer 2017-06-10 19:07:17 +01:00
Shawn Hoffman f206a4ea9c remove MemUsage, and therefor psapi dependency 2017-06-08 22:25:46 -07:00
Shawn Hoffman fd166032ab msbuild: obey some warnings about missing virtual destructors 2017-06-07 20:20:25 -07:00
Shawn Hoffman 9357cee2ef do not assign in conditional statements 2017-06-07 20:09:44 -07:00
Shawn Hoffman e1a3e41bf3 fix various instances of -1 being assigned to unsigned types 2017-06-07 19:52:07 -07:00
Shawn Hoffman f7f1d5d2ca msvc: disable meaningless constant truncation warnings in SDCardUtil 2017-06-07 18:44:03 -07:00
Shawn Hoffman 4f9dd7277b msvc: disable unused symbol warning in Core/Common/Crypto/ec.cpp 2017-06-07 18:44:03 -07:00
JosJuice b2af07a7b7 DiscIO: Remove C/I/S prefixes from class names
These prefixes were inconsistent with the rest of Dolphin.

I'm also renaming VolumeWiiCrypted to VolumeWii because of 1113b13.
2017-06-06 12:31:59 +02:00
shuffle2 442e614021 Merge pull request #5536 from sepalani/getstring
HLE: Prevent GetStringVA to strip newlines
2017-06-05 21:31:09 -07:00
shuffle2 c8166951a0 Merge pull request #5418 from MerryMage/config-again-and-again
VideoConfig: Port to layered configuration system
2017-06-05 21:11:04 -07:00
Sepalani f28f23af1d StringUtil: StringPopBackIf added 2017-06-06 05:08:51 +01:00
shuffle2 192fec50b9 Merge pull request #5276 from ligfx/macosheadless
Add headless support on macOS
2017-06-05 20:49:02 -07:00
Léo Lam d9fd056803 Fix minor formatting issues
These were not caught by the lint script while it was broken.
2017-06-05 02:32:19 +02:00
Shawn Hoffman 397720a9fe might as well update yet some more pointless version numbers.. 2017-06-03 18:20:40 -07:00
MerryMage 1e766ab490 Config: Add layers CommandLine and CurrentRun 2017-06-03 18:11:57 +01:00
MerryMage 1548a15c68 Config: Implement Get and Set 2017-06-03 18:11:56 +01:00
MerryMage 6151bc1714 Config: Extract layer search order to header 2017-06-03 18:11:56 +01:00
Léo Lam 74f636dfc4 Analytics: Don't crash when a DNS resolve times out 2017-06-03 14:09:14 +02:00
Léo Lam e38a66fe1b Common: Add a std::variant implementation
Based on https://github.com/mpark/variant (which is based on libc++).
2017-06-03 12:36:24 +02:00
Léo Lam b08653d69d Common: Add a std::optional implementation
std::optional makes a few things a bit neater and less error prone.
However, we still cannot use C++17 (unfortunately), so this commit
adds an implementation of std::optional that we can use right now.

Based on https://github.com/tensorflow/tensorflow/blob/master/tensorflow/core/lib/gtl/optional.h
which seems to be fairly similar to C++17's <optional> and standards
compliant. It's one of the few implementations that handle propagating
type traits like copy constructibility, just like libc++/libstdc++.
2017-06-03 12:36:24 +02:00
shuffle2 3443454ba2 Merge pull request #5271 from JosJuice/allow-aslr
Allow (but don't force) ASLR
2017-06-02 21:53:02 -07:00
BhaaL 072c161445 upgrade to Windows SDK 10.0.15063.0
this is required for /permissive- to work, because some headers in the
Windows SDK use Microsoft extensions that are not allowed in standards mode
2017-05-28 13:37:31 +02:00
Michael Maltese d416cbd9ed Add CubebUtils namespace and hook up cubeb logging 2017-05-27 18:28:57 -07:00
Pierre Bourdon d592bdd4d4 Migrate to Visual Studio 2017.
Auto-generated by the IDE, I'll trust it knows what it's doing.
2017-05-25 15:58:59 -07:00
JosJuice 89e60a41eb MemoryUtil: 0 -> nullptr 2017-05-20 09:35:53 +02:00
JosJuice 4b4cf509f8 Remove code for only allocating low memory
This is unnecessary when we have position-independent code.
2017-05-20 09:35:53 +02:00
Léo Lam f96ab66d31 Drop remnants of the plugin system 2017-05-19 19:13:16 +02:00
MerryMage bd3e493695 Section: Fix Section::Get 2017-05-13 15:22:29 +01:00
Léo Lam 6185933d18 Config: Fix a formatting issue
Not sure why clang-format did not catch this on the lint builder, but
it definitely doesn't like the lines being too long here.
2017-05-10 17:56:09 +02:00
MerryMage 32d9428171 Config/Layer: Fix accidental cast of RecursiveSection to Section 2017-05-09 00:17:00 +01:00
JosJuice 40653a6607 NandPaths: Make .h function order match .cpp 2017-05-06 17:51:50 +02:00
JosJuice 36b9e3dd35 Don't duplicate code for getting paths based on title IDs
I've seen the expression (u32)(title_id >> 32), (u32)title_id
a few more times in my life than I would've liked to...
2017-05-06 17:45:08 +02:00
Léo Lam 5088fac54b Merge pull request #5354 from leoetlino/iosc
IOS: Implement IOSC-like library (+ bug fixes)
2017-05-04 19:58:47 +02:00
degasus 7389f0f55e Analytics: Set proper thread name. 2017-05-03 23:59:29 +02:00
Markus Wick eaa4565e63 Merge pull request #5362 from Tilka/hash
Common/Hash: small cleanup
2017-05-03 23:44:48 +02:00
Tillmann Karras c54c49714d Arm64Emitter: add FRECPE 2017-05-03 08:02:35 +01:00
Tillmann Karras 3a13e1aa7a Common/Hash: small cleanup 2017-05-03 06:40:52 +01:00
Tillmann Karras 25f61f0329 Common/Hash: use __crc32d() intrinsic on ARM64 2017-05-03 06:40:47 +01:00