Commit Graph

96 Commits

Author SHA1 Message Date
Léo Lam 2f22c76db1 UICommon: Avoid including Xrandr.h
Xlib has really terrible headers that declare non-namespaced
macros and typedefs for common words.

Just wasted 10 minutes trying to figure out why a unit test failed
to build before I remembered it was Xrandr.h conflicting with our
enum class members again.

To fix the issue, this removes the Display* parameter from the
EnableScreensaver function (which was unused) so we don't have
to include Xrandr.h anymore.
2018-04-14 17:14:38 +02:00
Léo Lam 62269572e4 UICommon: Fix indirect includes 2018-04-14 16:42:54 +02:00
JosJuice a66d56aece Use configured locale in UICommon::FormatSize
StringFromFormat always uses the C locale, so we can't use it if we want
the decimal separator to be locale aware, but we can use a stringstream.
2018-04-09 19:14:15 +02:00
JosJuice 72040600d7 Set locale to "en_GB" if "en" is configured 2018-04-09 19:14:14 +02:00
JosJuice 9417fc6a3a DolphinWX: Set C++ locale
After 3a83ebc, the Show System Clock feature started using the
unfortunate combination of MM/DD/YY dates (rare outside of the US)
and 24-hour time (rare in the US) regardless of the user's locale
settings. This commit makes it use the configured locale again.

I've noticed one minor difference in behavior between now and
before 3a83ebc: The new way of setting the C/C++ locale seems to
treat "en" as "en-US", but the wx way of setting the C locale
treated it as "en-GB" (at least on Windows).
2018-04-09 19:14:14 +02:00
Lioncash f1be7cd4a0
CMakeLists: Link bochs in privately where applicable
Everything that links in core doesn't need to see anything related to bochs, because it's only used internally.
Anything else that relies on bochs should be linking it in explicitly.
2018-04-08 04:59:58 -04:00
Shawn Hoffman 6a0c15491b Remove EmuState 2018-03-31 16:21:17 +02:00
Léo Lam df0d1c8138
Merge pull request #6563 from JosJuice/fix-wii-banner-load
Fix loading Wii banners for games that initially were cached without banners
2018-03-31 14:59:09 +02:00
JosJuice 5847e213af Clean up the end of GameFile::BannerChanged 2018-03-31 14:52:21 +02:00
Léo Lam 329622120f
Merge pull request #6567 from JosJuice/discio-enums-case
DiscIO: Don't use all uppercase for enum values
2018-03-31 14:37:26 +02:00
JosJuice 4387432436 DiscIO: Don't use all uppercase for enum values
Also removing some prefixes that we don't need now that we're
using enum classes instead of plain enums.
2018-03-31 14:11:32 +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
JosJuice a7ba69e16a Fix loading Wii banners for games that initially were cached without banners
Fixes https://bugs.dolphin-emu.org/issues/10969
2018-03-30 12:04:01 +02:00
Mat M fc99b21080
Merge pull request #6560 from JosJuice/invalid-games-in-game-list
DolphinQt2: Don't show invalid games in game list
2018-03-29 18:49:38 -04:00
JosJuice ff2fe73ec9 DolphinQt2: Don't show invalid games in game list
Regression from 1f1dae3.

This problem doesn't happen in DolphinWX as far as I know, but if
you've ran into the problem in DolphinQt2, it will carry over to
DolphinWX because of the shared game list cache.
2018-03-29 21:52:21 +02:00
Lioncash a2a18380a7 UICommon/CMakeLists: Migrate off of add_dolphin_library
Continues the migration work started in
3a4c3bbe01
2018-03-28 06:29:09 -04:00
Léo Lam 793c6d25f4
Merge pull request #4532 from Neui/env-var-usr-cfg
Use $DOLPHIN_EMU_PATH as an alternative for the user directory
2018-03-26 23:41:27 +02:00
Pierre Bourdon 1ac7452129 AutoUpdater: Generate basic HTML changelog. 2018-03-23 11:10:25 +01:00
Pierre Bourdon 1f3310874b AutoUpdater: Don't show a spinning wheel cursor when delaying update 2018-03-23 11:10:25 +01:00
Pierre Bourdon 9628333b86 AutoUpdater: support optionally restarting Dolphin after update 2018-03-23 11:10:25 +01:00
spycrab ee3d64145c Qt: Improve updater 2018-03-23 10:42:40 +01:00
Pierre Bourdon 66b41c5509 UICommon: Add AutoUpdate module + placeholder Qt implementation
The AutoUpdate module is a generic update checker mechanism which can be
used by UI backends to trigger an auto-update check as well as the
actual update process.

Currently only configurable through .ini and the Qt implementation is
completely placeholder-y -- blocking the main thread on a network
request on startup, etc.
2018-03-20 19:21:19 +01: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
JosJuice 1f1dae367d Unify ISOFile (wx) with GameFile (Qt) and put it in UICommon
The original reason I wanted to do this was so that we can replace
the Android-specific code with this in the future, but of course,
just deduplicating between DolphinWX and DolphinQt2 is nice too.

Fixes:

- DolphinQt2 showing the wrong size for split WBFS disc images.

- DolphinQt2 being case sensitive when checking if a file is a DOL/ELF.

- DolphinQt2 not detecting when a Wii banner has become available
after the game list cache was created.

Removes:

- DolphinWX's ability to load PNGs as custom banners. But it was
already rather broken (see https://bugs.dolphin-emu.org/issues/10365
and https://bugs.dolphin-emu.org/issues/10366). The reason I removed
this was because PNG decoding relied on wx code and we don't have any
good non-wx/Qt code for loading PNG files right now (let's not use
SOIL), but we should be able to use libpng directly to implement PNG
loading in the future.

- DolphinQt2's ability to ignore a cached game if the last modified
time differs. We currently don't have a non-wx/Qt way to get the time.
2018-03-09 13:08:38 +01:00
spycrab 0dd52ca7ab UICommon: Move screensaver code to UICommon 2018-01-03 12:38:33 +01:00
JosJuice b3b7aef09a Android: Extract Sys to a different folder than the User folder 2017-12-26 09:53:32 +01:00
Ryan Meredith 1f226ec14f Update Readme.md and various fixes 2017-12-20 10:54:51 +01: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
Léo Lam 653977cec7 UICommon: Fix unsafe usage of optparse::Values::all
The const-qualified all() member method triggers undefined behaviour
if the option passed to it is not set.
2017-11-26 18:18:49 +01:00
Léo Lam 60afb1d1b4 WX: Fix argument parsing
Manually convert each argument to a UTF-8 std::string, because the
implicit conversion for wxCmdLineArgsArray to char** calls ToAscii
(which is obviously undesired).

Fixes https://bugs.dolphin-emu.org/issues/10274
2017-11-26 18:18:48 +01: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 f3b52c07d7 CommandLineParser: Use ConfigLocation 2017-11-15 18:04:40 +00:00
Léo Lam 4b4a9a6486 UI: Implement a command line option to boot NAND title 2017-10-24 11:41:55 +02:00
Ryan Meredith f8b89b7b1a Update -d argument help message 2017-09-10 12:28:53 +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
Jonathan Hamilton d2d355bb50 Buildfix for X11 where HAVE_XRANDR is disabled
The "X.h" header *just* contains protocol constants, not functions or
typedefs - so stuff like "Display" and "Window" are not defined unless
you include "Xlib.h".

"Xrandr.h" happens to include "Xlib.h" itself, so enabling xrandr
effectively worked around this issue.
2017-09-09 11:49:20 -07:00
Léo Lam f5fd183571 Config: Fix the loader Load() being called twice
The Config::AddLoadLayer functions call Load on the layer
explicitly, but Load is already called in the constructor,
so they'd cause the loader's Load function to be called twice,
which is potentially expensive considering we have to read an INI
from the host filesystem.

This commit removes the Config::AddLoadLayer functions because
they don't appear to be necessary.
2017-07-31 22:32:05 +08:00
Michael Maltese 28d6c61e34 LogManager: use layered config 2017-07-09 16:28:54 -07:00
spycrab 4d37190327 Make Visual Studio happy 2017-06-28 20:42:01 +02:00
spycrab 7c97c14eba UICommon: Move Wx Graphics Settings functions 2017-06-28 20:13:37 +02:00
Léo Lam 0c7b9570b4 Move WiiUtils to Core
Allows reusing the WAD import logic more easily, whereas UICommon
code can only be used from UICommon and UI.

And managing what's on the NAND is the Core's responsability, not UI.
2017-06-28 11:22:10 +02:00
spycrab 2de31317e9 UICommon: Move TriggerSTMPowerEvent() from Wx 2017-06-26 16:28:39 +02:00
Léo Lam 6503a9f538 Allow the user to ignore signature issues during WAD import
Improves usability with signature checks.
2017-06-16 16:17:38 +02:00
Léo Lam 8a49e1f7db IOS/ES: Verify containers in ImportTitleInit 2017-06-16 16:17:37 +02:00
Léo Lam 719af1aff4 IOS/ES: Verify containers in ImportTicket 2017-06-16 16:17:37 +02:00
Léo Lam 6c3069be97 IOS/ESFormats: Use SignedBlobReader for TMDs and tickets 2017-06-14 22:45:29 +02: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 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
Shawn Hoffman 7431dd3dce msbuild: make Externals inclusion methods uniform 2017-06-03 18:20:41 -07:00
Shawn Hoffman a6c102ba5c msbuild: remove extra zlib include from UICommon 2017-06-03 18:20:41 -07:00