void GFXPCD3D9WindowTarget::initPresentationParams() { // Get some video mode related info. GFXVideoMode vm = mWindow->getVideoMode(); // Do some validation... if(vm.fullScreen == true && mImplicit == false) { AssertISV(false, "GFXPCD3D9WindowTarget::initPresentationParams - Cannot go fullscreen with secondary window!"); } Win32Window *win = dynamic_cast<Win32Window*>(mWindow); AssertISV(win, "GFXPCD3D9WindowTarget::initPresentationParams() - got a non Win32Window window passed in! Did DX go crossplatform?"); HWND hwnd = win->getHWND(); // At some point, this will become GFXPCD3D9WindowTarget like trunk has, // so this cast isn't as bad as it looks. ;) BTR GFXPCD3D9Device* pcdevice = dynamic_cast<GFXPCD3D9Device*>(mDevice); mPresentationParams = pcdevice->setupPresentParams(vm, hwnd); if (mImplicit) { pcdevice->mMultisampleType = mPresentationParams.MultiSampleType; pcdevice->mMultisampleLevel = mPresentationParams.MultiSampleQuality; } }
void GFXPCD3D9WindowTarget::initPresentationParams() { // Get some video mode related info. GFXVideoMode vm = mWindow->getVideoMode(); // Do some validation... if(vm.fullScreen == true && mImplicit == false) { AssertISV(false, "GFXPCD3D9WindowTarget::initPresentationParams - Cannot go fullscreen with secondary window!"); } HWND hwnd = (HWND)mWindow->getSystemWindow( PlatformWindow::WindowSystem_Windows ); AssertISV(hwnd, "GFXPCD3D9WindowTarget::initPresentationParams() - no HWND"); // At some point, this will become GFXPCD3D9WindowTarget like trunk has, // so this cast isn't as bad as it looks. ;) BTR GFXPCD3D9Device* pcdevice = dynamic_cast<GFXPCD3D9Device*>(mDevice); mPresentationParams = pcdevice->setupPresentParams(vm, hwnd); if (mImplicit) { pcdevice->mMultisampleType = mPresentationParams.MultiSampleType; pcdevice->mMultisampleLevel = mPresentationParams.MultiSampleQuality; } }