Commit graph

4324 commits

Author SHA1 Message Date
Lioncash
c6200a5b07 JitInterface: Convert includes into forward declarations where applicable 2017-03-02 13:20:29 -05:00
Markus Wick
7982ba120f Merge pull request #4995 from lioncash/normalize
CMakeLists: Normalize whitespace
2017-03-02 11:51:06 +01:00
Lioncash
ee61bd6f2e CMakeLists: Normalize whitespace
Normalizes tabs to spaces to follow our codebase's indentation style.
2017-03-01 14:53:23 -05:00
Lioncash
d104e5e916 ExpressionParser: Convert parse state enum into an enum class 2017-02-28 05:07:21 -05:00
Anthony
63c5230d9b Merge pull request #4959 from lioncash/ini
IniFile: Handle s64/u64 values
2017-02-27 10:02:53 -08:00
Anthony
0cac00a39c Merge pull request #4977 from ligfx/fixwxmainmenubar
DolphinWX: don't refresh MainMenuBar on construction
2017-02-27 09:42:01 -08:00
Matthew Parlane
48aeb5bf4b Merge pull request #4896 from leoetlino/esformats
Use ESFormats for tickets, TMDs and views
2017-02-27 16:15:05 +13:00
Michael Maltese
720f0ab93f DolphinWX: don't refresh MainMenuBar on construction
On startup, wxWidgets pops up an assertion error:

> ./src/osx/menu_osx.cpp(648): assert ""IsAttached()"" failed in
> Refresh(): can't refresh unatteched menubar
2017-02-26 17:50:36 -08:00
Michael Maltese
a3e3986906 DolphinWX: provide empty OnCmdLineParsed
Starting in #4916, upon startup wxWidgets pops up an assertion error:

> ./src/common/cmdline.cpp(527): assert ""Assert failure"" failed in
> FindOptionByAnyName(): Unknown option verbose

Fix this by overriding wxApp::OnCmdLineParsed to disable the default
handling (since we also disable the default options in
DolphinApp::OnInitCmdLine).
2017-02-26 17:38:18 -08:00
Anthony
832e0501db Merge pull request #4960 from lioncash/type
ControlGroup: Convert group type enum into an enum class
2017-02-26 15:56:34 -08:00
Anthony
06428c3f14 Merge pull request #4916 from leoetlino/cpp-optparse
Use cpp-optparse for command line parsing
2017-02-26 15:51:35 -08:00
Léo Lam
c1a139e8ac Use ESFormats for TMDs
We already have a TMDReader, so let's actually use it.

And move ESFormats to IOS::ES, since it's definitely part of IOS.
This adds a DiscIO dependency on Core which will be fixed in a
follow-up PR.
2017-02-26 19:46:29 +01:00
Léo Lam
bf1f70db0a Move the ticket code to ESFormats
This moves some parsing code for tickets and ticket views to ESFormats
instead of duplicating it over DiscIO and Core.
2017-02-26 19:46:28 +01:00
Lioncash
26f17a1723 ControlGroup: Convert group type enum into an enum class
Gets some constants out of the ControllerEmu namespace, and modifies
ControlGroup so that it uses the enum type itself to represent the
underlying type, rather than a u32 value.
2017-02-25 01:15:04 -05:00
Lioncash
beec40f178 IniFile: Handle s64/u64 values 2017-02-25 00:03:20 -05:00
Léo Lam
6702e547cb Fix the build on Linux when not using WX from Externals
No idea why we were including a Windows specific header *without* a
ifdef.
2017-02-24 18:48:26 +01:00
Anthony
27a5e33b92 Merge pull request #4877 from ligfx/forward_declare_xlib
Remove include X11/Xlib.h from X11Utils.h
2017-02-23 13:17:37 -08:00
Anthony
ecb7d01347 Merge pull request #4889 from ligfx/netwindow
NetWindow: explicitly tell wxWidgets to clean up Windows macros
2017-02-23 13:16:59 -08:00
Anthony
e9850382e3 Merge pull request #4930 from JosJuice/sideways-wiimote-name
Change INI keys containing "Wii Remote" back to "Wiimote"
2017-02-23 13:13:43 -08:00
Anthony
f7a09c41a1 Merge pull request #4941 from JosJuice/no-compressed-color
DolphinWX: Don't use a special color for compressed games
2017-02-23 07:17:48 -08:00
Lioncash
70d336d2a9 DolphinWX: Eliminate direct usage of the JIT global
Instead, the JitInterface namespace functions should be used instead. This
gets rid of all usages of the JIT global from the wxWidgets UI code.

The null check isn't needed as the JIT core would already need to be
initialized in order to be within a paused state. The null check is just a
remnant from 2011 that existed before the check for a paused state was
added.
2017-02-21 16:15:47 -05:00
JosJuice
a7e11db4bf DolphinWX: Remove usage of IsCompressed() in compression code
What we actually care about is whether it's a GCZ file,
not whether it's compressed. (This commit doesn't change
the behavior, since the beginning of CompressSelection
discards items that aren't BlobType::GCZ or BlobType::PLAIN.)
2017-02-20 16:08:07 +01:00
JosJuice
b1589a6337 DolphinWX: Don't use a special color for compressed games
- There's no clear definition of what it means for a GC/Wii game
  to be compressed. GC games in GCZ are obviously compressed,
  but what about formats like WBFS and CISO that just discard data?
- Hardcoded colors might have bad contrast with the used theme.
- It feels Windows XP to me.
2017-02-20 16:02:30 +01:00
JosJuice
f5c82adc59 Change INI keys containing "Wii Remote" back to "Wiimote"
4bd5674 changed "Wiimote" to "Wii Remote" in the GUI
(intentionally) but also did the same change for two INI
keys (seemingly unintentional, breaks backwards compatibility,
and is inconsistent with the INI's filename). This commit
reverts the INI keys but not the GUI strings.

This commit uses the same approach as cbd539e used for GameCube
sticks (but I made sure to avoid the bug that 56531a0 fixed).
2017-02-18 12:59:36 +01:00
Chris Burgener
8bfe2671b2 Remove IsReadOnly check when stop recording 2017-02-17 23:23:42 -05:00
Ryan Houdek
c2d5fe3ec9 Move DolphinWX over to command command line parsing. 2017-02-16 17:24:59 +01:00
Ryan Houdek
36a9479c17 Change NoGUI over to using common command line parsing 2017-02-16 17:24:58 +01:00
Ryan Houdek
f61363a791 Add command line parsing to UICommon. 2017-02-16 17:24:58 +01:00
Ryan Houdek
77c7fa836f Add the cpp-optparse project to Externals.
From https://github.com/weisslj/cpp-argparse
2017-02-16 14:09:13 +01:00
Phil Christensen
34b0b1b9d6 wxWidgets expects non-const
revert my previous change to these files and instead create a named temporary.
2017-02-15 21:20:29 -08:00
Phil Christensen
2ed61b0ee1 C++ conformance fixes (MSVC /permissive-)
We (the Microsoft C++ team) use the dolphin project as part of our "Real world code" tests.
I noticed a few issues in windows specific code when building dolphin with the MSVC compiler
in its conformance mode (/permissive-).  For more information on /permissive- see our blog
https://blogs.msdn.microsoft.com/vcblog/2016/11/16/permissive-switch/.

These changes are to address 3 different types of issues:

1) Use of qualified names in member declarations

    struct A {
        void A::f() { } // error C4596: illegal qualified name in member declaration
                        // remove redundant 'A::' to fix
    };

2) Binding a non-const reference to a temporary

    struct S{};
  
    // If arg is in 'in' parameter, then it should be made const.
    void func(S& arg){}
  
    int main() {
      //error C2664: 'void func(S &)': cannot convert argument 1 from 'S' to 'S &'
      //note: A non-const reference may only be bound to an lvalue
      func( S() );
   
      //Work around this by creating a local, and using it to call the function
      S s;
      func( s );
    }

3) Add missing #include <intrin.h>

Because of the workaround you are using in the code you will need to include
this.  This is because of changes in the libraries and not /permissive-
2017-02-15 20:37:04 -08:00
Michael Maltese
88f7056a41 Remove include Xlib.h from X11Utils.h 2017-02-15 16:49:21 -08:00
Anthony
f966354044 Merge pull request #4898 from RisingFog/stop_recording_dtm
Add Stop Play/Recording Input Menu
2017-02-13 14:10:23 -08:00
Mat M
f68955502a Merge pull request #4905 from JosJuice/rename-copy-wii-save
Rename "Copy Wii Save" to "Load Wii Save"
2017-02-13 09:55:54 -05:00
JosJuice
fc798ca410 Rename "Copy Wii Save" to "Load Wii Save"
That netplay uses a separate NAND isn't obvious,
so what "copy" means might not be clear.
2017-02-12 18:40:54 +01:00
Mat M
da5683cf27 Merge pull request #4880 from ligfx/windowsmanifest
Use .manifest file for apps on Windows
2017-02-12 08:44:38 -05:00
Chris Burgener
28c9f2a44d Add Stop Play/Recording Input Menu 2017-02-11 19:59:19 -05:00
Michael Maltese
2b65e41d97 NetWindow: explicitly tell wxWidgets to clean up Windows macros
wxWidgets headers don't play well with some of the macros defined in
Windows headers and perform their own magic to fix things, as long as
they're included entirely either before or after any Windows headers.

This file can cause a conflict in other DolphinWX files because NetPlay
headers directly include ENet headers, which leak Windows header macros.
To fix this, explicitly tell wxWidgets here that it needs to re-clean
macros.
2017-02-10 16:14:25 -08:00
Michael Maltese
715170759c Use .manifest file for apps on Windows
Works with CMake, and also adds DPI awareness to DolphinQt2 (which
wasn't enabled before).
2017-02-10 14:18:45 -08:00
Mat M
f6d364e37b Merge pull request #4873 from lioncash/controller-emu
ControllerEmu: Separate ControlGroup from ControllerEmu
2017-02-10 13:50:33 -05:00
Anthony
96e83b5d54 Merge pull request #4764 from aldelaro5/crash-fix-inputconfig
InputConfigDialog pass the device_cbox to the wiimote extension dialogs
2017-02-09 21:50:44 -08:00
Lioncash
6a75ea5653 ControllerEmu: Separate ControlGroup from ControllerEmu
ControllerEmu, the class, is essentially acting like a namespace for
ControlGroup. This makes it impossible to forward declare any of the
internals. It also globs a bunch of classes together which is kind of a
pain to manage.

This splits ControlGroup and the classes it contains into their own source
files and situates them all within a namespace, which gets them out of
global scope.

Since this allows forward declarations for the once-internal classes, it
now requires significantly less files to be rebuilt if anything is changed
in the ControllerEmu portion of code.

It does not split out the settings classes yet, however, as it
would be preferable to make a settings base class that all settings derive
from, but this would be a functional change -- this commit only intends to
move around existing code. Extracting the settings class will be done in
another commit.
2017-02-09 18:18:52 -05:00
Lioncash
ea6e75d45f GameListCtrl: Separate some scanning code into functions
Several of the things done while performing a scan are logically their own
behavior (e.g. loading a titles file, checking if an entry should be added, etc).
2017-02-09 14:50:20 -05:00
Mat M
73382852b7 Merge pull request #4502 from ligfx/extractcontrolreference
InputCommon: Extract ControlReference from ControllerInterface
2017-02-08 20:01:18 -05:00
Léo Lam
4662e25cbb DolphinWX: Fix overclock slider clock display 2017-02-08 15:07:34 +01:00
Léo Lam
fd49a1b2d5 Get rid of GetUsbPointer for emulated Bluetooth
It held a raw pointer to a IOS::HLE::Device::BluetoothEmu that is not
guaranteed to exist (and of course, nothing checked that it wasn't
nullptr), but what is more, it's totally unnecessary because we have
IOS::HLE::GetDeviceByName().

Since we cannot always inform the host that Wii remotes are
disconnected from ES, that is now done in BluetoothEmu's destructor.
2017-02-08 15:07:33 +01:00
Michael Maltese
492d5b6ac7 ControlReference: hide parse_error behind GetParseStatus() 2017-02-07 22:59:26 -08:00
Michael Maltese
9a632ea7b9 ControlReference: hide is_input behind function 2017-02-07 22:59:21 -08:00
Michael Maltese
a509f56116 InputCommon: Extract ControlReference from ControllerInterface
Better separation of concerns. Relegates `ControllerInterface` to
enumerating input controls, and the new `ControlReference` deals with
combining inputs and configuration expression parsing.
2017-02-07 22:59:10 -08:00
Matthew Parlane
e2706b4381 Merge pull request #4860 from lioncash/lock
FifoPlayerDlg: Use std::lock_guard instead of manual mutex locking/unlocking
2017-02-08 18:59:28 +13:00