summaryrefslogtreecommitdiff
path: root/src/citra/citra.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/citra/citra.cpp')
-rw-r--r--src/citra/citra.cpp71
1 files changed, 71 insertions, 0 deletions
diff --git a/src/citra/citra.cpp b/src/citra/citra.cpp
new file mode 100644
index 000000000..746cf083d
--- /dev/null
+++ b/src/citra/citra.cpp
@@ -0,0 +1,71 @@
1/**
2 * Copyright (C) 2013 citra Emulator
3 *
4 * @file citra.cpp
5 * @author ShizZy <shizzy247@gmail.com>
6 * @date 2013-09-04
7 * @brief Main entry point
8 *
9 * @section LICENSE
10 * This program is free software; you can redistribute it and/or
11 * modify it under the terms of the GNU General Public License as
12 * published by the Free Software Foundation; either version 2 of
13 * the License, or (at your option) any later version.
14 *
15 * This program is distributed in the hope that it will be useful, but
16 * WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
18 * General Public License for more details at
19 * http://www.gnu.org/copyleft/gpl.html
20 *
21 * Official project repository can be found at:
22 * http://code.google.com/p/gekko-gc-emu/
23 */
24
25#include "common.h"
26#include "log_manager.h"
27#include "file_util.h"
28
29#include "system.h"
30#include "core.h"
31#include "loader.h"
32
33#include "emu_window/emu_window_glfw.h"
34
35#include "citra.h"
36
37#define E_ERR -1
38
39//#define PLAY_FIFO_RECORDING
40
41/// Application entry point
42int __cdecl main(int argc, char **argv) {
43 //u32 tight_loop;
44
45 printf("citra starting...\n");
46
47 std::string program_dir = File::GetCurrentDir();
48
49 LogManager::Init();
50
51 EmuWindow_GLFW* emu_window = new EmuWindow_GLFW;
52
53 System::Init(emu_window);
54
55 std::string boot_filename = "homebrew.elf";
56 std::string error_str;
57
58 bool res = Loader::LoadFile(boot_filename, &error_str);
59
60 if (!res) {
61 ERROR_LOG(BOOT, "Failed to load ROM: %s", error_str.c_str());
62 }
63
64 for (;;) {
65 Core::SingleStep();
66 }
67
68 delete emu_window;
69
70 return 0;
71}