VirtualBox

Ignore:
Timestamp:
Feb 18, 2010 3:47:33 PM (15 years ago)
Author:
vboxsync
Message:

wddm: more impl

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Additions/WINNT/Graphics/Miniport/VBoxVideo.cpp

    r26556 r26630  
    760760        if (DeviceExtension->CurrentMode == 0)
    761761#else
    762         if (!DeviceExtension->cSources || !DeviceExtension->aSources[0].ulFrameBufferSize)
     762        if (!DeviceExtension->cSources || !DeviceExtension->aSources[0].pAllocation)
    763763#endif
    764764        {
     
    790790        }
    791791#else
    792         if (DeviceExtension->cSources && DeviceExtension->aSources[0].ulFrameBufferSize)
     792        if (DeviceExtension->cSources && DeviceExtension->aSources[0].pAllocation)
    793793        {
    794794            if (!xres)
    795                 xres = DeviceExtension->aSources[0].VisScreenWidth;
     795                xres = DeviceExtension->aSources[0].pAllocation->u.SurfInfo.width;
    796796            if (!yres)
    797                 yres = DeviceExtension->aSources[0].VisScreenHeight;
     797                yres = DeviceExtension->aSources[0].pAllocation->u.SurfInfo.height;
    798798            if (!bpp)
    799                 bpp  = DeviceExtension->aSources[0].BitsPerPlane;
     799                bpp  = DeviceExtension->aSources[0].pAllocation->u.SurfInfo.bpp;
    800800        }
    801801#endif
     
    824824                if (DeviceExtension->CurrentMode != 0)
    825825#else
    826                 if (DeviceExtension->cSources && DeviceExtension->aSources[0].ulFrameBufferSize)
     826                if (DeviceExtension->cSources && DeviceExtension->aSources[0].pAllocation)
    827827#endif
    828828                {
     
    904904                if (DeviceExtension->CurrentMode == 0)
    905905#else
    906                 if (!DeviceExtension->cSources || !DeviceExtension->aSources[0].ulFrameBufferSize)
     906                if (!DeviceExtension->cSources || !DeviceExtension->aSources[0].pAllocation)
    907907#endif
    908908                {
     
    24982498        return TRUE;
    24992499    }
    2500 #else
    2501     Assert(!srcId);
    2502 
    2503     if (srcId)
    2504     {
    2505         dprintf(("VBoxVideo::VBoxVideoSetCurrentMode: Skipping for ? non-primary ? source ? %d\n",
    2506                 srcId));
    2507         return TRUE;
    2508     }
    2509 #endif
    25102500
    25112501    /* set the mode characteristics */
     
    25272517     */
    25282518    // VBoxVideoSetGraphicsCap(TRUE);
     2519#else
     2520    Assert(!srcId);
     2521
     2522    if (srcId)
     2523    {
     2524        dprintf(("VBoxVideo::VBoxVideoSetCurrentMode: Skipping for ? non-primary ? source ? %d\n",
     2525                srcId));
     2526        return TRUE;
     2527    }
     2528
     2529    /* set the mode characteristics */
     2530    VBoxVideoCmnPortWriteUshort((PUSHORT)VBE_DISPI_IOPORT_INDEX, VBE_DISPI_INDEX_XRES);
     2531    VBoxVideoCmnPortWriteUshort((PUSHORT)VBE_DISPI_IOPORT_DATA, (USHORT)ModeInfo->pAllocation->u.SurfInfo.width);
     2532    VBoxVideoCmnPortWriteUshort((PUSHORT)VBE_DISPI_IOPORT_INDEX, VBE_DISPI_INDEX_YRES);
     2533    VBoxVideoCmnPortWriteUshort((PUSHORT)VBE_DISPI_IOPORT_DATA, (USHORT)ModeInfo->pAllocation->u.SurfInfo.height);
     2534    VBoxVideoCmnPortWriteUshort((PUSHORT)VBE_DISPI_IOPORT_INDEX, VBE_DISPI_INDEX_BPP);
     2535    VBoxVideoCmnPortWriteUshort((PUSHORT)VBE_DISPI_IOPORT_DATA, (USHORT)ModeInfo->pAllocation->u.SurfInfo.bpp);
     2536    /* enable the mode */
     2537    VBoxVideoCmnPortWriteUshort((PUSHORT)VBE_DISPI_IOPORT_INDEX, VBE_DISPI_INDEX_ENABLE);
     2538    VBoxVideoCmnPortWriteUshort((PUSHORT)VBE_DISPI_IOPORT_DATA, VBE_DISPI_ENABLED | VBE_DISPI_LFB_ENABLED);
     2539    /** @todo read from the port to see if the mode switch was successful */
     2540
     2541    /* Tell the host that we now support graphics in the additions.
     2542     * @todo: Keep old behaviour, because VBoxVideoResetDevice is called on every graphics
     2543     *        mode switch and causes an OFF/ON sequence which is not handled by frontends
     2544     *        (for example Qt GUI debug build asserts when seamless is being enabled).
     2545     */
     2546    // VBoxVideoSetGraphicsCap(TRUE);
     2547
     2548#endif
    25292549    return TRUE;
    25302550}
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