Changeset 30865 in vbox for trunk/src/VBox/Additions/WINNT/Graphics/Miniport
- Timestamp:
- Jul 15, 2010 8:56:09 PM (14 years ago)
- Location:
- trunk/src/VBox/Additions/WINNT/Graphics/Miniport/wddm
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Additions/WINNT/Graphics/Miniport/wddm/VBoxVideoIf.h
r30566 r30865 231 231 AssertCompile((sizeof (VBOXDISPIFESCAPE_GETVBOXVIDEOCMCMD) & 7) == 0); 232 232 AssertCompile(RT_OFFSETOF(VBOXDISPIFESCAPE_GETVBOXVIDEOCMCMD, EscapeHdr) == 0); 233 234 typedef struct VBOXDISPIFESCAPE_DBGPRINT 235 { 236 VBOXDISPIFESCAPE EscapeHdr; 237 /* null-terminated string to DbgPrint including \0 */ 238 char aStringBuf[1]; 239 } VBOXDISPIFESCAPE_DBGPRINT, *PVBOXDISPIFESCAPE_DBGPRINT; 240 AssertCompile(RT_OFFSETOF(VBOXDISPIFESCAPE_DBGPRINT, EscapeHdr) == 0); 233 241 234 242 /* query info func */ -
trunk/src/VBox/Additions/WINNT/Graphics/Miniport/wddm/VBoxVideoVdma.cpp
r30795 r30865 146 146 { 147 147 vboxVideoLeDetach(&pPipe->CmdListHead, pDetachHead); 148 bListEmpty = IsListEmpty(pDetachHead);148 bListEmpty = !!(IsListEmpty(pDetachHead)); 149 149 pPipe->bNeedNotify = bListEmpty; 150 150 } -
trunk/src/VBox/Additions/WINNT/Graphics/Miniport/wddm/VBoxVideoWddm.cpp
r30720 r30865 2784 2784 Status = STATUS_SUCCESS; 2785 2785 break; 2786 case VBOXESC_DBGPRINT: 2787 { 2788 /* use RT_OFFSETOF instead of sizeof since sizeof will give an aligned size that might 2789 * be bigger than the VBOXDISPIFESCAPE_DBGPRINT with a data containing just a few chars */ 2790 Assert(pEscape->PrivateDriverDataSize >= RT_OFFSETOF(VBOXDISPIFESCAPE_DBGPRINT, aStringBuf[1])); 2791 /* only do DbgPrint when pEscape->PrivateDriverDataSize > RT_OFFSETOF(VBOXDISPIFESCAPE_DBGPRINT, aStringBuf[1]) 2792 * since == RT_OFFSETOF(VBOXDISPIFESCAPE_DBGPRINT, aStringBuf[1]) means the buffer contains just \0, 2793 * i.e. no need to print it */ 2794 if (pEscape->PrivateDriverDataSize > RT_OFFSETOF(VBOXDISPIFESCAPE_DBGPRINT, aStringBuf[1])) 2795 { 2796 PVBOXDISPIFESCAPE_DBGPRINT pDbgPrint = (PVBOXDISPIFESCAPE_DBGPRINT)pEscapeHdr; 2797 /* ensure the last char is \0*/ 2798 *((uint8_t*)pDbgPrint + pEscape->PrivateDriverDataSize - 1) = '\0'; 2799 DbgPrint(pDbgPrint->aStringBuf); 2800 } 2801 Status = STATUS_SUCCESS; 2802 break; 2803 } 2786 2804 default: 2805 Assert(0); 2787 2806 drprintf((__FUNCTION__": unsupported escape code (0x%x)\n", pEscapeHdr->escapeCode)); 2788 2807 break;
Note:
See TracChangeset
for help on using the changeset viewer.