core: Namespace EmuWindow

Gets the class out of the global namespace.
This commit is contained in:
Lioncash 2018-08-11 20:20:19 -04:00 committed by fearlessTobi
parent bbc8fd7165
commit 6e22891761
14 changed files with 39 additions and 20 deletions

View file

@ -92,7 +92,7 @@ System::ResultStatus System::SingleStep() {
return RunLoop(false);
}
System::ResultStatus System::Load(EmuWindow& emu_window, const std::string& filepath) {
System::ResultStatus System::Load(Frontend::EmuWindow& emu_window, const std::string& filepath) {
app_loader = Loader::GetLoader(filepath);
if (!app_loader) {
@ -167,7 +167,7 @@ void System::Reschedule() {
kernel->GetThreadManager().Reschedule();
}
System::ResultStatus System::Init(EmuWindow& emu_window, u32 system_mode) {
System::ResultStatus System::Init(Frontend::EmuWindow& emu_window, u32 system_mode) {
LOG_DEBUG(HW_Memory, "initialized OK");
memory = std::make_unique<Memory::MemorySystem>();

View file

@ -14,9 +14,12 @@
#include "core/perf_stats.h"
#include "core/telemetry_session.h"
class EmuWindow;
class ARM_Interface;
namespace Frontend {
class EmuWindow;
}
namespace Memory {
class MemorySystem;
}
@ -121,7 +124,7 @@ public:
* @param filepath String path to the executable application to load on the host file system.
* @returns ResultStatus code, indicating if the operation succeeded.
*/
ResultStatus Load(EmuWindow& emu_window, const std::string& filepath);
ResultStatus Load(Frontend::EmuWindow& emu_window, const std::string& filepath);
/**
* Indicates if the emulated system is powered on (all subsystems initialized and able to run an
@ -243,7 +246,7 @@ private:
* @param system_mode The system mode.
* @return ResultStatus code, indicating if the operation succeeded.
*/
ResultStatus Init(EmuWindow& emu_window, u32 system_mode);
ResultStatus Init(Frontend::EmuWindow& emu_window, u32 system_mode);
/// Reschedule the core emulation
void Reschedule();
@ -288,7 +291,7 @@ private:
ResultStatus status = ResultStatus::Success;
std::string status_details = "";
/// Saved variables for reset
EmuWindow* m_emu_window;
Frontend::EmuWindow* m_emu_window;
std::string m_filepath;
std::atomic<bool> reset_requested;

View file

@ -8,6 +8,8 @@
#include "core/frontend/input.h"
#include "core/settings.h"
namespace Frontend {
class EmuWindow::TouchState : public Input::Factory<Input::TouchDevice>,
public std::enable_shared_from_this<TouchState> {
public:
@ -156,3 +158,5 @@ void EmuWindow::UpdateCurrentFramebufferLayout(unsigned width, unsigned height)
}
NotifyFramebufferLayoutChanged(layout);
}
} // namespace Frontend

View file

@ -10,6 +10,8 @@
#include "common/common_types.h"
#include "core/frontend/framebuffer_layout.h"
namespace Frontend {
/**
* Abstraction class used to provide an interface between emulation code and the frontend
* (e.g. SDL, QGLWidget, GLFW, etc...).
@ -166,3 +168,5 @@ private:
*/
std::tuple<unsigned, unsigned> ClipToTouchScreen(unsigned new_x, unsigned new_y) const;
};
} // namespace Frontend