Skip to content

Commit

Permalink
Rebuild v2.027
Browse files Browse the repository at this point in the history
21.03.23   Update SpoutGL and SpoutDX files
Rebuild x86/x64 VS2022 /MT  Version 2.027
  • Loading branch information
leadedge committed Mar 21, 2023
1 parent 085da7b commit de736f7
Show file tree
Hide file tree
Showing 7 changed files with 17 additions and 8 deletions.
2 changes: 2 additions & 0 deletions SpoutDX/source/SpoutCommon.h
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,9 @@

// C++11 scoped (class) enums are not compatible with early compilers (< VS2012 and others).
// The warning is designated "Prefer" and "C" standard unscoped enums are retained for compatibility.
#if defined(_MSC_VER)
#pragma warning(disable:26812) // unscoped enums
#endif


#endif
13 changes: 9 additions & 4 deletions SpoutDX/source/SpoutDX.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,8 @@
// 19.03.23 - Remove redundant CreateDX11StagingTexture and use SpoutDirectX function
// ReceiveSenderData - create a DX11 receiving texture with compatible format
// for unknown or DX9 formats.
// 21.03.23 - ReceiveSenderData - revert to using the format of the D3D11 texture
// generated by OpenDX11shareHandle for incorrect sender information.
//
// ====================================================================================
/*
Expand Down Expand Up @@ -2117,12 +2119,10 @@ bool spoutDX::ReceiveSenderData()
dxShareHandle = (HANDLE)(LongToHandle((long)info.shareHandle));
dwFormat = info.format;

// Create a DX11 receiving texture with compatible format
// for unknown or DX9 formats.
// 0 = unknown
// For DX9 sender formats, use a compatible DX11 format
// 21 = D3DFMT_A8R8G8B8
// 22 = D3DFMT_X8R8G8B8
if (dwFormat == 0 || dwFormat == 21 || dwFormat == 22) {
if (dwFormat == 21 || dwFormat == 22) {
dwFormat = (DWORD)DXGI_FORMAT_B8G8R8A8_UNORM;
}

Expand Down Expand Up @@ -2186,6 +2186,11 @@ bool spoutDX::ReceiveSenderData()
if (desc.Width == 0 || desc.Height == 0)
return false;

// For incorrect sender information, use the format
// of the D3D11 texture generated by OpenDX11shareHandle
if (dwFormat != (DWORD)desc.Format)
dwFormat = (DWORD)desc.Format;

// Initialize again with the newly connected sender values
CreateReceiver(sendername, width, height, dwFormat);

Expand Down
4 changes: 2 additions & 2 deletions SpoutDX/source/SpoutDirectX.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -628,8 +628,8 @@ bool spoutDirectX::CreateDX11Texture(ID3D11Device* pd3dDevice,
ReleaseDX11Texture(pd3dDevice, *ppTexture);

// Use the format passed in
// If that is zero or DX9 format, use the default format
DXGI_FORMAT texformat = format;
// If that is zero or DX9 format, use the default format
if (format == 0 || format == 21 || format == 22) // D3DFMT_A8R8G8B8 = 21 D3DFMT_X8R8G8B8 = 22
texformat = DXGI_FORMAT_B8G8R8A8_UNORM;

Expand Down Expand Up @@ -695,8 +695,8 @@ bool spoutDirectX::CreateDX11StagingTexture(ID3D11Device* pd3dDevice,
ID3D11Texture2D* pTexture = nullptr; // The new texture pointer

// Use the format passed in
// If that is zero or DX9 format, use the default format
DXGI_FORMAT texformat = format;
// If that is zero or DX9 format, use the default format
if (format == 0 || format == 21 || format == 22) // D3DFMT_A8R8G8B8 = 21 D3DFMT_X8R8G8B8 = 22
texformat = DXGI_FORMAT_B8G8R8A8_UNORM;

Expand Down
3 changes: 2 additions & 1 deletion SpoutDX/source/SpoutUtils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,7 @@
Remove dll build warning MessageBox.
Change "ConPrint" to "_conprint" and use Writefile instead of cout.
18.01.23 - _conprint - cast WriteFile size argument to DWORD
19.03.23 - Update SDKversion to 2.007.010
*/

Expand Down Expand Up @@ -170,7 +171,7 @@ namespace spoututils {

// Spout SDK version number string
// Major, minor, release
std::string SDKversion = "2.007.009";
std::string SDKversion = "2.007.010";

//
// Group: Information
Expand Down
Binary file modified binaries/SPOUTCAM/SpoutCam32/SpoutCam32.ax
Binary file not shown.
Binary file modified binaries/SPOUTCAM/SpoutCam64/SpoutCam64.ax
Binary file not shown.
3 changes: 2 additions & 1 deletion source/cam.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -290,7 +290,8 @@
17.03.23 SpoutDX ReceiveSenderData.
Allow for applications that do not fill the sender information format field.
If no format is specified use a valid D3D11 texture format.
19.03.23 Rebuild x86/x64 VS2022 /MT with updated SpoutDX.
21.03.23 Update SpoutGL and SpoutDX files
Rebuild x86/x64 VS2022 /MT
Version 2.027
Expand Down

0 comments on commit de736f7

Please sign in to comment.