1
0
Fork 0
forked from suyu/suyu

Bootmanager: changed filename to std::string

This commit is contained in:
archshift 2014-08-14 23:59:31 -07:00
parent 73c53b5eb8
commit 6096b289b7
5 changed files with 10 additions and 10 deletions

View file

@ -6,7 +6,6 @@
#include "video_core/video_core.h" #include "video_core/video_core.h"
#include "citra/citra.h"
#include "citra/emu_window/emu_window_glfw.h" #include "citra/emu_window/emu_window_glfw.h"
static void OnKeyEvent(GLFWwindow* win, int key, int action) { static void OnKeyEvent(GLFWwindow* win, int key, int action) {

View file

@ -17,13 +17,15 @@
#define APP_TITLE APP_NAME " " APP_VERSION #define APP_TITLE APP_NAME " " APP_VERSION
#define COPYRIGHT "Copyright (C) 2013-2014 Citra Team" #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() void EmuThread::run()

View file

@ -17,7 +17,7 @@ public:
* @param filename * @param filename
* @warning Only call when not running! * @warning Only call when not running!
*/ */
void SetFilename(const char* filename); void SetFilename(std::string filename);
/** /**
* Start emulation (on new thread) * Start emulation (on new thread)
@ -62,7 +62,7 @@ private:
EmuThread(GRenderWindow* render_window); EmuThread(GRenderWindow* render_window);
char filename[MAX_PATH]; std::string filename;
bool exec_cpu_step; bool exec_cpu_step;
bool cpu_running; bool cpu_running;

View file

@ -123,7 +123,7 @@ GMainWindow::~GMainWindow()
delete render_window; delete render_window;
} }
void GMainWindow::BootGame(const char* filename) void GMainWindow::BootGame(std::string filename)
{ {
NOTICE_LOG(MASTER_LOG, "citra starting...\n"); NOTICE_LOG(MASTER_LOG, "citra starting...\n");
@ -134,8 +134,7 @@ void GMainWindow::BootGame(const char* filename)
} }
// Load a game or die... // Load a game or die...
std::string boot_filename = filename; if (Loader::ResultStatus::Success != Loader::LoadFile(filename)) {
if (Loader::ResultStatus::Success != Loader::LoadFile(boot_filename)) {
ERROR_LOG(BOOT, "Failed to load ROM!"); ERROR_LOG(BOOT, "Failed to load ROM!");
} }

View file

@ -30,7 +30,7 @@ public:
~GMainWindow(); ~GMainWindow();
private: private:
void BootGame(const char* filename); void BootGame(std::string filename);
void closeEvent(QCloseEvent* event); void closeEvent(QCloseEvent* event);