Changeset 26630 in vbox for trunk/src/VBox/Additions/WINNT/Graphics/Miniport/VBoxVideo.cpp
- Timestamp:
- Feb 18, 2010 3:47:33 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Additions/WINNT/Graphics/Miniport/VBoxVideo.cpp
r26556 r26630 760 760 if (DeviceExtension->CurrentMode == 0) 761 761 #else 762 if (!DeviceExtension->cSources || !DeviceExtension->aSources[0]. ulFrameBufferSize)762 if (!DeviceExtension->cSources || !DeviceExtension->aSources[0].pAllocation) 763 763 #endif 764 764 { … … 790 790 } 791 791 #else 792 if (DeviceExtension->cSources && DeviceExtension->aSources[0]. ulFrameBufferSize)792 if (DeviceExtension->cSources && DeviceExtension->aSources[0].pAllocation) 793 793 { 794 794 if (!xres) 795 xres = DeviceExtension->aSources[0]. VisScreenWidth;795 xres = DeviceExtension->aSources[0].pAllocation->u.SurfInfo.width; 796 796 if (!yres) 797 yres = DeviceExtension->aSources[0]. VisScreenHeight;797 yres = DeviceExtension->aSources[0].pAllocation->u.SurfInfo.height; 798 798 if (!bpp) 799 bpp = DeviceExtension->aSources[0]. BitsPerPlane;799 bpp = DeviceExtension->aSources[0].pAllocation->u.SurfInfo.bpp; 800 800 } 801 801 #endif … … 824 824 if (DeviceExtension->CurrentMode != 0) 825 825 #else 826 if (DeviceExtension->cSources && DeviceExtension->aSources[0]. ulFrameBufferSize)826 if (DeviceExtension->cSources && DeviceExtension->aSources[0].pAllocation) 827 827 #endif 828 828 { … … 904 904 if (DeviceExtension->CurrentMode == 0) 905 905 #else 906 if (!DeviceExtension->cSources || !DeviceExtension->aSources[0]. ulFrameBufferSize)906 if (!DeviceExtension->cSources || !DeviceExtension->aSources[0].pAllocation) 907 907 #endif 908 908 { … … 2498 2498 return TRUE; 2499 2499 } 2500 #else2501 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 #endif2510 2500 2511 2501 /* set the mode characteristics */ … … 2527 2517 */ 2528 2518 // 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 2529 2549 return TRUE; 2530 2550 }
Note:
See TracChangeset
for help on using the changeset viewer.