From a4d2f5e4ed86bd24cb809d39bad4392c4b91b807 Mon Sep 17 00:00:00 2001 From: gibbed Date: Mon, 29 Jul 2019 13:22:45 -0500 Subject: [PATCH] [Core] Initialize all members of Emulator. --- src/xenia/emulator.cc | 19 ++++++++++++++++++- src/xenia/emulator.h | 8 ++++---- 2 files changed, 22 insertions(+), 5 deletions(-) diff --git a/src/xenia/emulator.cc b/src/xenia/emulator.cc index 8030a8078..8b0754382 100644 --- a/src/xenia/emulator.cc +++ b/src/xenia/emulator.cc @@ -50,7 +50,24 @@ namespace xe { Emulator::Emulator(const std::wstring& command_line, const std::wstring& content_root) - : command_line_(command_line), content_root_(content_root) {} + : on_launch(), + on_exit(), + command_line_(command_line), + content_root_(content_root), + game_title_(), + display_window_(nullptr), + memory_(), + audio_system_(), + graphics_system_(), + input_system_(), + export_resolver_(), + file_system_(), + kernel_state_(), + main_thread_(nullptr), + title_id_(0), + paused_(false), + restoring_(false), + restore_fence_() {} Emulator::~Emulator() { // Note that we delete things in the reverse order they were initialized. diff --git a/src/xenia/emulator.h b/src/xenia/emulator.h index a60b4e2e7..31ccf2fb7 100644 --- a/src/xenia/emulator.h +++ b/src/xenia/emulator.h @@ -175,11 +175,11 @@ class Emulator { std::unique_ptr file_system_; std::unique_ptr kernel_state_; - threading::Thread* main_thread_ = nullptr; - uint32_t title_id_ = 0; // Currently running title ID + threading::Thread* main_thread_; + uint32_t title_id_; // Currently running title ID - bool paused_ = false; - bool restoring_ = false; + bool paused_; + bool restoring_; threading::Fence restore_fence_; // Fired on restore finish. };