int splash_main(int argc, char **argv) { osd_surface_t *surface; int ret = -1; int c, opt_index; char *opt_p = NULL, *opt_s = NULL; av_init(); if (av_get_mode() == AV_MODE_PAL) { width = 720; height = 576; av_set_mode(AV_MODE_PAL); } else { width = 720; height = 480; } if ((surface=osd_create_surface(width, height, 0, OSD_FB)) == NULL) { goto err; } while ((c=getopt_long(argc, argv, "blp:s:", opts, &opt_index)) != -1) { switch (c) { case 'b': ret = blank(surface); break; #if defined(STANDALONE) case 'l': ret = draw_logo(surface); break; #endif /* STANDALONE */ case 'p': opt_p = strdup(optarg); break; case 's': opt_s = strdup(optarg); break; } } if (opt_p && opt_s) { ret = draw_progress(surface, atoi(opt_p), atoi(opt_s)); } err: return ret; }
VOID GLApplication::init( GLApplicationEvents* pEvents ) { Initialize(); GetInstance().setEvents( pEvents ); if (!glfwInit()) { if ( GetInstance().getEvents() != nullptr ) { GetInstance().getEvents()->OnInitializeError(); } } #ifdef _USE_AVCPP if (!av_init()) { if ( GetInstance().getEvents() != nullptr ) { GetInstance().getEvents()->OnInitializeError(); } } #endif //_USE_AVCPP #ifdef _USE_DEVIL if (!il_init()) { if ( GetInstance().getEvents() != nullptr ) { GetInstance().getEvents()->OnInitializeError(); } } #endif //_USE_DEVIL //Reset time GetInstance().setTime(0.0f); }