VirtualBox

Ignore:
Timestamp:
Aug 18, 2010 12:10:29 PM (14 years ago)
Author:
vboxsync
Message:

wddm: multi-screen fixes

Location:
trunk/src/VBox/Additions/WINNT/Graphics
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Additions/WINNT/Graphics/Display/wddm/VBoxScreen.cpp

    r31687 r31756  
    416416    HRESULT hr = S_FALSE;
    417417
    418     Assert(0);
    419 
    420418    if (!pMon->bInited)
    421419    {
     
    527525    {
    528526        DWORD dwErr = WaitForSingleObject(pMon->hThread, INFINITE);
    529         if (dwErr != WAIT_OBJECT_0)
     527        if (dwErr == WAIT_OBJECT_0)
     528        {
     529            CloseHandle(pMon->hThread);
     530            pMon->hThread = 0;
     531        }
     532        else
    530533        {
    531534            DWORD winErr = GetLastError();
     
    537540    {
    538541        DWORD winErr = GetLastError();
    539         hr = HRESULT_FROM_WIN32(winErr);
    540         Assert(0);
    541     }
    542 
    543     return hr;
    544 }
    545 
     542        Assert(winErr != ERROR_SUCCESS);
     543        if (winErr != ERROR_INVALID_THREAD_ID)
     544        {
     545            hr = HRESULT_FROM_WIN32(winErr);
     546            Assert(0);
     547        }
     548        /* else - treat as OK */
     549    }
     550
     551    return hr;
     552}
     553
  • trunk/src/VBox/Additions/WINNT/Graphics/Miniport/VBoxVideo.h

    r31687 r31756  
    156156} VBOXWDDM_POINTER_INFO, *PVBOXWDDM_POINTER_INFO;
    157157
     158typedef struct VBOXWDDM_GLOBAL_POINTER_INFO
     159{
     160    uint32_t cVisible;
     161} VBOXWDDM_GLOBAL_POINTER_INFO, *PVBOXWDDM_GLOBAL_POINTER_INFO;
     162
    158163#ifdef VBOX_WITH_VIDEOHWACCEL
    159164typedef struct VBOXWDDM_VHWA
     
    308313   volatile uint32_t cContexts3D;
    309314   volatile uint32_t cDMACmdsOutstanding;
     315
     316   VBOXWDDM_GLOBAL_POINTER_INFO PointerInfo;
    310317
    311318   VBOXSHGSMILIST CtlList;
  • trunk/src/VBox/Additions/WINNT/Graphics/Miniport/wddm/VBoxVideoWddm.cpp

    r31687 r31756  
    26682668    PDEVICE_EXTENSION pDevExt = (PDEVICE_EXTENSION)hAdapter;
    26692669    PVBOXWDDM_POINTER_INFO pPointerInfo = &pDevExt->aSources[pSetPointerPosition->VidPnSourceId].PointerInfo;
     2670    PVBOXWDDM_GLOBAL_POINTER_INFO pGlobalPointerInfo = &pDevExt->PointerInfo;
    26702671    PVIDEO_POINTER_ATTRIBUTES pPointerAttributes = &pPointerInfo->Attributes.data;
    26712672    BOOLEAN bNotifyVisibility;
    26722673    if (pSetPointerPosition->Flags.Visible)
    26732674    {
    2674         bNotifyVisibility = !(pPointerAttributes->Enable & VBOX_MOUSE_POINTER_VISIBLE);
    2675         pPointerAttributes->Enable |= VBOX_MOUSE_POINTER_VISIBLE;
     2675        bNotifyVisibility = (pGlobalPointerInfo->cVisible == 0);
     2676        if (!(pPointerAttributes->Enable & VBOX_MOUSE_POINTER_VISIBLE))
     2677        {
     2678            ++pGlobalPointerInfo->cVisible;
     2679            pPointerAttributes->Enable |= VBOX_MOUSE_POINTER_VISIBLE;
     2680        }
    26762681    }
    26772682    else
    26782683    {
    2679         bNotifyVisibility = !!(pPointerAttributes->Enable & VBOX_MOUSE_POINTER_VISIBLE);
    2680         pPointerAttributes->Enable &= ~VBOX_MOUSE_POINTER_VISIBLE;
     2684        if (!!(pPointerAttributes->Enable & VBOX_MOUSE_POINTER_VISIBLE))
     2685        {
     2686            --pGlobalPointerInfo->cVisible;
     2687            Assert(pGlobalPointerInfo->cVisible < UINT32_MAX/2);
     2688            pPointerAttributes->Enable &= ~VBOX_MOUSE_POINTER_VISIBLE;
     2689            bNotifyVisibility = (pGlobalPointerInfo->cVisible == 0);
     2690        }
    26812691    }
    26822692
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette