Commit Graph

69 Commits

Author SHA1 Message Date
Lioncash 6f473b96d0 PowerPC: Convert CPUCore enum into an enum class
Makes the enum values strongly-typed and prevents the identifiers from
polluting the PowerPC namespace. This also cleans up the parameters of
some functions where we were accepting an ambiguous int type and
expecting the correct values to be passed in.

Now those parameters accept a PowerPC::CPUCore type only, making it
immediately obvious which values should be passed in. It also turns out
we were storing these core types into other structures as plain ints,
which have also been corrected.

As this type is used directly with the configuration code, we need to
provide our own overloaded insertion (<<) and extraction (>>) operators
in order to make it compatible with it. These are fairly trivial to
implement, so there's no issue here.

A minor adjustment to TryParse() was required, as our generic function
was doing the following:

N tmp = 0;

which is problematic, as custom types may not be able to have that
assignment performed (e.g. strongly-typed enums), so we change this to:

N tmp;

which is sufficient, as the value is attempted to be initialized
immediately under that statement.
2018-06-15 10:27:59 -04:00
JosJuice 1c027bc148 Use UICommon's game list code on Android
Deduplicates code, and gets rid of some problems the old code had
(such as: bad performance when calling native functions, only one
disc showing up for multi-disc games, Wii banners being low-res,
unnecessarily much effort being needed for adding more metadata).
2018-06-06 17:34:07 +02:00
JosJuice 2062768bb2 Don't include the Themes directory in Android APKs
We already exclude the Resources folder. Let's do the same with Themes.
2018-06-03 11:11:24 +02:00
Lioncash 4288bfe0f9 Common: Move host communication enum to Host.h
Given this is actually a part of the Host interface, this should be
placed with it.

While we're at it, turn it into an enum class so that we don't dump its
contained values into the surrounding scope. We can also make
Host_Message take the enum type itself directly instead of taking a
general int value.

After this, it'll be trivial to divide out the rest of Common.h and
remove the header from the repository entirely
2018-05-28 14:34:59 -04: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
Tillmann Karras 4cfd900c67 Fix some warnings 2018-04-17 14:10:05 +01:00
Lioncash 21ee216e63
Android/CMakeLists: Remove usages of LIBS and SRCS variables
Instead, operate on the target itself.
2018-04-03 08:05:43 -04:00
JosJuice 3fe0051a53 Fix build error on Android
Caused by 4387432.
2018-04-03 08:32:55 +02:00
Léo Lam c82da2b978 Remove dead code
Unused, old code that is intended to be removed should not be left in
comments -- that is what version control is for.
2018-03-31 14:56:27 +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
Greg Wicks e19922c5de Android: Implement game-specific settings overrides UI 2018-02-16 13:47:52 -05:00
mahdihijazi c9dc585dcb Android: Support change disc 2018-01-21 13:59:36 +01:00
34will 10ea9e5f5b Added an actual implementation for yes/no dialogs on Android using Object.wait and Object.notify.
Modified NativeLibrary to display alerts in AlertDialogs rather than Toast notifications, and allow yes/no options.
Modified MainAndroid to use the new displayAlertMsg, and to return its output.
2018-01-10 13:41:57 +00:00
Markus Wick e705d43312
Merge pull request #6270 from mahdihijazi/suppport_restore_state
[Android] Support restore emulator state
2018-01-05 13:45:36 +01:00
JosJuice 82a6701f79 Optionally delete savestate that gets loaded at boot 2017-12-28 23:15:48 +01:00
JosJuice b921f6cdef MainAndroid: Don't set User directory redundantly 2017-12-28 13:34:49 +01:00
JosJuice f9a0511937 MainAndroid: Optionally wait for savestate to finish writing 2017-12-27 21:53:14 +01:00
JosJuice 87957faddd MainAndroid: Allow specifying savestate to load at boot 2017-12-27 21:53:13 +01:00
JosJuice a81cbf60fb MainAndroid: Add wrapper for Core::IsRunning 2017-12-27 21:53:13 +01:00
JosJuice d9dd210739 MainAndroid: Allow specifying path for savestates 2017-12-27 21:53:07 +01:00
JosJuice 3262314435 Android: Don't extract Sys if it already is extracted 2017-12-26 09:53:43 +01:00
JosJuice b3b7aef09a Android: Extract Sys to a different folder than the User folder 2017-12-26 09:53:32 +01:00
Mike Harris 4cab718065 Move emulation lifecycle handling into EmulationFragment.
The Activity is responsible for just its views and menus and such. It
signals the Fragment via setGamePath, StartEmulation and StopEmulation.

The Fragment manages the actual emulation lifecycle. It is solely
responsible for calling the NativeLibrary lifecycle methods.

With this lifecycle simplification, the NativeLibrary no longer needs to
kill the Activity. It happens normally now.

This simplifies a lot of things, live handling rotation.
2017-10-15 16:44:56 -07: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
JosJuice f8703f90e3 MainAndroid: Remove s_filename
This fits better as a function parameter than as global state.
2017-08-23 22:36:21 +02:00
Michael M 737651f298 MsgHandler: small cleanup 2017-08-03 13:29:59 -07: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
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
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
Michael Maltese 0019c34c73 DolphinWX: fix input bitmaps not working when background input is off 2017-07-12 00:12:07 -07:00
Léo Lam 22992ae41e Boot: Clean up the boot code
* Move out boot parameters to a separate struct, which is not part
  of SConfig/ConfigManager because there is no reason for it to
  be there.

* Move out file name parsing and constructing the appropriate params
  from paths to a separate function that does that, and only that.

* For every different boot type we support, add a proper struct with
  only the required parameters, with descriptive names and use
  std::variant to only store what we need.

* Clean up the bHLE_BS2 stuff which made no sense sometimes. Now
  instead of using bHLE_BS2 for two different things, both for storing
  the user config setting and as a runtime boot parameter,
  we simply replace the Disc boot params with BootParameters::IPL.

* Const correctness so it's clear what can or cannot update the config.

* Drop unused parameters and unneeded checks.

* Make a few checks a lot more concise. (Looking at you, extension
  checks for disc images.)

* Remove a mildly terrible workaround where we needed to pass an empty
  string in order to boot the GC IPL without any game inserted.
  (Not required anymore thanks to std::variant and std::optional.)

The motivation for this are multiple: cleaning up and being able to add
support for booting an installed NAND title. Without this change, it'd
be pretty much impossible to implement that.

Also, using std::visit with std::variant makes the compiler do
additional type checks: now we're guaranteed that the boot code will
handle all boot types and no invalid boot type will be possible.
2017-06-06 16:27:52 +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
Léo Lam 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
Leo Lam f4190ab1c4 Merge pull request #5465 from sepalani/gc-bios
Tools: Load GameCube BIOS added
2017-05-26 10:23:03 +02:00
Sepalani 95ea721f06 Tools: Load GameCube BIOS added 2017-05-22 22:44:21 +01:00
Léo Lam cf0c4455cd Fix indirect includes 2017-05-22 10:39:36 +02:00
JosJuice ac5c82b36b DiscIO: Remove VolumeCreator
This file is pretty small now that it doesn't handle Wii
partitions anymore, so let's move its contents to Volume.cpp.
This is also more consistent with how blob creation works.
2017-05-19 18:33:21 +02:00
Lioncash 35aa55931f MainAndroid: Resolve -Wmissing-variable-declarations warnings 2017-05-18 19:55:05 -04:00
JosJuice 9cd9ae902a x86-64 support on Android
We can do this now that the x86-64 JIT supports PIE.

JITIL is deliberately excluded from the GUI because it
doesn't support PIE yet. (JITIL will be used if it's
set in the INI, though.)
2017-04-16 11:53:33 +02:00
Stenzek 459a5ab554 Android: Move screenshot waiting logic to Renderer 2017-03-04 16:53:16 +10:00
Stenzek afc25fdca0 VideoCommon: Rename Renderer s_ prefixes to m_ 2017-03-04 16:42:21 +10:00
Lioncash beec40f178 IniFile: Handle s64/u64 values 2017-02-25 00:03:20 -05:00
Lioncash e07383a783 Core: Convert State enum into an enum class 2017-02-05 08:32:23 -05:00
Jules Blok aab6b70868 MainAndroid: Remove obsolete Host_RequestFullscreen() function 2016-11-11 20:48:19 +01:00
Jules Blok 8203ea929b BlockingLoop: Yield to UI message pump while waiting. 2016-11-11 13:37:02 +01:00
Markus Wick d5ca153c26 Merge pull request #4401 from JosJuice/rename-getuniqueid
DiscIO/SConfig: Rename GetUniqueID to GetGameID
2016-10-31 12:39:27 +01:00
JosJuice 1081497cad DiscIO/SConfig: Rename GetUniqueID to GetGameID
We call this "game ID" everywhere else, and it's not
actually completely unique.
2016-10-29 15:24:02 +02:00
Sean Maas 68affd37a1 Android: Remove unused stuff 2016-10-25 14:20:15 -04:00
degasus 05eff01229 Android: Update the gradle file to use android studio 2.2 cmake. 2016-10-05 23:44:10 +02:00
Stenzek 6a99cbd9fc VideoCommon: Call Renderer::SurfaceChanged on render parent resize
This is needed because for some reason the WSI for NV Vulkan drivers
doesn't return VK_ERROR_OUT_OF_DATE_KHR, so there is no other way to know
that a resize has occured apart from polling, which is a poor solution for
X11 (since it is blocking).
2016-10-01 01:09:12 +10:00