diff options
| author | qiuyiuestc <[email protected]> | 2010-10-19 09:22:56 +0000 |
|---|---|---|
| committer | qiuyiuestc <[email protected]> | 2010-10-19 09:22:56 +0000 |
| commit | 87c7e890b272f7bd668da2a70f2c8eaa0e77e3e3 (patch) | |
| tree | 6e68fc538211acaf741167482e823f3d5e6c925a /examples/gui | |
| parent | 9536c463864fcee22b74a2d930144864ec0e1358 (diff) | |
update module demo
git-svn-id: https://rt-thread.googlecode.com/svn/trunk@1021 bbd45198-f89e-11dd-88c7-29a3b14d5316
Diffstat (limited to 'examples/gui')
| -rw-r--r-- | examples/gui/demo_view_module.c | 15 |
1 files changed, 4 insertions, 11 deletions
diff --git a/examples/gui/demo_view_module.c b/examples/gui/demo_view_module.c index 0ea3184226..7623f8fab8 100644 --- a/examples/gui/demo_view_module.c +++ b/examples/gui/demo_view_module.c @@ -10,7 +10,6 @@ #include <string.h>
#ifdef RT_USING_MODULE
-static rt_module_t module = RT_NULL;
static rtgui_view_t* _view = RT_NULL;
/* ��ť�Ļص����� */
@@ -37,24 +36,18 @@ static void open_btn_onbutton(rtgui_widget_t* widget, struct rtgui_event* event) /* �����ļ�·���ı�ǩ */
rtgui_filelist_view_get_fullpath(view, path, sizeof(path));
-#if 0
- if (module != RT_NULL)
- {
- rt_module_unload(module);
- module = RT_NULL;
- }
-#endif
+
rt_memset(name, 0, sizeof(name));
/* ���ͼ������� */
- if (rt_strstr(path, ".mo") != RT_NULL)
+ if (rt_strstr(path, ".mo") != RT_NULL || rt_strstr(path, ".so") != RT_NULL)
{
- memcpy(name, "mod", 4);
+ rt_memcpy(name, "mod", 4);
}
/* ���ͼ���ļ���Ч��������Ӧ��rtgui_image���� */
if (name[0] != '\0')
- module = rt_module_load_from_file(name, path);
+ rt_module_load_from_file(name, path);
}
/* ɾ�� �ļ��б� ��ͼ */
|
