Changeset 44306 in vbox for trunk/src/VBox/Additions/WINNT
- Timestamp:
- Jan 16, 2013 1:16:57 PM (12 years ago)
- svn:sync-xref-src-repo-rev:
- 83229
- Location:
- trunk/src/VBox/Additions/WINNT/Graphics/Wine/wined3d
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Additions/WINNT/Graphics/Wine/wined3d/device.c
r43705 r44306 1604 1604 IWineD3DDeviceImpl *device = (IWineD3DDeviceImpl *)iface; 1605 1605 1606 if (device->focus_window) wined3d_unregister_window(device->focus_window );1606 if (device->focus_window) wined3d_unregister_window(device->focus_window, device); 1607 1607 device->focus_window = NULL; 1608 1608 #else … … 7667 7667 { 7668 7668 TRACE("unregister window %p.\n", window); 7669 wined3d_unregister_window(window );7669 wined3d_unregister_window(window, NULL); 7670 7670 7671 7671 if (device->focus_window == window) device->focus_window = NULL; -
trunk/src/VBox/Additions/WINNT/Graphics/Wine/wined3d/glsl_shader.c
r43488 r44306 3971 3971 unsigned int i; 3972 3972 char reg_mask[6]; 3973 3974 if (!ps) 3975 return; 3973 3976 3974 3977 for (i = 0, map = ps->baseShader.reg_maps.texcoord; map && i < min(8, MAX_REG_TEXCRD); map >>= 1, ++i) -
trunk/src/VBox/Additions/WINNT/Graphics/Wine/wined3d/swapchain.c
r42971 r44306 520 520 521 521 #ifdef VBOX_WITH_WDDM 522 /* We're directly using wglMakeCurrent calls skipping GDI layer, which causes GDI SwapBuffers to fail trying to 523 * call glFinish, which doesn't have any context set. So we use wglSwapLayerBuffers directly as well. 524 */ 525 pwglSwapLayerBuffers(context->currentSwapchain->hDC, WGL_SWAP_MAIN_PLANE); 522 SwapBuffers(context->currentSwapchain->hDC); 526 523 #else 527 # ifdef VBOX_WINE_WITH_SINGLE_SWAPCHAIN_CONTEXT528 pwglSwapLayerBuffers(context->hdc, WGL_SWAP_MAIN_PLANE);529 # else530 524 SwapBuffers(context->hdc); /* TODO: cycle through the swapchain buffers */ 531 # endif532 525 #endif 533 526 -
trunk/src/VBox/Additions/WINNT/Graphics/Wine/wined3d/wined3d_gl.h
r43488 r44306 1381 1381 BOOL (WINAPI *pwglSwapLayerBuffers)(HDC, UINT) DECLSPEC_HIDDEN; 1382 1382 BOOL (WINAPI *pwglShareLists)(HGLRC, HGLRC) DECLSPEC_HIDDEN; 1383 BOOL (WINAPI *pwglChoosePixelFormat)(HDC, const PIXELFORMATDESCRIPTOR *) DECLSPEC_HIDDEN; 1384 int (WINAPI *pwglDescribePixelFormat)(HDC, int, UINT, LPPIXELFORMATDESCRIPTOR) DECLSPEC_HIDDEN; 1385 int (WINAPI *pwglGetPixelFormat)(HDC) DECLSPEC_HIDDEN; 1386 BOOL (WINAPI *pwglSetPixelFormat)(HDC, int, const PIXELFORMATDESCRIPTOR *) DECLSPEC_HIDDEN; 1383 1387 1384 1388 HGLRC (WINAPI *pVBoxCreateContext)(HDC, struct VBOXUHGSMI*) DECLSPEC_HIDDEN; 1385 1389 void (WINAPI *pVBoxFlushToHost)(HGLRC) DECLSPEC_HIDDEN; 1390 1391 #if defined(VBOX_WITH_WDDM) || defined(VBOX_WINE_WITH_SINGLE_SWAPCHAIN_CONTEXT) 1392 # define VBOX_WINE_WITH_DIRECT_VBOXOGL 1393 #endif 1394 1395 #ifdef VBOX_WINE_WITH_DIRECT_VBOXOGL 1396 /* make sure we used stuff from VBoxOGL 1397 * we do it this way to avoid extra modifications to Wine code */ 1398 1399 /* We're directly using wglMakeCurrent calls skipping GDI layer, which causes GDI SwapBuffers to fail trying to 1400 * call glFinish, which doesn't have any context set. So we use wglSwapLayerBuffers directly as well. 1401 */ 1402 # define SwapBuffers(_hdc) pwglSwapLayerBuffers((_hdc), WGL_SWAP_MAIN_PLANE) 1403 1404 /* we avoid using GDI32!*PixelFormat API and use VBoxOGL stuff directly 1405 * because SetPixelFormat may eventually lead to opengl32 setting its own window proc via SetWindowLongPtr 1406 * thus wined3d_[un]register_window stuff will become screwed up leading to infinite recursion or other misbehave */ 1407 # define ChoosePixelFormat pwglChoosePixelFormat 1408 # define DescribePixelFormat pwglDescribePixelFormat 1409 # define GetPixelFormat pwglGetPixelFormat 1410 # define SetPixelFormat pwglSetPixelFormat 1411 #endif 1386 1412 1387 1413 #define GL_FUNCS_GEN \ … … 1729 1755 USE_WGL_FUNC(wglMakeCurrent) \ 1730 1756 USE_WGL_FUNC(wglShareLists) \ 1731 USE_WGL_FUNC(wglSwapLayerBuffers) 1757 USE_WGL_FUNC(wglSwapLayerBuffers) \ 1758 USE_WGL_FUNC(wglChoosePixelFormat) \ 1759 USE_WGL_FUNC(wglDescribePixelFormat) \ 1760 USE_WGL_FUNC(wglGetPixelFormat) \ 1761 USE_WGL_FUNC(wglSetPixelFormat) 1732 1762 1733 1763 #define VBOX_FUNCS_GEN \ -
trunk/src/VBox/Additions/WINNT/Graphics/Wine/wined3d/wined3d_main.c
r40986 r44306 465 465 wined3d_mutex_lock(); 466 466 467 entry = wined3d_find_wndproc(window); 468 if (entry) 469 { 470 ERR("window is registered already!"); 471 entry->device = device; 472 wined3d_mutex_unlock(); 473 return TRUE; 474 } 475 467 476 if (wndproc_table.size == wndproc_table.count) 468 477 { … … 488 497 entry->proc = (WNDPROC)SetWindowLongPtrW(window, GWLP_WNDPROC, (LONG_PTR)wined3d_wndproc); 489 498 entry->device = device; 499 Assert(entry->proc != wined3d_wndproc); 490 500 491 501 wined3d_mutex_unlock(); … … 494 504 } 495 505 496 void wined3d_unregister_window(HWND window )506 void wined3d_unregister_window(HWND window, struct IWineD3DDeviceImpl *device) 497 507 { 498 508 unsigned int i; … … 504 514 { 505 515 struct wined3d_wndproc *entry = &wndproc_table.entries[i]; 506 struct wined3d_wndproc *last = &wndproc_table.entries[--wndproc_table.count]; 507 508 if (GetWindowLongPtrW(window, GWLP_WNDPROC) == (LONG_PTR)wined3d_wndproc) 509 SetWindowLongPtrW(window, GWLP_WNDPROC, (LONG_PTR)entry->proc); 510 if (entry != last) *entry = *last; 516 517 if (!device || device == entry->device) 518 { 519 struct wined3d_wndproc *last = &wndproc_table.entries[--wndproc_table.count]; 520 521 if (GetWindowLongPtrW(window, GWLP_WNDPROC) == (LONG_PTR)wined3d_wndproc) 522 SetWindowLongPtrW(window, GWLP_WNDPROC, (LONG_PTR)entry->proc); 523 if (entry != last) *entry = *last; 524 } 525 else 526 { 527 ERR("request to unregister a window of a not-owning device"); 528 } 511 529 wined3d_mutex_unlock(); 512 530 -
trunk/src/VBox/Additions/WINNT/Graphics/Wine/wined3d/wined3d_private.h
r43488 r44306 1665 1665 #ifndef VBOX_WITH_WDDM 1666 1666 BOOL wined3d_register_window(HWND window, struct IWineD3DDeviceImpl *device) DECLSPEC_HIDDEN; 1667 void wined3d_unregister_window(HWND window ) DECLSPEC_HIDDEN;1667 void wined3d_unregister_window(HWND window, struct IWineD3DDeviceImpl *device) DECLSPEC_HIDDEN; 1668 1668 #endif 1669 1669
Note:
See TracChangeset
for help on using the changeset viewer.