Changeset 34210 in vbox for trunk/src/VBox/Additions/common/crOpenGL/fakedri_drv.c
- Timestamp:
- Nov 19, 2010 4:28:15 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Additions/common/crOpenGL/fakedri_drv.c
r34204 r34210 242 242 if (sym->st_size<5) 243 243 { 244 if (crStrcmp(psFuncName, "glXCreateGLXPixmapMESA")) 244 /*@todo we don't really know the size of targeted static function, but it's long enough in practice. We will also patch same place twice, but it's ok.*/ 245 if (!crStrcmp(psFuncName, "glXDestroyContext") || !crStrcmp(psFuncName, "glXFreeContextEXT")) 246 { 247 if (((unsigned char*)dlip.dli_saddr)[0]==0xEB) 248 { 249 /*it's a rel8 jmp, so we're going to patch the place it targets instead of jmp itself*/ 250 dlip.dli_saddr = (void*) ((intptr_t)dlip.dli_saddr + ((char*)dlip.dli_saddr)[1] + 2); 251 sym->st_size = FAKEDRI_JMP64_PATCH_SIZE; 252 } 253 else 254 { 255 crError("Can't patch size is too small.(%s)", psFuncName); 256 return; 257 } 258 } 259 else if (!crStrcmp(psFuncName, "glXCreateGLXPixmapMESA")) 260 { 261 /*@todo it's just a return 0, which we're fine with for now*/ 262 return; 263 } 264 else 245 265 { 246 266 crError("Can't patch size is too small.(%s)", psFuncName); 267 return; 247 268 } 248 return;249 269 } 250 270
Note:
See TracChangeset
for help on using the changeset viewer.