@@ -51,13 +51,13 @@ EGLNativeDisplayType util_create_display(int screen)
5151 EGLNativeDisplayType ret = 0 ;
5252 void *init;
5353
54- lib_hdl = dlopen (IAS_WL_LIBNAME, RTLD_LAZY | RTLD_GLOBAL);
54+ lib_hdl = dlopen (IAS_WL_LIBNAME, RTLD_LAZY | RTLD_GLOBAL);
5555 if (!lib_hdl) {
5656 cerr<<" Couldn't open lib " <<IAS_WL_LIBNAME<<endl;
5757 return 0 ;
58- }
58+ }
5959
60- /* Find init symbol */
60+ /* Find init symbol */
6161 init = dlsym (lib_hdl, " init" );
6262 if (!init) {
6363 cerr<<" Couldn't open symbol init dlerror " <<dlerror ()<<endl;
@@ -76,14 +76,15 @@ EGLNativeDisplayType util_create_display(int screen)
7676 /* Call class's function */
7777 ret = gwl->init ();
7878 if (ret == 0 ) {
79- cerr<<" WL base Class init is failed" <<endl;
80- dlclose (lib_hdl);
81- return 0 ;
82- }
79+ cerr<<" WL base Class init is failed" <<endl;
80+ dlclose (lib_hdl);
81+ return 0 ;
82+ }
8383 gwl->add_reg ();
84+ gwl->dispatch_pending ();
8485
85- stage = CREATE_DISPLAY_DONE;
86- return ret;
86+ stage = CREATE_DISPLAY_DONE;
87+ return ret;
8788}
8889
8990void util_destroy_display (EGLNativeDisplayType display)
@@ -112,9 +113,9 @@ void util_destroy_display(EGLNativeDisplayType display)
112113bool util_set_content_protection (int crtc, int cp)
113114{
114115
115- bool retval = false ;
116+ bool retval = false ;
116117
117- if (stage != CREATE_DISPLAY_DONE) {
118+ if (stage != CREATE_DISPLAY_DONE) {
118119 cerr<<" Must call util_create_display first" <<endl;
119120 return retval;
120121 }
@@ -127,8 +128,8 @@ bool util_set_content_protection(int crtc, int cp)
127128 retval = gwl->set_content_protection (crtc, cp);
128129 if (retval != true )
129130 {
130- cerr<<" Failed to set content protection and ret value =%0x" <<retval<<endl;
131- return retval;
131+ cerr<<" Failed to set content protection and ret value =%0x" <<retval<<endl;
132+ return retval;
132133 }
133- return true ;
134+ return true ;
134135}
0 commit comments