diff options
Diffstat (limited to 'apps/plugins/sdl/main.c')
-rw-r--r-- | apps/plugins/sdl/main.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/apps/plugins/sdl/main.c b/apps/plugins/sdl/main.c index 478debc1ad..cefc1565d0 100644 --- a/apps/plugins/sdl/main.c +++ b/apps/plugins/sdl/main.c | |||
@@ -72,7 +72,7 @@ void cleanup(void) | |||
72 | } | 72 | } |
73 | 73 | ||
74 | /* 256KB */ | 74 | /* 256KB */ |
75 | static long main_stack[1024 * 1024 / 4]; | 75 | static long main_stack[1024 * 1024 / 2]; |
76 | int (*main_fn)(int argc, char *argv[]); | 76 | int (*main_fn)(int argc, char *argv[]); |
77 | int prog_idx; | 77 | int prog_idx; |
78 | static void main_thread(void) | 78 | static void main_thread(void) |
@@ -176,7 +176,7 @@ enum plugin_status plugin_start(const void *param) | |||
176 | #if defined(CPU_ARM) && !defined(SIMULATOR) | 176 | #if defined(CPU_ARM) && !defined(SIMULATOR) |
177 | /* (don't) set alignment trap. Will generate a data abort | 177 | /* (don't) set alignment trap. Will generate a data abort |
178 | * exception on ARM. */ | 178 | * exception on ARM. */ |
179 | //set_cr(get_cr() | CR_A); | 179 | set_cr(get_cr() | CR_A); |
180 | #endif | 180 | #endif |
181 | 181 | ||
182 | #if 0 | 182 | #if 0 |
@@ -222,8 +222,11 @@ enum plugin_status plugin_start(const void *param) | |||
222 | #undef rb_atexit | 222 | #undef rb_atexit |
223 | rb_atexit(cleanup); | 223 | rb_atexit(cleanup); |
224 | 224 | ||
225 | /* make a new thread to use a bigger stack than otherwise accessible */ | 225 | /* make a new thread to use a bigger stack and higher priority than otherwise accessible */ |
226 | sdl_thread_id = rb->create_thread(main_thread, main_stack, sizeof(main_stack), 0, "sdl_main" IF_PRIO(, PRIORITY_USER_INTERFACE) IF_COP(, CPU)); | 226 | sdl_thread_id = rb->create_thread(main_thread, main_stack, |
227 | sizeof(main_stack), 0, "sdl_main" | ||
228 | IF_PRIO(, PRIORITY_USER_INTERFACE) // we need other threads still | ||
229 | IF_COP(, CPU)); | ||
227 | rb->thread_wait(sdl_thread_id); | 230 | rb->thread_wait(sdl_thread_id); |
228 | 231 | ||
229 | rb->sleep(HZ); /* wait a second in case there's an error message on screen */ | 232 | rb->sleep(HZ); /* wait a second in case there's an error message on screen */ |