diff --git a/Source/Plugins/Plugin_VideoDX11/Src/D3DBase.cpp b/Source/Plugins/Plugin_VideoDX11/Src/D3DBase.cpp index 830aea15cb..543ce23743 100644 --- a/Source/Plugins/Plugin_VideoDX11/Src/D3DBase.cpp +++ b/Source/Plugins/Plugin_VideoDX11/Src/D3DBase.cpp @@ -317,9 +317,10 @@ HRESULT Create(HWND wnd) mode_desc.Scaling = DXGI_MODE_SCALING_UNSPECIFIED; hr = output->FindClosestMatchingMode(&mode_desc, &swap_chain_desc.BufferDesc, NULL); if (FAILED(hr)) MessageBox(wnd, _T("Failed to find a supported video mode"), _T("Dolphin Direct3D 11 plugin"), MB_OK | MB_ICONERROR); -// TODO: Enable these two lines, they're breaking stuff for SOME reason right now -// xres = swap_chain_desc.BufferDesc.Width; -// yres = swap_chain_desc.BufferDesc.Height; + + // forcing buffer resolution to xres and yres.. TODO: The new video mode might not actually be supported! + swap_chain_desc.BufferDesc.Width = xres; + swap_chain_desc.BufferDesc.Height = yres; #if defined(_DEBUG) || defined(DEBUGFAST) D3D11_CREATE_DEVICE_FLAG device_flags = (D3D11_CREATE_DEVICE_FLAG)(D3D11_CREATE_DEVICE_DEBUG|D3D11_CREATE_DEVICE_SINGLETHREADED); diff --git a/Source/Plugins/Plugin_VideoDX11/Src/D3DTexture.cpp b/Source/Plugins/Plugin_VideoDX11/Src/D3DTexture.cpp index d554db5a56..99abfaa019 100644 --- a/Source/Plugins/Plugin_VideoDX11/Src/D3DTexture.cpp +++ b/Source/Plugins/Plugin_VideoDX11/Src/D3DTexture.cpp @@ -119,8 +119,12 @@ void ReplaceTexture2D(ID3D11Texture2D* pTexture, const u8* buffer, unsigned int u32* pBits = (u32*)((u8*)outptr + y * destPitch); for (unsigned int x = 0; x < width; x++) { + // we can't simply shift here, since e.g. 11111 must map to 11111111 and not 11111000 const u16 col = *in; - *pBits = 0xFF000000 | (((col&0x1f)<<3)) | ((col&0x7e0)<<5) | ((col&0xF800)<<8); + *pBits = 0xFF000000 | // alpha + ((((col&0xF800) << 5) * 255 / 31) & 0xFF0000) | // red + ((((col& 0x7e0) << 3) * 255 / 63) & 0xFF00) | // green + (( (col& 0x1f) * 255 / 31)); // blue pBits++; in++; }