Changeset 46528 in vbox for trunk/src/VBox/Additions/common
- Timestamp:
- Jun 13, 2013 12:32:47 PM (12 years ago)
- svn:sync-xref-src-repo-rev:
- 86384
- Location:
- trunk/src/VBox/Additions/common/crOpenGL
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Additions/common/crOpenGL/load.c
r44457 r46528 48 48 #endif 49 49 50 #ifdef WINDOWS51 static char* gsViewportHackApps[] = {"googleearth.exe", NULL};52 #endif53 54 50 static bool stub_initialized = 0; 55 51 #ifdef WINDOWS … … 247 243 stubCheckWindowsState(); 248 244 /* call the original SPU glViewport function */ 249 if (!stub.viewportHack) 250 { 251 origViewport(x, y, w, h); 252 } 253 else 254 { 255 ContextInfo *context = stubGetCurrentContext(); 256 int winX, winY; 257 unsigned int winW, winH; 258 WindowInfo *pWindow; 259 pWindow = context->currentDrawable; 260 stubGetWindowGeometry(pWindow, &winX, &winY, &winW, &winH); 261 origViewport(0, 0, winW, winH); 262 } 245 origViewport(x, y, w, h); 263 246 } 264 247 … … 305 288 stub.spuDispatch.Viewport = trapViewport; 306 289 307 if (stub.viewportHack)308 stub.spuDispatch.Scissor = trapScissor;309 290 /*stub.spuDispatch.SwapBuffers = trapSwapBuffers; 310 291 stub.spuDispatch.DrawBuffer = trapDrawBuffer;*/ … … 753 734 crNetSetKey(key,sizeof(key)); 754 735 stub.force_pbuffers = 0; 755 stub.viewportHack = 0; 756 757 #ifdef WINDOWS 758 { 759 char name[1000]; 760 int i; 761 736 737 #ifdef WINDOWS 762 738 # ifdef VBOX_WITH_WDDM 763 739 stub.bRunningUnderWDDM = false; 764 740 # endif 765 /* Apply viewport hack only if we're running under wine */766 if (NULL!=GetModuleHandle("wined3d.dll") || NULL != GetModuleHandle("wined3dwddm.dll"))767 {768 crGetProcName(name, 1000);769 for (i=0; gsViewportHackApps[i]; ++i)770 {771 if (!stricmp(name, gsViewportHackApps[i]))772 {773 stub.viewportHack = 1;774 break;775 }776 }777 }778 }779 741 #endif 780 742 } -
trunk/src/VBox/Additions/common/crOpenGL/stub.h
r43487 r46528 223 223 char *spu_dir; 224 224 int force_pbuffers; 225 int viewportHack;226 225 227 226 /* thread safety stuff */
Note:
See TracChangeset
for help on using the changeset viewer.