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

Fixes for compatibility with Clang #81

Closed
wants to merge 1 commit into from
Closed
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
12 changes: 6 additions & 6 deletions SPOUTSDK/SpoutGL/SpoutCopy.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1026,8 +1026,8 @@ void spoutCopy::rgba2rgbaResample(const void* source, void* dest,
unsigned int pixel, nearestMatch;
for (i = 0; i < destHeight; i++) {
for (j = 0; j < destWidth; j++) {
px = floor((float)j*x_ratio);
py = floor((float)i*y_ratio);
px = std::floor((float)j*x_ratio);
py = std::floor((float)i*y_ratio);
if (bInvert)
pixel = (destHeight - i - 1)*destWidth * 4 + j * 4; // flip vertically
else
Expand Down Expand Up @@ -1063,8 +1063,8 @@ void spoutCopy::rgba2rgbResample(const void* source, void* dest,
unsigned int pixel, nearestMatch;
for (i = 0; i < destHeight; i++) {
for (j = 0; j < destWidth; j++) {
px = floor((float)j*x_ratio);
py = floor((float)i*y_ratio);
px = std::floor((float)j*x_ratio);
py = std::floor((float)i*y_ratio);

if (bMirror) {
if (bInvert)
Expand Down Expand Up @@ -1102,8 +1102,8 @@ void spoutCopy::rgba2bgrResample(const void* source, void* dest,
unsigned int pixel, nearestMatch;
for (i = 0; i < destHeight; i++) {
for (j = 0; j < destWidth; j++) {
px = floor((float)j*x_ratio);
py = floor((float)i*y_ratio);
px = std::floor((float)j*x_ratio);
py = std::floor((float)i*y_ratio);
if (bInvert)
pixel = (destHeight - i - 1)*destWidth * 3 + j * 3; // flip vertically
else
Expand Down
1 change: 1 addition & 0 deletions SPOUTSDK/SpoutGL/SpoutCopy.h
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
#include <intrin.h> // for cpuid to test for SSE2
#include <emmintrin.h> // for SSE2
#include <tmmintrin.h> // for SSSE3
#include <cmath> // for std::floor


class SPOUT_DLLEXP spoutCopy {
Expand Down
4 changes: 2 additions & 2 deletions SPOUTSDK/SpoutGL/SpoutFrameCount.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -798,7 +798,7 @@ bool spoutFrameCount::CheckKeyedAccess(ID3D11Texture2D* pTexture)
IDXGIKeyedMutex* pDXGIKeyedMutex = nullptr;

// Check the keyed mutex
pTexture->QueryInterface(_uuidof(IDXGIKeyedMutex), (void**)&pDXGIKeyedMutex);
pTexture->QueryInterface(__uuidof(IDXGIKeyedMutex), (void**)&pDXGIKeyedMutex);
if (pDXGIKeyedMutex) {
HRESULT hr = pDXGIKeyedMutex->AcquireSync(0, 67); // TODO - link with SPOUT_WAIT_TIMEOUT
switch (hr) {
Expand Down Expand Up @@ -828,7 +828,7 @@ void spoutFrameCount::AllowKeyedAccess(ID3D11Texture2D* pTexture)
// 22-24 microseconds
if (pTexture) {
IDXGIKeyedMutex* pDXGIKeyedMutex;
pTexture->QueryInterface(_uuidof(IDXGIKeyedMutex), (void**)&pDXGIKeyedMutex);
pTexture->QueryInterface(__uuidof(IDXGIKeyedMutex), (void**)&pDXGIKeyedMutex);
if (pDXGIKeyedMutex) {
pDXGIKeyedMutex->ReleaseSync(0);
pDXGIKeyedMutex->Release();
Expand Down