diff options
| author | 2014-06-18 18:58:09 -0400 | |
|---|---|---|
| committer | 2014-06-24 19:29:58 -0400 | |
| commit | 7889cafc76ac99b8509fa3cd1558a09f8a7e5f91 (patch) | |
| tree | e6ffea9ec1c334bfca13404c47a2191fd281554c /src/citra/citra.cpp | |
| parent | NCCH: Changed decompression to load .code directly into memory rather than an... (diff) | |
| download | yuzu-7889cafc76ac99b8509fa3cd1558a09f8a7e5f91.tar.gz yuzu-7889cafc76ac99b8509fa3cd1558a09f8a7e5f91.tar.xz yuzu-7889cafc76ac99b8509fa3cd1558a09f8a7e5f91.zip | |
Loader: Implemented AppLoader interface for abstracting application loading.
- Various cleanups/refactorings to Loader, ELF, and NCCH modules.
- Added AppLoader interface to ELF and NCCH.
- Updated Qt/GLFW frontends to check AppLoader ResultStatus.
NCCH: Removed extra qualification typos.
Loader: Removed unnecessary #include's.
NCCH: Improved readability of memcmp statements.
NCCH: Added missing space.
Elf: Removed unnecessary usage of unique_ptr.
Loader: Removed unnecessary usage of unique_ptr.
Diffstat (limited to 'src/citra/citra.cpp')
| -rw-r--r-- | src/citra/citra.cpp | 23 |
1 files changed, 8 insertions, 15 deletions
diff --git a/src/citra/citra.cpp b/src/citra/citra.cpp index f6bb10f29..036af3735 100644 --- a/src/citra/citra.cpp +++ b/src/citra/citra.cpp | |||
| @@ -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(); |