summaryrefslogtreecommitdiffstats
path: root/apps/plugins/sdl/main.c
diff options
context:
space:
mode:
Diffstat (limited to 'apps/plugins/sdl/main.c')
-rw-r--r--apps/plugins/sdl/main.c11
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)
}
/* 256KB */
-static long main_stack[1024 * 1024 / 4];
+static long main_stack[1024 * 1024 / 2];
int (*main_fn)(int argc, char *argv[]);
int prog_idx;
static void main_thread(void)
@@ -176,7 +176,7 @@ enum plugin_status plugin_start(const void *param)
#if defined(CPU_ARM) && !defined(SIMULATOR)
/* (don't) set alignment trap. Will generate a data abort
* exception on ARM. */
- //set_cr(get_cr() | CR_A);
+ set_cr(get_cr() | CR_A);
#endif
#if 0
@@ -222,8 +222,11 @@ enum plugin_status plugin_start(const void *param)
#undef rb_atexit
rb_atexit(cleanup);
- /* make a new thread to use a bigger stack than otherwise accessible */
- sdl_thread_id = rb->create_thread(main_thread, main_stack, sizeof(main_stack), 0, "sdl_main" IF_PRIO(, PRIORITY_USER_INTERFACE) IF_COP(, CPU));
+ /* make a new thread to use a bigger stack and higher priority than otherwise accessible */
+ sdl_thread_id = rb->create_thread(main_thread, main_stack,
+ sizeof(main_stack), 0, "sdl_main"
+ IF_PRIO(, PRIORITY_USER_INTERFACE) // we need other threads still
+ IF_COP(, CPU));
rb->thread_wait(sdl_thread_id);
rb->sleep(HZ); /* wait a second in case there's an error message on screen */