Changeset 53965 in vbox for trunk/src/VBox/Devices/Graphics
- Timestamp:
- Jan 26, 2015 8:37:10 PM (10 years ago)
- Location:
- trunk/src/VBox/Devices/Graphics
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/Graphics/DevVGA.cpp
r53782 r53965 6064 6064 #endif 6065 6065 pThis->IPort.pfnSendModeHint = vbvaPortSendModeHint; 6066 pThis->IPort.pfnReportHostCursorCapabilities 6067 = vbvaPortReportHostCursorCapabilities; 6068 pThis->IPort.pfnReportHostCursorPosition 6069 = vbvaPortReportHostCursorPosition; 6066 6070 6067 6071 #if defined(VBOX_WITH_HGSMI) -
trunk/src/VBox/Devices/Graphics/DevVGA.h
r53788 r53965 557 557 uint32_t fGuestCaps; 558 558 uint32_t fScanLineCfg; 559 uint 8_t Padding10[4];559 uint32_t fHostCursorCapabilities; 560 560 # else 561 561 uint8_t Padding10[14]; … … 692 692 uint32_t dy, uint32_t fEnabled, 693 693 uint32_t fNotifyGuest); 694 DECLCALLBACK(void) vbvaPortReportHostCursorCapabilities(PPDMIDISPLAYPORT pInterface, uint32_t fCapabilitiesAdded, 695 uint32_t fCapabilitiesRemoved); 696 DECLCALLBACK(void) vbvaPortReportHostCursorPosition(PPDMIDISPLAYPORT pInterface, uint32_t x, uint32_t y); 694 697 695 698 # ifdef VBOX_WITH_VDMA -
trunk/src/VBox/Devices/Graphics/DevVGA_VBVA.cpp
r53813 r53965 83 83 VBVAMOUSESHAPEINFO mouseShapeInfo; 84 84 bool fPaused; 85 uint32_t xCursor; 86 uint32_t yCursor; 85 87 VBVAMODEHINT aModeHints[VBOX_VIDEO_MAX_SCREENS]; 86 88 } VBVACONTEXT; … … 2179 2181 pConf32->u32Value = 64*_1K; 2180 2182 } 2181 else if (pConf32->u32Index == VBOX_VBVA_CONF32_MODE_HINT_REPORTING) 2183 else if ( pConf32->u32Index == VBOX_VBVA_CONF32_MODE_HINT_REPORTING 2184 || pConf32->u32Index == VBOX_VBVA_CONF32_GUEST_CURSOR_REPORTING) 2182 2185 { 2183 2186 pConf32->u32Value = VINF_SUCCESS; 2187 } 2188 else if (pConf32->u32Index == VBOX_VBVA_CONF32_CURSOR_CAPABILITIES) 2189 { 2190 pConf32->u32Value = pVGAState->fHostCursorCapabilities; 2184 2191 } 2185 2192 else … … 2483 2490 Assert(pbHint - (uint8_t *)pvBuffer <= cbBuffer); 2484 2491 } 2492 } break; 2493 2494 case VBVA_REPORT_INPUT_MAPPING: 2495 { 2496 if (cbBuffer != sizeof(VBVAREPORTINPUTMAPPING)) 2497 { 2498 rc = VERR_INVALID_PARAMETER; 2499 break; 2500 } 2501 VBVAREPORTINPUTMAPPING *pReport = (VBVAREPORTINPUTMAPPING *)pvBuffer; 2502 LogRelFlowFunc(("VBVA_REPORT_INPUT_MAPPING: x=%u, y=%u, cx=%u, cy=%u\n", (unsigned)pReport->x, (unsigned)pReport->y, 2503 (unsigned)pReport->cx, (unsigned)pReport->cy)); 2504 pVGAState->pDrv->pfnVBVAInputMappingUpdate(pVGAState->pDrv, pReport->x, pReport->y, pReport->cx, pReport->cy); 2505 } break; 2506 2507 case VBVA_CURSOR_POSITION: 2508 { 2509 if (cbBuffer != sizeof(VBVACURSORPOSITION)) 2510 { 2511 rc = VERR_INVALID_PARAMETER; 2512 break; 2513 } 2514 VBVACURSORPOSITION *pReport 2515 = (VBVACURSORPOSITION *)pvBuffer; 2516 LogRelFlowFunc(("VBVA_CURSOR_POSITION: fReportPosition=%RTbool", 2517 RT_BOOL(pReport->fReportPosition))); 2518 if (RT_BOOL(pReport->fReportPosition)) 2519 LogRelFlowFunc(("VBVA_CURSOR_POSITION: fReportPosition=true, x=%u, y=%u\n", 2520 (unsigned)pReport->x, (unsigned)pReport->y)); 2521 else 2522 LogRelFlowFunc(("VBVA_CURSOR_POSITION: fReportPosition=false\n")); 2523 pReport->x = pCtx->xCursor; 2524 pReport->y = pCtx->yCursor; 2485 2525 } break; 2486 2526 … … 2622 2662 } 2623 2663 2664 DECLCALLBACK(void) vbvaPortReportHostCursorCapabilities(PPDMIDISPLAYPORT pInterface, uint32_t fCapabilitiesAdded, 2665 uint32_t fCapabilitiesRemoved) 2666 { 2667 PVGASTATE pThis = IDISPLAYPORT_2_VGASTATE(pInterface); 2668 int rc = PDMCritSectEnter(&pThis->CritSect, VERR_SEM_BUSY); 2669 AssertRC(rc); 2670 pThis->fHostCursorCapabilities |= fCapabilitiesAdded; 2671 pThis->fHostCursorCapabilities &= ~fCapabilitiesRemoved; 2672 if (pThis->fGuestCaps & VBVACAPS_IRQ) 2673 VBVARaiseIrqNoWait(pThis, HGSMIHOSTFLAGS_CURSOR_CAPABILITIES); 2674 PDMCritSectLeave(&pThis->CritSect); 2675 } 2676 2677 DECLCALLBACK(void) vbvaPortReportHostCursorPosition 2678 (PPDMIDISPLAYPORT pInterface, uint32_t x, uint32_t y) 2679 { 2680 PVGASTATE pThis = IDISPLAYPORT_2_VGASTATE(pInterface); 2681 VBVACONTEXT *pCtx = (VBVACONTEXT *)HGSMIContext(pThis->pHGSMI); 2682 int rc = PDMCritSectEnter(&pThis->CritSect, VERR_SEM_BUSY); 2683 AssertRC(rc); 2684 pCtx->xCursor = x; 2685 pCtx->yCursor = y; 2686 PDMCritSectLeave(&pThis->CritSect); 2687 } 2688 2624 2689 static HGSMICHANNELHANDLER sOldChannelHandler; 2625 2690 … … 2653 2718 pCtx->fPaused = true; 2654 2719 memset(pCtx->aModeHints, ~0, sizeof(*pCtx->aModeHints)); 2720 pVGAState->fHostCursorCapabilities = 0; 2655 2721 } 2656 2722 }
Note:
See TracChangeset
for help on using the changeset viewer.