diff options
author | bunnei <bunneidev@gmail.com> | 2014-08-15 15:53:57 +0200 |
---|---|---|
committer | bunnei <bunneidev@gmail.com> | 2014-08-15 15:53:57 +0200 |
commit | d1c2b76ad1687c4ccf5673d593de3b7f8710a9c0 (patch) | |
tree | b226b58f2ca96c584a72c2ab7e6fc7b63d56e7cc | |
parent | Merge pull request #43 from archshift/iftree (diff) | |
parent | Bootmanager: changed `filename` to std::string (diff) | |
download | yuzu-d1c2b76ad1687c4ccf5673d593de3b7f8710a9c0.tar yuzu-d1c2b76ad1687c4ccf5673d593de3b7f8710a9c0.tar.gz yuzu-d1c2b76ad1687c4ccf5673d593de3b7f8710a9c0.tar.bz2 yuzu-d1c2b76ad1687c4ccf5673d593de3b7f8710a9c0.tar.lz yuzu-d1c2b76ad1687c4ccf5673d593de3b7f8710a9c0.tar.xz yuzu-d1c2b76ad1687c4ccf5673d593de3b7f8710a9c0.tar.zst yuzu-d1c2b76ad1687c4ccf5673d593de3b7f8710a9c0.zip |
-rw-r--r-- | src/citra/emu_window/emu_window_glfw.cpp | 1 | ||||
-rw-r--r-- | src/citra_qt/bootmanager.cpp | 8 | ||||
-rw-r--r-- | src/citra_qt/bootmanager.hxx | 4 | ||||
-rw-r--r-- | src/citra_qt/main.cpp | 5 | ||||
-rw-r--r-- | src/citra_qt/main.hxx | 2 |
5 files changed, 10 insertions, 10 deletions
diff --git a/src/citra/emu_window/emu_window_glfw.cpp b/src/citra/emu_window/emu_window_glfw.cpp index f882a825e..02f524e03 100644 --- a/src/citra/emu_window/emu_window_glfw.cpp +++ b/src/citra/emu_window/emu_window_glfw.cpp @@ -6,7 +6,6 @@ #include "video_core/video_core.h" -#include "citra/citra.h" #include "citra/emu_window/emu_window_glfw.h" static void OnKeyEvent(GLFWwindow* win, int key, int action) { diff --git a/src/citra_qt/bootmanager.cpp b/src/citra_qt/bootmanager.cpp index a162e6dfe..b0aa1e561 100644 --- a/src/citra_qt/bootmanager.cpp +++ b/src/citra_qt/bootmanager.cpp @@ -17,13 +17,15 @@ #define APP_TITLE APP_NAME " " APP_VERSION #define COPYRIGHT "Copyright (C) 2013-2014 Citra Team" -EmuThread::EmuThread(GRenderWindow* render_window) : exec_cpu_step(false), cpu_running(false), render_window(render_window) +EmuThread::EmuThread(GRenderWindow* render_window) : + exec_cpu_step(false), cpu_running(false), + render_window(render_window), filename("") { } -void EmuThread::SetFilename(const char* filename) +void EmuThread::SetFilename(std::string filename) { - strcpy(this->filename, filename); + this->filename = filename; } void EmuThread::run() diff --git a/src/citra_qt/bootmanager.hxx b/src/citra_qt/bootmanager.hxx index 1001e1ee4..b4005ccbb 100644 --- a/src/citra_qt/bootmanager.hxx +++ b/src/citra_qt/bootmanager.hxx @@ -17,7 +17,7 @@ public: * @param filename * @warning Only call when not running! */ - void SetFilename(const char* filename); + void SetFilename(std::string filename); /** * Start emulation (on new thread) @@ -62,7 +62,7 @@ private: EmuThread(GRenderWindow* render_window); - char filename[MAX_PATH]; + std::string filename; bool exec_cpu_step; bool cpu_running; diff --git a/src/citra_qt/main.cpp b/src/citra_qt/main.cpp index 997e82cc9..e5190d48a 100644 --- a/src/citra_qt/main.cpp +++ b/src/citra_qt/main.cpp @@ -123,7 +123,7 @@ GMainWindow::~GMainWindow() delete render_window; } -void GMainWindow::BootGame(const char* filename) +void GMainWindow::BootGame(std::string filename) { NOTICE_LOG(MASTER_LOG, "citra starting...\n"); @@ -134,8 +134,7 @@ void GMainWindow::BootGame(const char* filename) } // Load a game or die... - std::string boot_filename = filename; - if (Loader::ResultStatus::Success != Loader::LoadFile(boot_filename)) { + if (Loader::ResultStatus::Success != Loader::LoadFile(filename)) { ERROR_LOG(BOOT, "Failed to load ROM!"); } diff --git a/src/citra_qt/main.hxx b/src/citra_qt/main.hxx index 6bcb37a30..a0b41f5f4 100644 --- a/src/citra_qt/main.hxx +++ b/src/citra_qt/main.hxx @@ -30,7 +30,7 @@ public: ~GMainWindow(); private: - void BootGame(const char* filename); + void BootGame(std::string filename); void closeEvent(QCloseEvent* event); |