Commit Graph

3338 Commits

Author SHA1 Message Date
1fc5eae5bd FileSearch: Add a static_assert for the preferred separator 2017-06-26 11:50:10 +02:00
382356627a FileSearch: Check isDirectory in the non-Windows code
c5fa470 made the extension check discard directories, but
only in the new code that currently only is used on Windows.
Let's add an equivalent check in the old code so that the
behavior is consistent across platforms.
2017-06-26 11:44:23 +02:00
99b1735424 Merge pull request #5660 from shuffle2/unblock-blockingloop
Change "blocking" BlockingLoop::Stop to give up and die after a timeout.
2017-06-26 10:23:21 +02:00
ed8f293b4f Change "blocking" BlockingLoop::Stop to give up and die after a timeout.
This fixes the global-static fifo object causing infinite hangs in some
cases. Notably, failure to initialize a graphics backend would result in
BlockingLoop::Prepare being called but never executing Run(), leaving the
object in a bad state.
2017-06-25 20:47:30 -07:00
1634f0cf5e Use CompareStringOrdinal in DoFileSearch instead of _wcsicmp 2017-06-25 16:47:46 -07:00
be162a3316 FileSearch: Remove unnecessary function 2017-06-25 13:21:25 +02:00
991062093b Merge pull request #5682 from MerryMage/SCMRevGen
SCMRevGen: Use DisableFastUpToDateCheck
2017-06-24 10:44:53 -07:00
11a03e7dd2 SCMRevGen: Use DisableFastUpToDateCheck 2017-06-24 17:34:21 +01:00
c8255092d7 Fix warnings 2017-06-24 01:41:58 +01:00
c5fa470ad8 replace DoFileSearch with optimized version 2017-06-23 17:25:53 -07:00
f16599f4a8 DolphinWX: defer gamelist scanning and switch to single-file cache. 2017-06-23 17:25:53 -07:00
df82adca43 Add function testing whether a bitmask is valid.
This one verifies bitmasks where low bits are set to 1 (hence the name).
Any stray 0 among the lower ones or any stray 1 among the higher zeros
renders the mask invalid.

The edge cases of all zeros and all ones are considered valid masks.

It uses an efficient implementation. It's the counterpart of
https://graphics.stanford.edu/~seander/bithacks.html#DetermineIfPowerOf2
2017-06-22 20:22:53 +02:00
29e8988c90 Analytics: Set the timeout to 5 seconds
3 seconds is sometimes not enough.
2017-06-18 23:16:03 +02:00
9a1503a75c Merge pull request #5642 from lioncash/chrono
HttpRequest: Use std::chrono for indicating time periods
2017-06-18 23:13:52 +02:00
7222ce78ff SysConf: Don't set "config done" flags by default
This allows the user to go through the Wii Menu first boot setup
screen when they launch the System Menu for the first time.

Most useful on a clean profile, after doing a full system update,
to configure settings like the console country.
2017-06-18 22:32:56 +02:00
251de89b5c HttpRequest: Use std::chrono for indicating time periods
Allows the use of chrono time points, on top of being more indicative of
time periods used at call sites, if custom timeouts are specified.
2017-06-18 15:48:37 -04:00
d86f020e81 Rewrite SysConf handling
This rewrites the SysConf code for several reasons:

* Modernising the SysConf class. The naming was entirely cleaned up.
  constexpr for constants.

* Exposing less stuff in the header.

* Probably less efficient parsing and writing logic, but much simpler
  to understand and use in my opinion. No more hardcoded offsets.
  No more duplicated code for the initial SYSCONF generation.

* More flexibility. It is now possible to add and remove entries,
  since we rebuild the file. This allows us to stop spamming
  "section not found" panic alerts; we can now use and insert
  default entries.
2017-06-18 16:17:05 +02:00
dd8dcdf880 LogManager: Check if listener is valid before using it 2017-06-17 10:39:06 +02:00
a2ad3e14d0 Logging: Remove duplicated code 2017-06-17 10:20:30 +02:00
100c433261 Logging: Move verbosity setting code to LogManager
No clue why it was in DolphinWX.
2017-06-17 10:20:30 +02:00
b359d82890 File/IOFile: Check _tfopen_s properly 2017-06-17 02:16:58 +01:00
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
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
f469d86467 cmake/win32: add CompatPatches 2017-06-15 21:26:40 -07:00
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
8f460a1cda Merge pull request #5611 from JosJuice/reorganize-file-namespace
Reorganize File namespace
2017-06-15 23:28:36 +02:00
cf94ce6305 Add a namespace to OpenFStream
For consistency with the other functions in FileUtil.h.
2017-06-15 21:34:04 +02:00
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
0d58a0bfe2 HttpRequest: Add support for custom timeouts 2017-06-13 19:17:11 +02:00
ba3f16edbf HttpRequest: Add support for sending custom headers 2017-06-13 12:52:31 +02:00
8f87433719 HttpRequest: Log response body on failure 2017-06-13 12:52:31 +02:00
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
17ef4c8046 StringUtil: Make SplitString return by value
Simpler usage.
2017-06-11 16:48:20 +02:00
33879bf611 Config: Remove creation of unnecessary CommandLine layer 2017-06-10 19:07:17 +01:00
f206a4ea9c remove MemUsage, and therefor psapi dependency 2017-06-08 22:25:46 -07:00
fd166032ab msbuild: obey some warnings about missing virtual destructors 2017-06-07 20:20:25 -07:00
9357cee2ef do not assign in conditional statements 2017-06-07 20:09:44 -07:00
e1a3e41bf3 fix various instances of -1 being assigned to unsigned types 2017-06-07 19:52:07 -07:00
f7f1d5d2ca msvc: disable meaningless constant truncation warnings in SDCardUtil 2017-06-07 18:44:03 -07:00
4f9dd7277b msvc: disable unused symbol warning in Core/Common/Crypto/ec.cpp 2017-06-07 18:44:03 -07:00
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
442e614021 Merge pull request #5536 from sepalani/getstring
HLE: Prevent GetStringVA to strip newlines
2017-06-05 21:31:09 -07:00
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
f28f23af1d StringUtil: StringPopBackIf added 2017-06-06 05:08:51 +01:00
192fec50b9 Merge pull request #5276 from ligfx/macosheadless
Add headless support on macOS
2017-06-05 20:49:02 -07:00
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
397720a9fe might as well update yet some more pointless version numbers.. 2017-06-03 18:20:40 -07:00
1e766ab490 Config: Add layers CommandLine and CurrentRun 2017-06-03 18:11:57 +01:00
1548a15c68 Config: Implement Get and Set 2017-06-03 18:11:56 +01:00
6151bc1714 Config: Extract layer search order to header 2017-06-03 18:11:56 +01:00