summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorbunnei <ericbunnie@gmail.com>2014-04-01 04:25:55 +0200
committerbunnei <ericbunnie@gmail.com>2014-04-01 04:25:55 +0200
commitc7f4914a907e38fd51157967a08218937c74debc (patch)
tree2aee4c7a470be9b1c52d796bc5e8e2c4cc541979 /src
parentadded ELF loading support to loader.cpp (diff)
downloadyuzu-c7f4914a907e38fd51157967a08218937c74debc.tar
yuzu-c7f4914a907e38fd51157967a08218937c74debc.tar.gz
yuzu-c7f4914a907e38fd51157967a08218937c74debc.tar.bz2
yuzu-c7f4914a907e38fd51157967a08218937c74debc.tar.lz
yuzu-c7f4914a907e38fd51157967a08218937c74debc.tar.xz
yuzu-c7f4914a907e38fd51157967a08218937c74debc.tar.zst
yuzu-c7f4914a907e38fd51157967a08218937c74debc.zip
Diffstat (limited to 'src')
-rw-r--r--src/citra/src/citra.cpp21
1 files changed, 17 insertions, 4 deletions
diff --git a/src/citra/src/citra.cpp b/src/citra/src/citra.cpp
index fc4610405..26f5a74eb 100644
--- a/src/citra/src/citra.cpp
+++ b/src/citra/src/citra.cpp
@@ -27,11 +27,15 @@
#include "file_util.h"
#include "system.h"
+#include "core.h"
+#include "loader.h"
#include "emu_window/emu_window_glfw.h"
#include "citra.h"
+#define E_ERR -1
+
//#define PLAY_FIFO_RECORDING
/// Application entry point
@@ -48,7 +52,7 @@ int __cdecl main(int argc, char **argv) {
System::Init(emu_window);
- //if (E_OK != core::Init(emu_window)) {
+ //if (E_OK != Core::Init(emu_window)) {
// LOG_ERROR(TMASTER, "core initialization failed, exiting...");
// core::Kill();
// exit(1);
@@ -81,10 +85,19 @@ int __cdecl main(int argc, char **argv) {
//}
//core::Kill();
- while (1) {
- }
+ std::string boot_filename = "homebrew.elf";
+ std::string error_str;
+
+ bool res = Loader::LoadFile(boot_filename, &error_str);
+
+ if (!res) {
+ ERROR_LOG(BOOT, "Failed to load ROM: %s", error_str.c_str());
+ }
+ for (int tight_loop = 0; tight_loop < 10000; ++tight_loop) {
+ Core::SingleStep();
+ }
- //delete emu_window;
+ delete emu_window;
return 0;
}