Merge pull request #9 from notaz/gcc6_build

Fix build on gcc6
This commit is contained in:
Philip Rebohle 2018-01-19 00:28:07 +01:00 committed by GitHub
commit 0b867566f1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 10 additions and 8 deletions

View File

@ -1251,7 +1251,7 @@ namespace dxvk {
HRESULT STDMETHODCALLTYPE D3D11Device::GetDeviceRemovedReason() {
static std::atomic<bool> s_errorShown = false;
static std::atomic<bool> s_errorShown = { false };
if (!s_errorShown.exchange(true))
Logger::warn("D3D11Device::GetDeviceRemovedReason: Stub");

View File

@ -55,8 +55,9 @@ namespace dxvk {
if (pDesc == nullptr)
return DXGI_ERROR_INVALID_CALL;
::MONITORINFOEX monInfo = { sizeof(monInfo) };
::MONITORINFOEX monInfo;
monInfo.cbSize = sizeof(monInfo);
if (!::GetMonitorInfo(m_monitor, &monInfo)) {
Logger::err("DxgiOutput: Failed to query monitor info");
return E_FAIL;
@ -82,8 +83,9 @@ namespace dxvk {
return DXGI_ERROR_INVALID_CALL;
// Query monitor info to get the device name
::MONITORINFOEX monInfo = { sizeof(monInfo) };
::MONITORINFOEX monInfo;
monInfo.cbSize = sizeof(monInfo);
if (!::GetMonitorInfo(m_monitor, &monInfo)) {
Logger::err("DxgiOutput: Failed to query monitor info");
return E_FAIL;

View File

@ -1,5 +1,6 @@
#include <cstring>
#include <fstream>
#include <vector>
#include <d3dcompiler.h>
@ -46,9 +47,7 @@ int WINAPI WinMain(HINSTANCE hInstance,
return 1;
}
std::string data;
data.resize(assembly->GetBufferSize());
std::memcpy(data.data(), assembly->GetBufferPointer(), data.size());
std::string data((const char *)assembly->GetBufferPointer(), assembly->GetBufferSize());
std::cout << data;
return 0;
}

View File

@ -1,5 +1,6 @@
#include <cstring>
#include <fstream>
#include <vector>
#include <d3dcompiler.h>