aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/citra
diff options
context:
space:
mode:
authorGravatar bunnei <ericbunnie@gmail.com>2014-03-31 22:25:55 -0400
committerGravatar bunnei <ericbunnie@gmail.com>2014-03-31 22:25:55 -0400
commitc7f4914a907e38fd51157967a08218937c74debc (patch)
tree2aee4c7a470be9b1c52d796bc5e8e2c4cc541979 /src/citra
parent85e8da6fc8579c313649d12494f58b654b439326 (diff)
added simple processing loop and ELF loading to main()... hackish, will cleanup later
Diffstat (limited to 'src/citra')
-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 fc461040..26f5a74e 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;
}