Clean up warnings

This commit is contained in:
elasota
2020-11-08 13:40:47 -05:00
parent 4c6e646133
commit a28a4cd73d
11 changed files with 151 additions and 177 deletions

View File

@@ -1127,7 +1127,7 @@ void GpDisplayDriverD3D11::Run()
HMENU menus = NULL;
// TODO: Fix the resolution here
RECT wr = { 0, 0, m_windowWidthPhysical, m_windowHeightPhysical };
RECT wr = { 0, 0, static_cast<DWORD>(m_windowWidthPhysical), static_cast<DWORD>(m_windowHeightPhysical) };
AdjustWindowRect(&wr, windowStyle, menus != NULL);
m_osGlobals->m_hwnd = CreateWindowExW(NULL, L"GPD3D11WindowClass", GP_APPLICATION_NAME_W, WS_OVERLAPPEDWINDOW, 300, 300, wr.right - wr.left, wr.bottom - wr.top, NULL, menus, m_osGlobals->m_hInstance, NULL);

View File

@@ -11,14 +11,14 @@
void GpDisplayDriverSurfaceD3D11::Upload(const void *data, size_t x, size_t y, size_t width, size_t height, size_t pitch)
{
D3D11_BOX box;
box.left = x;
box.right = x + width;
box.top = y;
box.bottom = y + height;
box.left = static_cast<UINT>(x);
box.right = static_cast<UINT>(x + width);
box.top = static_cast<UINT>(y);
box.bottom = static_cast<UINT>(y + height);
box.front = 0;
box.back = 1;
m_deviceContext->UpdateSubresource(m_texture, 0, &box, data, pitch, height * pitch);
m_deviceContext->UpdateSubresource(m_texture, 0, &box, data, pitch, static_cast<UINT>(height * pitch));
}
void GpDisplayDriverSurfaceD3D11::UploadEntire(const void *data, size_t pitch)