1
0
mirror of https://github.com/doitsujin/dxvk.git synced 2024-12-01 16:24:12 +01:00

Fix build on gcc6

Fixes build with mingw from ubuntu 17.10.
Missing C++17 features I guess.
This commit is contained in:
Grazvydas Ignotas 2018-01-19 00:59:40 +02:00
parent 9334873188
commit d1ae152f60
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>