Commit Graph

61 Commits

Author SHA1 Message Date
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
JosJuice 0a15aaaa12 Move DiscIO enums to a new file
At first there weren't many enums in Volume.h, but the number has been
growing, and I'm planning to add one more for regions. To not make
Volume.h too large, and to avoid needing to include Volume.h in code
that doesn't use volume objects, I'm moving the enums to a new file.
I'm also turning them into enum classes while I'm at it.
2016-07-13 17:29:27 +02:00
degasus d79aeaa1e9 VideoCommon: Drop GetConfigName.
We're past 5.0 now, so there is no need to look for old inis.
2016-06-26 12:34:59 +02:00
JosJuice 1878605d77 Undo some comment formatting changes from b5104a7 2016-06-25 18:07:10 +02:00
Rukai b5104a79f1 GCVolume: supports reading all opening.bnr information
DQT2: Game properties dialog contains info tab giving information about the selected iso.
2016-06-26 00:03:59 +10:00
spider-mario 9e82694071 Fix configStrings in Android’s ButtonManager
The bug was exposed by clang-format.
2016-06-24 22:36:15 +02:00
Pierre Bourdon 3570c7f03a Reformat all the things. Have fun with merge conflicts. 2016-06-24 10:43:46 +02:00
EmptyChaos c1944f623b Core/Movie: Add ability to run code in Host context
EndPlayInput runs on the CPU thread so it can't directly call
UpdateWantDeterminism. PlayController also tries to ChangeDisc
from the CPU Thread which is also invalid. It now just pauses
execution and posts a request to the Host to fix it instead.

The Core itself also did dodgy things like PauseAndLock-ing
from the CPU Thread and SetState from EmuThread which have been
removed.
2016-05-13 09:23:44 +10:00
EmptyChaos c1922783f8 Core: Threadsafety Synchronization Fixes (Frame Advance / FifoPlayer)
Fix Frame Advance and FifoPlayer pause/unpause/stop.

CPU::EnableStepping is not atomic but is called from multiple threads
which races and leaves the system in a random state; also instruction
stepping was unstable, m_StepEvent had an almost random value because
of the dual purpose it served which could cause races where CPU::Run
would SingleStep when it was supposed to be sleeping.

FifoPlayer never FinishStateMove()d which was causing it to deadlock.
Rather than partially reimplementing CPU::Run, just use CPUCoreBase
and then call CPU::Run(). More DRY and less likely to have weird bugs
specific to the player (i.e the previous freezing on pause/stop).

Refactor PowerPC::state into CPU since it manages the state of the
CPU Thread which is controlled by CPU, not PowerPC. This simplifies
the architecture somewhat and eliminates races that can be caused by
calling PowerPC state functions directly instead of using CPU's
(because they bypassed the EnableStepping lock).
2016-05-13 09:23:44 +10:00