Changeset 51605 in vbox for trunk/src/VBox/Frontends/VBoxSDL
- Timestamp:
- Jun 11, 2014 12:57:05 PM (10 years ago)
- Location:
- trunk/src/VBox/Frontends/VBoxSDL
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VBoxSDL/Framebuffer.cpp
r51547 r51605 284 284 285 285 /** 286 * Lock the framebuffer (make its address immutable).287 *288 * @returns COM status code289 */290 STDMETHODIMP VBoxSDLFB::Lock()291 {292 LogFlow(("VBoxSDLFB::Lock\n"));293 RTCritSectEnter(&mUpdateLock);294 return S_OK;295 }296 297 /**298 * Unlock the framebuffer.299 *300 * @returns COM status code301 */302 STDMETHODIMP VBoxSDLFB::Unlock()303 {304 LogFlow(("VBoxSDLFB::Unlock\n"));305 RTCritSectLeave(&mUpdateLock);306 return S_OK;307 }308 309 /**310 * Return the framebuffer start address.311 *312 * @returns COM status code.313 * @param address Pointer to result variable.314 */315 STDMETHODIMP VBoxSDLFB::COMGETTER(Address)(BYTE **address)316 {317 LogFlow(("VBoxSDLFB::GetAddress\n"));318 if (!address)319 return E_INVALIDARG;320 321 if (!mSurfVRAM)322 {323 /* That's actually rather bad. */324 AssertMsgFailed(("mSurfVRAM is NULL!\n"));325 return E_FAIL;326 }327 328 *address = (BYTE *) mSurfVRAM->pixels;329 LogFlow(("VBoxSDL::GetAddress returning %p\n", *address));330 return S_OK;331 }332 333 /**334 286 * Return the current framebuffer color depth. 335 287 * … … 370 322 return E_POINTER; 371 323 *pixelFormat = FramebufferPixelFormat_FOURCC_RGB; 372 return S_OK;373 }374 375 STDMETHODIMP VBoxSDLFB::COMGETTER(UsesGuestVRAM) (BOOL *usesGuestVRAM)376 {377 if (!usesGuestVRAM)378 return E_POINTER;379 *usesGuestVRAM = TRUE;380 324 return S_OK; 381 325 } -
trunk/src/VBox/Frontends/VBoxSDL/Framebuffer.h
r51547 r51605 74 74 STDMETHOD(COMGETTER(Width))(ULONG *width); 75 75 STDMETHOD(COMGETTER(Height))(ULONG *height); 76 STDMETHOD(Lock)();77 STDMETHOD(Unlock)();78 STDMETHOD(COMGETTER(Address))(BYTE **address);79 76 STDMETHOD(COMGETTER(BitsPerPixel))(ULONG *bitsPerPixel); 80 77 STDMETHOD(COMGETTER(BytesPerLine))(ULONG *bytesPerLine); 81 78 STDMETHOD(COMGETTER(PixelFormat)) (ULONG *pixelFormat); 82 STDMETHOD(COMGETTER(UsesGuestVRAM)) (BOOL *usesGuestVRAM);83 79 STDMETHOD(COMGETTER(HeightReduction)) (ULONG *heightReduction); 84 80 STDMETHOD(COMGETTER(Overlay)) (IFramebufferOverlay **aOverlay);
Note:
See TracChangeset
for help on using the changeset viewer.