Added callback when new module is launched
This avoids having to guess the display window title format Also manually fixed the linting errors picked out by travis which do not get picked up using xb format locally
This commit is contained in:
@@ -54,7 +54,7 @@ class Emulator {
|
||||
const std::wstring& command_line() const { return command_line_; }
|
||||
|
||||
// Title of the game in the default language.
|
||||
const std::wstring &game_title() const { return game_title_; }
|
||||
const std::wstring& game_title() const { return game_title_; }
|
||||
|
||||
// Window used for displaying graphical output.
|
||||
ui::Window* display_window() const { return display_window_; }
|
||||
@@ -109,17 +109,18 @@ class Emulator {
|
||||
// Launches a game from the given file path.
|
||||
// This will attempt to infer the type of the given file (such as an iso, etc)
|
||||
// using heuristics.
|
||||
X_STATUS LaunchPath(std::wstring path);
|
||||
X_STATUS LaunchPath(std::wstring path, std::function<void()> on_launch);
|
||||
|
||||
// Launches a game from a .xex file by mounting the containing folder as if it
|
||||
// was an extracted STFS container.
|
||||
X_STATUS LaunchXexFile(std::wstring path);
|
||||
X_STATUS LaunchXexFile(std::wstring path, std::function<void()> on_launch);
|
||||
|
||||
// Launches a game from a disc image file (.iso, etc).
|
||||
X_STATUS LaunchDiscImage(std::wstring path);
|
||||
X_STATUS LaunchDiscImage(std::wstring path, std::function<void()> on_launch);
|
||||
|
||||
// Launches a game from an STFS container file.
|
||||
X_STATUS LaunchStfsContainer(std::wstring path);
|
||||
X_STATUS LaunchStfsContainer(std::wstring path,
|
||||
std::function<void()> on_launch);
|
||||
|
||||
void Pause();
|
||||
void Resume();
|
||||
@@ -134,8 +135,9 @@ class Emulator {
|
||||
static bool ExceptionCallbackThunk(Exception* ex, void* data);
|
||||
bool ExceptionCallback(Exception* ex);
|
||||
|
||||
X_STATUS CompleteLaunch(const std::wstring& path,
|
||||
const std::string& module_path);
|
||||
X_STATUS CompleteLaunch(const std::wstring &path,
|
||||
const std::string &module_path,
|
||||
std::function<void()> on_launch);
|
||||
|
||||
std::wstring command_line_;
|
||||
std::wstring game_title_;
|
||||
|
||||
Reference in New Issue
Block a user