application.cc 575 B

12345678910111213141516171819202122232425262728293031
  1. #include <rtthread.h>
  2. #include "appmgr.h"
  3. #include "statusbar.h"
  4. int rt_application_init()
  5. {
  6. rt_device_t device;
  7. struct rt_device_rect_info info;
  8. device = rt_device_find("sdl");
  9. if (device != RT_NULL)
  10. {
  11. info.width = 800;
  12. info.height = 480;
  13. /* set graphic resolution */
  14. rt_device_control(device, RTGRAPHIC_CTRL_SET_MODE, &info);
  15. }
  16. /* re-set graphic device */
  17. rtgui_graphic_set_device(device);
  18. /* re-init mouse */
  19. rtgui_mouse_init();
  20. app_mgr_init();
  21. rt_thread_delay(10);
  22. app_init();
  23. picture_app_create();
  24. return 0;
  25. }