D3D: Revert r4215, ector may come out a better way to do so in the future.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@4221 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
parent
a758de106d
commit
4c36a5280c
|
@ -109,13 +109,12 @@ namespace D3D
|
||||||
pp->MultiSampleType = adapters[adapter].aa_levels[aa_mode].ms_setting;
|
pp->MultiSampleType = adapters[adapter].aa_levels[aa_mode].ms_setting;
|
||||||
pp->MultiSampleQuality = adapters[adapter].aa_levels[aa_mode].qual_setting;
|
pp->MultiSampleQuality = adapters[adapter].aa_levels[aa_mode].qual_setting;
|
||||||
|
|
||||||
//pp->Flags = D3DPRESENTFLAG_DISCARD_DEPTHSTENCIL;
|
pp->Flags = D3DPRESENTFLAG_DISCARD_DEPTHSTENCIL;
|
||||||
if (fullScreen)
|
if (fullScreen)
|
||||||
{
|
{
|
||||||
xres = pp->BackBufferWidth = FSResX;
|
xres = pp->BackBufferWidth = FSResX;
|
||||||
yres = pp->BackBufferHeight = FSResY;
|
yres = pp->BackBufferHeight = FSResY;
|
||||||
//pp->SwapEffect = D3DSWAPEFFECT_DISCARD;
|
pp->SwapEffect = D3DSWAPEFFECT_DISCARD;
|
||||||
pp->SwapEffect = D3DSWAPEFFECT_COPY;
|
|
||||||
pp->Windowed = FALSE;
|
pp->Windowed = FALSE;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -123,8 +122,7 @@ namespace D3D
|
||||||
GetClientRect(hWnd, &client);
|
GetClientRect(hWnd, &client);
|
||||||
xres = pp->BackBufferWidth = client.right - client.left;
|
xres = pp->BackBufferWidth = client.right - client.left;
|
||||||
yres = pp->BackBufferHeight = client.bottom - client.top;
|
yres = pp->BackBufferHeight = client.bottom - client.top;
|
||||||
//pp->SwapEffect = D3DSWAPEFFECT_DISCARD;
|
pp->SwapEffect = D3DSWAPEFFECT_DISCARD;
|
||||||
pp->SwapEffect = D3DSWAPEFFECT_COPY;
|
|
||||||
pp->PresentationInterval = D3DPRESENT_INTERVAL_IMMEDIATE;
|
pp->PresentationInterval = D3DPRESENT_INTERVAL_IMMEDIATE;
|
||||||
pp->Windowed = TRUE;
|
pp->Windowed = TRUE;
|
||||||
}
|
}
|
||||||
|
@ -397,16 +395,7 @@ namespace D3D
|
||||||
if (dev)
|
if (dev)
|
||||||
{
|
{
|
||||||
dev->EndScene();
|
dev->EndScene();
|
||||||
|
dev->Present( NULL, NULL, NULL, NULL );
|
||||||
// copying the content from the backbuffer to the front buffer
|
|
||||||
// and adjust the aspect ratio
|
|
||||||
// The buffers are created with D3DSWAPEFFECT_COPY, otherwise the rescaling won't work
|
|
||||||
|
|
||||||
int Width = (int)ceil(abs((int)(2 * xfregs.rawViewport[0])) * Renderer::GetTargetScaleX());
|
|
||||||
int Height = (int)ceil(abs((int)(2 * xfregs.rawViewport[1])) * Renderer::GetTargetScaleY());
|
|
||||||
|
|
||||||
RECT src={0,0,Width,Height};
|
|
||||||
dev->Present( &src, NULL, NULL, NULL );
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (fullScreen != nextFullScreen)
|
if (fullScreen != nextFullScreen)
|
||||||
|
|
Loading…
Reference in New Issue