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:
x1nixmzeng
2016-01-09 17:36:46 +00:00
parent 5fa9499a12
commit 6530b9dc49
11 changed files with 56 additions and 53 deletions

View File

@@ -35,11 +35,12 @@ class EmulatorWindow {
ui::Loop* loop() const { return loop_.get(); }
ui::Window* window() const { return window_.get(); }
void UpdateTitle();
private:
explicit EmulatorWindow(Emulator* emulator);
bool Initialize();
void UpdateTitle();
void CpuTimeScalarReset();
void CpuTimeScalarSetHalf();

View File

@@ -195,7 +195,8 @@ int xenia_main(const std::vector<std::wstring>& args) {
// Normalize the path and make absolute.
std::wstring abs_path = xe::to_absolute_path(path);
result = emulator->LaunchPath(abs_path);
result = emulator->LaunchPath(abs_path,
[&]() { emulator_window->UpdateTitle(); });
if (XFAILED(result)) {
XELOGE("Failed to launch target: %.8X", result);
emulator.reset();