Changeset 39065 in vbox for trunk/src/VBox
- Timestamp:
- Oct 20, 2011 9:47:43 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineView.cpp
r39063 r39065 311 311 #ifdef VBOX_GUI_USE_SDL 312 312 case VBoxDefs::SDLMode: 313 { 313 314 /* Indicate that we are doing all drawing stuff ourself: */ 314 315 // TODO_NEW_CORE … … 318 319 XFlush(QX11Info::display()); 319 320 # endif /* Q_WS_X11 */ 321 UIFrameBuffer* pFrameBuffer = uisession()->frameBuffer(screenId()); 322 if (pFrameBuffer) 323 pFrameBuffer->setView(this); 324 else 325 { 320 326 # if defined(VBOX_WITH_VIDEOHWACCEL) && defined(DEBUG_misha) /* not tested yet */ 321 if (m_fAccelerate2DVideo) 322 { 323 class UIFrameBuffer* pFramebuffer = uisession()->frameBuffer(screenId()); 324 if (pFramebuffer) 325 pFramebuffer->setView(this); 327 if (m_fAccelerate2DVideo) 328 { 329 /** these two additional template args is a workaround to 330 * this [VBox|UI] duplication 331 * @todo: they are to be removed once VBox stuff is gone */ 332 pFrameBuffer = new VBoxOverlayFrameBuffer<UIFrameBufferSDL, UIMachineView, UIResizeEvent>(this, &machineWindowWrapper()->session(), (uint32_t)screenId()); 333 } 326 334 else 327 { 328 /* these two additional template args is a workaround to this [VBox|UI] duplication 329 * @todo: they are to be removed once VBox stuff is gone */ 330 pFramebuffer = new VBoxOverlayFrameBuffer<UIFrameBufferSDL, UIMachineView, UIResizeEvent>(this, &machineWindowWrapper()->session(), (uint32_t)screenId()); 331 uisession()->setFrameBuffer(screenId(), pFramebuffer); 332 } 333 m_pFrameBuffer = pFramebuffer; 334 } 335 else 336 m_pFrameBuffer = new UIFrameBufferSDL(this); 337 # else 338 m_pFrameBuffer = new UIFrameBufferSDL(this); 339 # endif 335 pFrameBuffer = new UIFrameBufferSDL(this); 336 # else /* VBOX_WITH_VIDEOHWACCEL */ 337 pFrameBuffer = new UIFrameBufferSDL(this); 338 # endif /* !VBOX_WITH_VIDEOHWACCEL */ 339 uisession()->setFrameBuffer(screenId(), pFrameBuffer); 340 } 341 m_pFrameBuffer = pFrameBuffer; 340 342 /* Disable scrollbars because we cannot correctly draw in a scrolled window using SDL: */ 341 343 horizontalScrollBar()->setEnabled(false); 342 344 verticalScrollBar()->setEnabled(false); 343 345 break; 346 } 344 347 #endif /* VBOX_GUI_USE_SDL */ 345 348 #if 0 // TODO: Enable DDraw frame buffer! … … 503 506 QApplication::sendPostedEvents(this, VBoxDefs::ResizeEventType); 504 507 if ( m_fAccelerate2DVideo 505 || vboxGlobal().vmRenderMode() == VBoxDefs::QImageMode) 508 || vboxGlobal().vmRenderMode() == VBoxDefs::QImageMode 509 || vboxGlobal().vmRenderMode() == VBoxDefs::SDLMode) 506 510 { 507 511 Assert(m_pFrameBuffer == uisession()->frameBuffer(screenId()));
Note:
See TracChangeset
for help on using the changeset viewer.