diff options
| author | Grissiom <[email protected]> | 2013-08-31 16:46:36 +0800 |
|---|---|---|
| committer | Grissiom <[email protected]> | 2013-08-31 16:46:36 +0800 |
| commit | 6563ae6cab1615df3e1abbccf8df1498934983f9 (patch) | |
| tree | c44c371b5d84a95491250befdadc22461462cbc2 /bsp/simulator | |
| parent | 3d0c0af3718a89a5d614b79ea9910bdc5409415f (diff) | |
simulator: init SDL after rt_components_init
SDL may use DFS to open files. It should be run after
rt_components_init.
Diffstat (limited to 'bsp/simulator')
| -rwxr-xr-x | bsp/simulator/applications/application.c | 6 | ||||
| -rw-r--r-- | bsp/simulator/applications/platform.c | 5 |
2 files changed, 6 insertions, 5 deletions
diff --git a/bsp/simulator/applications/application.c b/bsp/simulator/applications/application.c index 4abecb872e..ea07f01c5f 100755 --- a/bsp/simulator/applications/application.c +++ b/bsp/simulator/applications/application.c @@ -30,6 +30,12 @@ void rt_init_thread_entry(void *parameter) /* initialization RT-Thread Components */ rt_components_init(); +#ifdef RT_USING_RTGUI + /* start sdl thread to simulate an LCD. SDL may depend on DFS and should be + * called after rt_components_init. */ + rt_hw_sdl_start(); +#endif /* RT_USING_RTGUI */ + #if defined(RT_USING_COMPONENTS_INIT) && defined(__GNUC__) && defined(RT_USING_FINSH) finsh_set_device(RT_CONSOLE_DEVICE_NAME); #endif diff --git a/bsp/simulator/applications/platform.c b/bsp/simulator/applications/platform.c index 3c7ffdb541..fbc1003d2a 100644 --- a/bsp/simulator/applications/platform.c +++ b/bsp/simulator/applications/platform.c @@ -17,11 +17,6 @@ void rt_platform_init(void) #endif /* RT_USING_DFS */ -#ifdef RT_USING_RTGUI - /* start sdl thread to simulate an LCD */ - rt_hw_sdl_start(); -#endif /* RT_USING_RTGUI */ - #ifdef _WIN32 rt_thread_idle_sethook(rt_hw_win32_low_cpu); #endif |
