diff options
Diffstat (limited to 'src/citra/citra.cpp')
| -rw-r--r-- | src/citra/citra.cpp | 25 |
1 files changed, 9 insertions, 16 deletions
diff --git a/src/citra/citra.cpp b/src/citra/citra.cpp index 5a8642d1b..036af3735 100644 --- a/src/citra/citra.cpp +++ b/src/citra/citra.cpp | |||
| @@ -8,7 +8,7 @@ | |||
| 8 | 8 | ||
| 9 | #include "core/system.h" | 9 | #include "core/system.h" |
| 10 | #include "core/core.h" | 10 | #include "core/core.h" |
| 11 | #include "core/loader.h" | 11 | #include "core/loader/loader.h" |
| 12 | 12 | ||
| 13 | #include "citra/emu_window/emu_window_glfw.h" | 13 | #include "citra/emu_window/emu_window_glfw.h" |
| 14 | 14 | ||
| @@ -16,28 +16,21 @@ | |||
| 16 | 16 | ||
| 17 | /// Application entry point | 17 | /// Application entry point |
| 18 | int __cdecl main(int argc, char **argv) { | 18 | int __cdecl main(int argc, char **argv) { |
| 19 | std::string program_dir = File::GetCurrentDir(); | ||
| 20 | |||
| 21 | LogManager::Init(); | 19 | LogManager::Init(); |
| 22 | 20 | ||
| 23 | EmuWindow_GLFW* emu_window = new EmuWindow_GLFW; | ||
| 24 | |||
| 25 | System::Init(emu_window); | ||
| 26 | |||
| 27 | std::string boot_filename; | ||
| 28 | |||
| 29 | if (argc < 2) { | 21 | if (argc < 2) { |
| 30 | ERROR_LOG(BOOT, "Failed to load ROM: No ROM specified"); | 22 | ERROR_LOG(BOOT, "Failed to load ROM: No ROM specified"); |
| 23 | return -1; | ||
| 31 | } | 24 | } |
| 32 | else { | ||
| 33 | boot_filename = argv[1]; | ||
| 34 | } | ||
| 35 | std::string error_str; | ||
| 36 | 25 | ||
| 37 | bool res = Loader::LoadFile(boot_filename, &error_str); | 26 | std::string boot_filename = argv[1]; |
| 27 | EmuWindow_GLFW* emu_window = new EmuWindow_GLFW; | ||
| 28 | |||
| 29 | System::Init(emu_window); | ||
| 38 | 30 | ||
| 39 | if (!res) { | 31 | if (Loader::ResultStatus::Success != Loader::LoadFile(boot_filename)) { |
| 40 | ERROR_LOG(BOOT, "Failed to load ROM: %s", error_str.c_str()); | 32 | ERROR_LOG(BOOT, "Failed to load ROM!"); |
| 33 | return -1; | ||
| 41 | } | 34 | } |
| 42 | 35 | ||
| 43 | Core::RunLoop(); | 36 | Core::RunLoop(); |