2951214e |
1 | #include "psp.h" |
2 | #include "emu.h" |
3 | #include "menu.h" |
4 | #include "../common/menu.h" |
5 | #include "../common/lprintf.h" |
6 | |
7 | int main() |
8 | { |
9 | psp_init(); |
10 | |
11 | // emu_ReadConfig(0, 0); |
12 | emu_Init(); |
13 | menu_init(); |
14 | |
15 | engineState = PGS_Menu; |
16 | |
17 | for (;;) |
18 | { |
19 | switch (engineState) |
20 | { |
21 | case PGS_Menu: |
22 | menu_loop(); |
23 | break; |
24 | |
25 | case PGS_ReloadRom: |
26 | /* |
27 | if (emu_ReloadRom()) |
28 | engineState = PGS_Running; |
29 | else { |
30 | lprintf("PGS_ReloadRom == 0\n"); |
31 | engineState = PGS_Menu; |
32 | } |
33 | */ |
34 | break; |
35 | |
36 | case PGS_RestartRun: |
37 | engineState = PGS_Running; |
38 | |
39 | case PGS_Running: |
40 | // emu_Loop(); |
41 | break; |
42 | |
43 | case PGS_Quit: |
44 | goto endloop; |
45 | |
46 | default: |
47 | lprintf("engine got into unknown state (%i), exitting\n", engineState); |
48 | goto endloop; |
49 | } |
50 | } |
51 | |
52 | endloop: |
53 | |
54 | emu_Deinit(); |
55 | psp_finish(); |
56 | |
57 | return 0; |
58 | } |
59 | |