Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix build on gcc6 #9

Merged
merged 1 commit into from
Jan 18, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/d3d11/d3d11_device.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand Down
10 changes: 6 additions & 4 deletions src/dxgi/dxgi_output.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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;
Expand Down
5 changes: 2 additions & 3 deletions tests/dxbc/test_dxbc_disasm.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#include <cstring>
#include <fstream>
#include <vector>

#include <d3dcompiler.h>

Expand Down Expand Up @@ -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;
}
1 change: 1 addition & 0 deletions tests/dxbc/test_hlsl_compiler.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#include <cstring>
#include <fstream>
#include <vector>

#include <d3dcompiler.h>

Expand Down