Commit Graph

4730 Commits

Author SHA1 Message Date
Léo Lam 23ae756192 WX: Automatically pause the core for the JIT menu items
Removes the need to manually pause the core, select the menu item and
then unpause.
2017-07-31 17:31:26 +08:00
Léo Lam f777c01c5d WX/Debugger: Clean up event handling
Boot to Pause and Automatic Start are not JIT or CPU menu items,
so they are supposed to be handled by OnCPUMode.
2017-07-31 17:31:26 +08:00
Leo Lam c11172497f Merge pull request #5840 from leoetlino/wx-focus-fix
WX: Fix 'renderer has focus' returning false after start
2017-07-31 16:43:53 +08:00
Lioncash f6c21e002b General: Remove unnecessary semicolons 2017-07-30 16:39:53 -04:00
Léo Lam f0aa454662 WX: Fix 'renderer has focus' returning false after start
The main window was already active, so the activate event was never
emitted, and m_renderer_has_focus was never changed.
2017-07-30 17:48:54 +08:00
Stenzek 901bf9c257 VideoConfig: Add config options for ubershaders 2017-07-30 17:43:59 +10:00
Stenzek 1fccbd5be3 DolphinWX: Add a progress dialog host command
Allows feedback from backends to be communicated to the user when
long-running operation are performed (e.g. shader compilation).
2017-07-30 12:38:48 +10:00
Leo Lam 7a51b0bcec Merge pull request #5807 from leoetlino/connect-wiimote
Move the Wiimote connect code out of Host
2017-07-27 15:02:28 +08:00
JosJuice 960525859b Make DolphinWX strings more like DolphinQt2 strings
Same as the previous commit, except I'm copying strings
in the other direction because the DolphinWX variants
of these strings could use some improvement.
2017-07-26 08:04:10 +02:00
JosJuice d7d88aeb7d DolphinWX: Mark AF choices as translatable
For consistency with DolphinQt2.
2017-07-26 08:00:17 +02:00
Léo Lam ee868e2362 Move the Wiimote connect code out of Host
I don't know who thought it would be a good idea to put the Wiimote
connect code as part of the Host interface, and have that called
from both the UI code and the core. And then hack around it by having
"force connect" events whenever Host_ConnectWiimote is called
from the core...
2017-07-23 15:47:32 +08:00
Leo Lam 673210afea Merge pull request #5814 from ligfx/macremovecfbundlelocalizations
Remove CFBundleLocalizations from Info.plist
2017-07-23 14:48:38 +08:00
Leo Lam 2c35983126 Merge pull request #5787 from ligfx/wxsortfallbacktotitle
Wx: make GameListCtrl fallback to sorting by title
2017-07-23 14:47:31 +08:00
Michael Maltese 03f26ec5b3 Remove CFBundleLocalizations from Info.plist
It's only needed for apps that don't use .lproj folders.
2017-07-22 23:15:14 -07:00
Leo Lam efd318df64 Merge pull request #5791 from leoetlino/wiimote-indicator
Remove Wii Remote connection status from status bar
2017-07-22 22:03:25 +08:00
Léo Lam f106a9637d Replace balanced Core::PauseAndLock calls with RunAsCPUThread
Core::PauseAndLock requires all calls to it to be balanced, like this:

    const bool was_unpaused = Core::PauseAndLock(true);
    // do stuff on the CPU thread
    Core::PauseAndLock(false, was_unpaused);

Aside from being a bit cumbersome, it turns out all callers really
don't need to know about was_unpaused at all. They just need to do
something on the CPU thread safely, including locking/unlocking.

So this commit replaces Core::PauseAndLock with a function that
makes both the purpose and the scope of what is being run on the
CPU thread visually clear. This makes it harder to accidentally run
something on the wrong thread, or forget the second call to
PauseAndLock to unpause, or forget that it needs to be passed
was_unpaused at the end.

We also don't need comments to indicate code X is being run on the
CPU thread anymore, as the function name makes it obvious.
2017-07-21 16:45:59 +08:00
Léo Lam 91f8283a1d Remove Wii Remote connection status from status bar
Showing the Wii remote connection status leads to inconsistent UX,
because we don't do anything like that for GameCube controllers
or with Bluetooth passthrough.

It's also questionable how useful it is given that:

* it doesn't print the number of connected remotes, just that one
  remote is connected, connecting or not connected, so the only info
  it provides is actually wrong when using multiple remotes;

* this user-facing feature is actually broken in master and no one has
  complained AFAIK, which means people don't really rely on it;

* the status bar isn't visible most of the time unless the user is
  using render to main or deliberately keeping the main window's
  status bar visible by moving the render window and they're not too
  far away from their screen;

* emulated Wii remotes now reconnect on input, which means that there
  is less of a need to actually know at all times whether a remote
  is connected, since pressing any button will reconnect it and provide
  immediate, visible feedback via OSD messages and the Wii remote
  pointer appearing.
2017-07-15 13:01:56 +08:00
Andrew 3095f585dd Hide mouse cursor after delay in DolphinWX 2017-07-14 22:28:52 -04:00
Michael Maltese 41917cb43c Wx: make GameListCtrl fallback to sorting by title
Fixes an issue with game items moving around randomly when resorted.
2017-07-14 15:29:48 -07:00
Leo Lam 460b81ac06 Merge pull request #5778 from ligfx/fixinputbitmaps
DolphinWX: fix input bitmaps not working when background input is off
2017-07-14 13:08:13 +08:00
Michael Maltese 0019c34c73 DolphinWX: fix input bitmaps not working when background input is off 2017-07-12 00:12:07 -07:00
JosJuice d4f5038571 Unify GetGameIniFilenames
This deduplicates code and fixes the new config system's lack of
1-char game ID INI support.
2017-07-11 13:10:11 +02:00
Leo Lam b6c3479bb4 Merge pull request #5720 from JosJuice/file-metadata
FileUtil: Redesign Exists/IsDirectory/GetSize
2017-07-11 00:28:34 +02:00
Leo Lam 12f6d0b56b Merge pull request #5773 from JosJuice/builtin-titledatabase-optional
Make the built-in wiitdb files optional
2017-07-11 00:20:09 +02:00
JosJuice 1d7a57869a Make the built-in wiitdb files optional
There are some cases where overriding the opening.bnr names
isn't desirable, such as when someone has several modded
versions of a game that differ in names but not game IDs.
2017-07-10 10:16:06 +02:00
Michael Maltese 06f1761f9f LogWindow: don't unconfigure logger on destruction
This was causing Dolphin to always save "WriteToWindow = False". Instead
of disabling logging to the window (a config value), tell LogManager
that there's no window to log to (a runtime state).
2017-07-09 18:50:55 -07:00
Michael Maltese ff83b13344 LogConfigWindow: fix verbosity 2017-07-09 18:50:55 -07:00
Leo Lam e6c1b04b69 Merge pull request #5764 from ligfx/cleanuplogmanager
LogManager: clean ups and encapsulate config file management
2017-07-09 16:18:49 +02:00
Michael Maltese 13721d35e7 DolphinWX: remove INI logic from LogConfigWindow 2017-07-07 16:44:38 -07:00
Michael Maltese c9e8289e82 LogManager: add SaveSettings 2017-07-07 16:44:38 -07:00
Michael Maltese 18da6dee8e LogManager: remove per-container listeners 2017-07-07 16:44:38 -07:00
Michael Maltese 546fa628fb LogManager: remove per-container verbosities 2017-07-07 16:44:38 -07:00
Niels Boehm ee9fb47c53 Fix date and time handling for custom RTC in WX.
The actual problem was combining the values from the date and time
pickers incorrectly. The uninteresting parts of the returned wxDateTime
need to be ignored and the WX documentation says so for the time picker.

I also cleaned up the handling of both widgets a bit, removing redundant
member variables in the process, in order to not risk correctness.
2017-07-07 17:12:05 +02:00
Jules Blok 383645a4b1 VideoConfigDiag: Rename Quad-Buffer to HDMI 3D.
This 3D mode is often associated with the HDMI 1.4a standard,
so this name is more helpful to users with such a setup.
2017-07-05 22:43:39 +02:00
Jules Blok 179602e921 D3D: Add quad-buffer stereoscopy support. 2017-07-05 22:43:39 +02:00
Leo Lam e0b94b55b8 Merge pull request #5651 from JosJuice/new-disc-extraction
Use new format for disc extraction
2017-07-04 13:46:18 +02:00
JosJuice 0588a76830 DolphinWX: Fix inconsistent region name for online system update
This was inconsistent with the other three regions
and with DolphinQt2.
2017-07-01 16:40:07 +02:00
JosJuice 5ca3aee00a FileUtil: Add a class for Exists/IsDirectory/GetSize
Some code was calling more than one of these functions in a row
(in particular, FileUtil.cpp itself did it a lot...), which is
a waste since it's possible to call stat a single time and then
read all three values from the stat struct. This commit adds a
File::FileInfo class that calls stat once on construction and
then lets Exists/IsDirectory/GetSize be executed very quickly.

The performance improvement mostly matters for functions that
can be handling a lot of files, such as File::ScanDirectoryTree.

I've also done some cleanup in code that uses these functions.
For instance, some code had checks like !Exists() || !IsDirectory(),
which is functionally equivalent to !IsDirectory(), and some
code was using File::GetSize even though there was an IOFile
object that the code could call GetSize on.
2017-06-29 19:07:29 +02:00
Niels Boehm 68198d6c32 Make one log font monospaced for all platforms.
The MonoSpaceFont of the LogWindow was using a Windows native way to
specify a font name.

Now it's using wxFONTFAMILY_TELETYPE.

On Win32 it will additionally request the specific font name "Consolas",
so it doesn't use ugly "Courier New". I pilfered that specialization
from Source/Core/DolphinWX/Cheats/ARCodeAddEdit.cpp.
2017-06-29 07:05:15 +02:00
JosJuice a59edfe8cf FilesystemPanel: Put partitions in separate folders when extracting all partitions 2017-06-28 22:25:27 +02:00
JosJuice 1b6506f4e8 DiscExtractor: Add support for more things to extract 2017-06-28 22:24:33 +02:00
JosJuice 94b18bfb07 FilesystemPanel: Replace Extract Apploader/DOL with Extract System Data
Because having one option for each thing to extract is
going to be way too many options once I add support for
more things to extract.
2017-06-28 22:23:10 +02:00
JosJuice 0b068d84d5 FilesystemPanel: Overhaul the right-click menu 2017-06-28 22:23:01 +02:00
JosJuice 2ca5f1dec8 FilesystemPanel: Handle root correctly in BuildFilePathFromSelection
This was unnecessary in the past but is necessary
for the next commit.
2017-06-28 22:22:50 +02:00
JosJuice 39ff203c1e DiscExtractor: Don't create extra folders when extracting a folder
Before, if you extracted a directory like /map/Final/Release/,
Dolphin would create the nested folders map, Final and Release
in the output directory and put the files in Release instead of
just putting the files directly in the output directory.
2017-06-28 22:22:41 +02:00
JosJuice 6d51992648 Move ExtractDir from FilesystemPanel to DiscExtractor 2017-06-28 22:22:31 +02:00
JosJuice 5778e8bdba FilesystemPanel: Refactor partition name stripping 2017-06-28 22:22:22 +02:00
JosJuice baf3a3b188 DiscExtractor: Don't hardcode names in ExportApploader and ExportDOL 2017-06-28 22:22:13 +02:00
JosJuice d06b532150 DiscIO: Move parts of Filesystem to the new file DiscExtractor 2017-06-28 22:21:23 +02:00
JosJuice 23bb029250 DiscIO: Add convenience methods IsDisc and IsWii for Platform enum 2017-06-28 21:46:43 +02:00
spycrab 7c97c14eba UICommon: Move Wx Graphics Settings functions 2017-06-28 20:13:37 +02:00
Léo Lam f06367febc WX: Add menu item to perform online update 2017-06-28 11:22:10 +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
shuffle2 951f6400fb Merge pull request #5706 from JosJuice/more-gamelist-speedup-followup
More follow-up for the gamelist speedup PR
2017-06-27 12:36:16 -07:00
JosJuice caf6087766 GameListItem: Rename m_banner to m_volume_banner
I want to clarify that it isn't used for PNG banners.
2017-06-27 21:31:37 +02:00
JosJuice 89716025da GameListItem: Reduce levels of indentation 2017-06-27 21:29:56 +02:00
shuffle2 2579a7c03d Merge pull request #5607 from leoetlino/logging-fix
Logging fixes
2017-06-27 11:40:26 -07:00
LAGonauta 8fd1af6783 Changed OpenAL latency setting to really reflect how much time it is.
Before these changes each value of latency were actually 5ms, with a
minimum latency of ~10 ms. If it was set to 4 ms on the UI, the actual
latency was 10 + 5 * 4 = 30 ms.
Now 30 ms on the UI means 30 ms on the backend.
2017-06-27 06:54:28 -03:00
JosJuice b9499441ee GameListItem: Fix comment about PNG banners for volumes
f16599f quietly dropped the ability to set custom banners for volumes.
2017-06-27 11:30:27 +02:00
JosJuice 691b676145 GameListItem: Fix minor naming style violation 2017-06-27 11:28:55 +02:00
JosJuice e73de25a9e GameListCtrl: Put CACHE_REVISION in .cpp file
Reduces the number of files that have to be recompiled
when changing the cache revision.
2017-06-27 11:27:36 +02:00
shuffle2 540ee18966 Merge pull request #5699 from JosJuice/wx-custom-titles
DolphinWX: Sync custom title changes on game list rescan
2017-06-27 01:48:22 -07:00
JosJuice 7d801d61dc DolphinWX: Use std::move when committing in GameListItem 2017-06-27 10:21:33 +02:00
Michael Maltese 8e849b1595 Remove OpenAL DLL from Externals 2017-06-27 00:06:14 -07:00
JosJuice 0ac1562fbd DolphinWX: Load EmuState and custom name for actual discs 2017-06-27 08:29:57 +02:00
JosJuice d5bf6f1bbc DolphinWX: Sync custom title changes on game list rescan 2017-06-27 08:29:48 +02:00
Leo Lam aa020040f6 Merge pull request #5681 from spycrab/qt_safeshutdown
Qt: Implement safe shutdown
2017-06-26 21:55:27 +02:00
shuffle2 7d60f03acb Merge pull request #5687 from shuffle2/wx-cache
DolphinWX: properly sync EmuState and banner changes.
2017-06-26 12:40:40 -07:00
Shawn Hoffman f51df62344 DolphinWX: properly sync EmuState and banner changes. 2017-06-26 12:35:40 -07:00
spycrab 2de31317e9 UICommon: Move TriggerSTMPowerEvent() from Wx 2017-06-26 16:28:39 +02:00
Léo Lam 60c6fbe9cc Add CommonTitles.h for common Wii title IDs 2017-06-26 15:17:55 +02:00
JosJuice b440dbd998 FileSystemGCWii: Use case insensitive comparison in FindFileInfo
This was a regression in f49b64c. Some games seem to name the
banner file OPENING.BNR instead of opening.bnr.

Should fix https://bugs.dolphin-emu.org/issues/10354
2017-06-24 14:06:31 +02:00
Tillmann Karras c8255092d7 Fix warnings 2017-06-24 01:41:58 +01:00
Shawn Hoffman a66b747366 DolphinWX: show simple message about scanning in statusbar. 2017-06-23 17:25:53 -07:00
Shawn Hoffman c5fa470ad8 replace DoFileSearch with optimized version 2017-06-23 17:25:53 -07:00
Shawn Hoffman f16599f4a8 DolphinWX: defer gamelist scanning and switch to single-file cache. 2017-06-23 17:25:53 -07:00
Shawn Hoffman 79961b6f76 GameListCtrl: minor cleanup 2017-06-23 17:25:53 -07:00
Shawn Hoffman 668c6b5ce9 DolphinWX: rename CGameListCtrl -> GameListCtrl 2017-06-23 17:25:52 -07:00
JosJuice 7ebd324fe7 Don't enable Boot to Pause by default in the debugger
This behavior is useful sometimes, but it's not always useful,
and it can be rather confusing if you're not aware of it.
2017-06-23 16:05:27 +02:00
Léo Lam 9d70b894bf WX: Use std::future for checking disc integrity
Simpler, and puts the call to CheckIntegrity right where it should be,
instead of being hidden somewhere in a thread class.

This also makes it more obvious what we're getting from the async task.

Oh, and coincidentally, this fixes a random crash that could occur
during the check. I'm not sure why.
2017-06-21 11:08:07 +02:00
Léo Lam a2ad3e14d0 Logging: Remove duplicated code 2017-06-17 10:20:30 +02:00
Léo Lam 100c433261 Logging: Move verbosity setting code to LogManager
No clue why it was in DolphinWX.
2017-06-17 10:20:30 +02:00
JosJuice 4bee7b7605 DolphinWX: Fix encoding errors in UpdateTitle
An implicit conversion from std::string to wxString
was to blame, as usual. Fixes issue 10341.
2017-06-16 17:20:13 +02: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
Leo Lam 09c0a3caaf Merge pull request #2820 from JosJuice/filesystem
Filesystem redesign and performance improvements
2017-06-15 21:24:42 +02:00
JosJuice 87916fe099 Filesystem: Replace GetFileList()
Instead of expecting callers to know how the size of directory file infos
relates to which files are in which directories, filesystems now offer a
GetRoot() method, and file infos offer a way to get their children. As
a bonus, m_FileInfoVector no longer has to be created and kept around
in RAM. Only the file info objects that actually are used are created.
2017-06-14 15:23:48 +02:00
Leo Lam 40a9e585a7 Merge pull request #5604 from sepalani/wx-rm-path
PathConfigPane: Prevent an invalid index assert
2017-06-14 13:30:15 +02:00
Sepalani 2a349f8e49 PathConfigPane: Prevent an invalid index assert 2017-06-14 12:07:25 +01:00
JosJuice 7c45afecb2 Filesystem: Use file info in arguments instead of path
Some callers already have the file info, making the relatively slow
FindFileInfo calls unnecessary. Callers that didn't have the file info
will now need to call FindFileInfo on their own.
2017-06-13 22:40:57 +02:00
JosJuice 07d3a39aeb Filesystem: Replace file info's full path with name
Some callers (i.e. ISOProperties) don't want the full path, so giving them
it is unnecessary. Those that do want it can use GetPathFromFSTOffset.
Not storing full paths everywhere also saves a small bit of RAM and is
necessary for a later commit. The code isn't especially pretty right now
(callers need to use FST offsets...) but it'll become better later.
2017-06-13 22:38:31 +02:00
JosJuice 5021b4a567 Filesystem: Replace FileInfo struct with interface
GC/Wii filesystem internals shouldn't be exposed to other classes.
This change isn't especially useful by itself, but it opens up the
way for some neat stuff in the following commits.
2017-06-13 22:37:43 +02:00
Sepalani b7dde796fa Silent GameList PNG warnings 2017-06-12 22:19:58 +01:00
Léo Lam 17ef4c8046 StringUtil: Make SplitString return by value
Simpler usage.
2017-06-11 16:48:20 +02:00
MerryMage 12e9ce47f6 VideoConfigDiag: Refresh VideoConfig before opening configuration dialog
If the video configuration dialog is opened before a game was run, VideoConfig::Refresh was never called.
2017-06-10 16:40:10 +01:00
JosJuice 025884b688 FilesystemPanel: Expand game partition rather than second partition
The game partition is normally the second partition, but not
if the disc has been scrubbed to only contain one partition.
2017-06-09 18:04:58 +02:00
Shawn Hoffman 5480efdff2 video: change multisample/AA setting to u32 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 f730b775b6 quiet warnings about possibly-uninitialized variable usage 2017-06-07 19:52:07 -07:00