From d6af28739747099f98f541d1b76ba501882e113c Mon Sep 17 00:00:00 2001 From: Michael Sevakis Date: Fri, 26 Oct 2007 23:11:18 +0000 Subject: Implement as genuine a set_irq_level function for the sim as possible. The yield added earlier is still nescessary since other threads won't run anyway while viewing the database screen on either sim or target. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@15321 a1c6a512-1295-4272-9138-f99709370657 --- apps/gui/list.c | 8 ++++---- apps/main.c | 5 +++++ 2 files changed, 9 insertions(+), 4 deletions(-) (limited to 'apps') diff --git a/apps/gui/list.c b/apps/gui/list.c index 4d19bbdf96..38cecaefcc 100644 --- a/apps/gui/list.c +++ b/apps/gui/list.c @@ -1285,11 +1285,11 @@ bool simplelist_show_list(struct simplelist_info *info) gui_syncstatusbar_draw(&statusbars, true); list_do_action(CONTEXT_STD, info->timeout, &lists, &action, LIST_WRAP_UNLESS_HELD); -#ifdef SIMULATOR - /* Sim has no interrupts, so this is needed for buttons to be recognised */ + + /* We must yield in this case or no other thread can run */ if (info->timeout == TIMEOUT_NOBLOCK) - yield(); -#endif + yield(); + if (info->action_callback) { action = info->action_callback(action, &lists); diff --git a/apps/main.c b/apps/main.c index 366fed9585..d75bb726cf 100644 --- a/apps/main.c +++ b/apps/main.c @@ -113,6 +113,10 @@ #include "cuesheet.h" +#ifdef SIMULATOR +#include "system-sdl.h" +#endif + /*#define AUTOROCK*/ /* define this to check for "autostart.rock" on boot */ const char appsversion[]=APPSVERSION; @@ -267,6 +271,7 @@ static void init(void) { init_threads(); buffer_init(); + set_irq_level(0); lcd_init(); #ifdef HAVE_REMOTE_LCD lcd_remote_init(); -- cgit v1.2.3