Changeset 657 for OGRE/trunk/ogre_changes/RenderSystems/Direct3D7/src
- Timestamp:
- 02/20/06 19:06:03 (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
OGRE/trunk/ogre_changes/RenderSystems/Direct3D7/src/OgreD3D7RenderWindow.cpp
r153 r657 96 96 break; 97 97 98 case WM_MOVE:99 // Move messages need to be tracked to update the screen rects100 // used for blitting the backbuffer to the primary.101 if(win->mActive && win->mReady)102 win->windowMovedOrResized();103 break;104 105 98 case WM_ENTERSIZEMOVE: 106 99 // Prevent rendering while moving / sizing … … 113 106 break; 114 107 108 case WM_MOVE: 115 109 case WM_SIZE: 116 110 // Check to see if we are losing or gaining our window. Set the … … 391 385 void D3D7RenderWindow::swapBuffers(bool waitForVSync) 392 386 { 387 if (!mlpDDSFront) 388 return; 389 393 390 HRESULT hr; 394 391 DWORD flags; … … 423 420 { 424 421 // Restore surfaces 425 restoreDDSurfaces();422 //restoreDDSurfaces(); 426 423 } 427 424 else if (FAILED(hr)) … … 539 536 ddscaps.dwCaps = DDSCAPS_ZBUFFER; 540 537 538 if (!mlpDDSBack->IsLost()) 539 { 541 540 LPDIRECTDRAWSURFACE7 zBufSurface; 542 541 … … 546 545 zBufSurface->Release(); 547 546 zBufSurface->Release(); 547 } 548 548 549 549 // Release std buffers … … 563 563 564 564 if( FAILED( hr ) ) 565 { 566 if (hr == DDERR_WRONGMODE) 567 { 568 // Fullscreen exclusive mode problem 569 // Need to release & recreate 570 releaseDDSurfaces(); 571 createDDSurfaces(); 572 createDepthBuffer(); 573 return; 574 } 575 else 576 { 577 char szBuffer[512]; 578 D3DXGetErrorString( hr, 512, szBuffer ); 565 579 OGRE_EXCEPT( 566 580 Exception::ERR_INTERNAL_ERROR, 567 "Error restoring lost primary surface.",581 "Error restoring lost primary surface." + String(szBuffer), 568 582 "D3D7RenderWindow - restoreDDSurfaces" ); 569 583 } 584 } 585 } 570 586 571 587 if( mlpDDSBack->IsLost() ) … … 574 590 575 591 if( FAILED( hr ) ) 592 { 593 char szBuffer[512]; 594 D3DXGetErrorString( hr, 512, szBuffer ); 576 595 OGRE_EXCEPT( 577 596 Exception::ERR_INTERNAL_ERROR, 578 "Error restoring lost back buffer surface." ,597 "Error restoring lost back buffer surface." + String(szBuffer), 579 598 "D3D7RenderWindow - restoreDDSurfaces" ); 580 599 } 600 } 581 601 } 582 602 … … 592 612 ClientToScreen( mHWnd, (POINT*)&rcCheck.left ); 593 613 ClientToScreen( mHWnd, (POINT*)&rcCheck.right ); 614 615 if ((rcCheck.right - rcCheck.left) == 0 || 616 (rcCheck.bottom - rcCheck.top) == 0) 617 { 618 return; 619 } 594 620 595 621 // Has the window resized? If so, we need to recreate surfaces
Note: See TracChangeset
for help on using the changeset viewer.