Commit graph

107 commits

Author SHA1 Message Date
Léo Lam
8e0ea92ec3
Merge pull request #7058 from JosJuice/move-titledatabase-usage
Don't store custom names from TitleDatabase in GameFileCache
2018-06-04 14:59:05 +02:00
JosJuice
85e94cc510 Don't store custom names from TitleDatabase in GameFileCache
This saves us from having to update the GameFileCache when the
TitleDatabase changes (for instance when the user changes language).
2018-06-04 07:45:22 +02:00
Léo Lam
fc0193c4b1 Move Config ValueToString to StringUtil
An identical implementation is used by IniFile, so move those functions
to StringUtil. A future commit will modify IniFile to use them.
2018-06-03 14:10:52 +02:00
JosJuice
533a49460a GameFile: Include necessary DiscIO headers 2018-06-01 14:19:16 +02:00
lcsondes
7a13bdbdfb UICommon: fix m_cached_files pruning (partial revert of 68152faf43)
vector::pop_back invalidates all iterators
2018-05-27 22:15:16 +01:00
JosJuice
fd651cf5e6 GameFileCache: Fix a comment mistake 2018-05-26 20:21:22 +02:00
JosJuice
68152faf43 DolphinQt2: Show cached games before checking whether they exist on disk
DolphinWX already has this improvement in startup time, and it matters
a lot when you have a large game list.
2018-05-26 20:21:17 +02:00
Léo Lam
c99ac40700 Port FS, SD and dump path to onion config
This ports the Wii filesystem root, Wii SD card path and dump path
settings to the new config system (OnionConfig).

My initial plan was to wait until DolphinWX was removed before porting
most of the Main (Core, DSP, General) settings to onion config, but
I've decided to submit a small part of those changes to fix
[issue 10566](https://bugs.dolphin-emu.org/issues/10566).

Removes the need to manually set the FileUtil path in the UI frontends
and gets rid of some more members that don't really belong in SConfig.

Also fixes a bug which would cause the dump path not to get created
after change.
2018-05-23 16:07:18 +02:00
JosJuice
cc42b4354d Reimplement custom PNG banners in game list
Fixes https://bugs.dolphin-emu.org/issues/10938
and makes PNG banners available in DolphinQt2 for the first time.
2018-05-20 15:34:03 +02:00
Léo Lam
94dc746351 Copy Wii NAND data to user NAND in WiiRoot
Dolphin doesn't use any of the WC24 files, so this can be done when
actually starting emulation in WiiRoot. The benefit of moving the
copy is that we don't need to handle temporary NANDs in a special way.
2018-05-12 17:08:50 +02:00
spycrab
0170052f5d Qt: Allow custom stylesheets 2018-05-08 15:07:50 +02:00
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