src/video/x11/SDL_x11dyn.c
changeset 2325 c7bcf84ba1b9
parent 2120 2c835d58faad
child 2763 6fc50bdd88c0
equal deleted inserted replaced
2324:3202e4826c57 2325:c7bcf84ba1b9
    96 #endif /* SDL_VIDEO_DRIVER_X11_DYNAMIC */
    96 #endif /* SDL_VIDEO_DRIVER_X11_DYNAMIC */
    97 
    97 
    98 /* Annoying varargs entry point... */
    98 /* Annoying varargs entry point... */
    99 #ifdef X_HAVE_UTF8_STRING
    99 #ifdef X_HAVE_UTF8_STRING
   100 XIC(*pXCreateIC) (XIM,...) = NULL;
   100 XIC(*pXCreateIC) (XIM,...) = NULL;
       
   101 char *(*pXGetICValues) (XIC, ...) = NULL;
   101 #endif
   102 #endif
   102 
   103 
   103 /* These SDL_X11_HAVE_* flags are here whether you have dynamic X11 or not. */
   104 /* These SDL_X11_HAVE_* flags are here whether you have dynamic X11 or not. */
   104 #define SDL_X11_MODULE(modname) int SDL_X11_HAVE_##modname = 1;
   105 #define SDL_X11_MODULE(modname) int SDL_X11_HAVE_##modname = 1;
   105 #define SDL_X11_SYM(rc,fn,params,args,ret)
   106 #define SDL_X11_SYM(rc,fn,params,args,ret)
   126 #undef SDL_X11_MODULE
   127 #undef SDL_X11_MODULE
   127 #undef SDL_X11_SYM
   128 #undef SDL_X11_SYM
   128 
   129 
   129 #ifdef X_HAVE_UTF8_STRING
   130 #ifdef X_HAVE_UTF8_STRING
   130             pXCreateIC = NULL;
   131             pXCreateIC = NULL;
       
   132             pXGetICValues = NULL;
   131 #endif
   133 #endif
   132 
   134 
   133             for (i = 0; i < SDL_TABLESIZE(x11libs); i++) {
   135             for (i = 0; i < SDL_TABLESIZE(x11libs); i++) {
   134                 if (x11libs[i].lib != NULL) {
   136                 if (x11libs[i].lib != NULL) {
   135                     SDL_UnloadObject(x11libs[i].lib);
   137                     SDL_UnloadObject(x11libs[i].lib);
   163 #undef SDL_X11_MODULE
   165 #undef SDL_X11_MODULE
   164 #undef SDL_X11_SYM
   166 #undef SDL_X11_SYM
   165 
   167 
   166 #ifdef X_HAVE_UTF8_STRING
   168 #ifdef X_HAVE_UTF8_STRING
   167         X11_GetSym("XCreateIC", &SDL_X11_HAVE_UTF8, (void **) &pXCreateIC);
   169         X11_GetSym("XCreateIC", &SDL_X11_HAVE_UTF8, (void **) &pXCreateIC);
       
   170         X11_GetSym("XGetICValues", &SDL_X11_HAVE_UTF8,
       
   171                    (void **) &pXGetICValues);
   168 #endif
   172 #endif
   169 
   173 
   170         if (SDL_X11_HAVE_BASEXLIB) {
   174         if (SDL_X11_HAVE_BASEXLIB) {
   171             /* all required symbols loaded. */
   175             /* all required symbols loaded. */
   172             SDL_ClearError();
   176             SDL_ClearError();
   177         }
   181         }
   178     }
   182     }
   179 #else
   183 #else
   180 #ifdef X_HAVE_UTF8_STRING
   184 #ifdef X_HAVE_UTF8_STRING
   181     pXCreateIC = XCreateIC;
   185     pXCreateIC = XCreateIC;
       
   186     pXGetICValues = XGetICValues;
   182 #endif
   187 #endif
   183 #endif
   188 #endif
   184 
   189 
   185     return rc;
   190     return rc;
   186 }
   191 }