diff options
Diffstat (limited to 'apps/plugins/rockboy/rockmacros.h')
-rw-r--r-- | apps/plugins/rockboy/rockmacros.h | 21 |
1 files changed, 17 insertions, 4 deletions
diff --git a/apps/plugins/rockboy/rockmacros.h b/apps/plugins/rockboy/rockmacros.h index c68223d478..bc9a0e8014 100644 --- a/apps/plugins/rockboy/rockmacros.h +++ b/apps/plugins/rockboy/rockmacros.h | |||
@@ -16,6 +16,8 @@ | |||
16 | * KIND, either express or implied. | 16 | * KIND, either express or implied. |
17 | * | 17 | * |
18 | ****************************************************************************/ | 18 | ****************************************************************************/ |
19 | #ifndef __ROCKMACROS_H__ | ||
20 | #define __ROCKMACROS_H__ | ||
19 | 21 | ||
20 | #include "plugin.h" | 22 | #include "plugin.h" |
21 | 23 | ||
@@ -28,7 +30,7 @@ extern struct plugin_api* rb; | |||
28 | extern int shut,cleanshut; | 30 | extern int shut,cleanshut; |
29 | void vid_update(int scanline); | 31 | void vid_update(int scanline); |
30 | void vid_init(void); | 32 | void vid_init(void); |
31 | void vid_begin(void); | 33 | inline void vid_begin(void); |
32 | void vid_end(void); | 34 | void vid_end(void); |
33 | void die(char *message, ...); | 35 | void die(char *message, ...); |
34 | void setmallocpos(void *pointer); | 36 | void setmallocpos(void *pointer); |
@@ -38,7 +40,7 @@ int sys_elapsed(long *oldtick); | |||
38 | void sys_sleep(int us); | 40 | void sys_sleep(int us); |
39 | int pcm_submit(void); | 41 | int pcm_submit(void); |
40 | void pcm_init(void); | 42 | void pcm_init(void); |
41 | void doevents(void); | 43 | void doevents(void) ICODE_ATTR; |
42 | void ev_poll(void); | 44 | void ev_poll(void); |
43 | int do_user_menu(void); | 45 | int do_user_menu(void); |
44 | void loadstate(int fd); | 46 | void loadstate(int fd); |
@@ -60,6 +62,8 @@ void savestate(int fd); | |||
60 | #define mkdir(a,b) rb->sim_mkdir((a),(b)) | 62 | #define mkdir(a,b) rb->sim_mkdir((a),(b)) |
61 | #undef open | 63 | #undef open |
62 | #define open(a,b) rb->sim_open((a),(b)) | 64 | #define open(a,b) rb->sim_open((a),(b)) |
65 | #undef close | ||
66 | #define close(a) rb->sim_close((a)) | ||
63 | #undef lseek | 67 | #undef lseek |
64 | #define lseek(a,b,c) rb->sim_lseek((a),(b),(c)) | 68 | #define lseek(a,b,c) rb->sim_lseek((a),(b),(c)) |
65 | #else /* !SIMULATOR */ | 69 | #else /* !SIMULATOR */ |
@@ -68,6 +72,7 @@ void savestate(int fd); | |||
68 | #define mkdir(a,b) rb->mkdir((a),(b)) | 72 | #define mkdir(a,b) rb->mkdir((a),(b)) |
69 | #define open(a,b) rb->open((a),(b)) | 73 | #define open(a,b) rb->open((a),(b)) |
70 | #define lseek(a,b,c) rb->lseek((a),(b),(c)) | 74 | #define lseek(a,b,c) rb->lseek((a),(b),(c)) |
75 | #define close(a) rb->close((a)) | ||
71 | #endif /* !SIMULATOR */ | 76 | #endif /* !SIMULATOR */ |
72 | 77 | ||
73 | #define strcat(a,b) rb->strcat((a),(b)) | 78 | #define strcat(a,b) rb->strcat((a),(b)) |
@@ -93,5 +98,13 @@ void savestate(int fd); | |||
93 | /* Using #define isn't enough with GCC 4.0.1 */ | 98 | /* Using #define isn't enough with GCC 4.0.1 */ |
94 | void* memcpy(void* dst, const void* src, size_t size); | 99 | void* memcpy(void* dst, const void* src, size_t size); |
95 | 100 | ||
96 | extern int frameskip; | 101 | struct options { |
97 | extern bool sound; | 102 | int A, B, START, SELECT, MENU; |
103 | int frameskip, fps, maxskip; | ||
104 | bool sound, fullscreen, showstats; | ||
105 | }; | ||
106 | |||
107 | extern struct options options; | ||
108 | #define savedir "/.rockbox/rockboy" | ||
109 | |||
110 | #endif | ||