Skip to content

Commit 3822947

Browse files
committed
Added windows XP support
1 parent 74a11a2 commit 3822947

File tree

2 files changed

+39
-6
lines changed

2 files changed

+39
-6
lines changed

Example/Screen_Capture_Example.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -41,9 +41,9 @@ int main()
4141
//copy the data in
4242
Copy(*imagewrapper[Index(monitor)], img);
4343

44-
/*if (!tje_encode_to_file(s.c_str(), Width(*imagewrapper[Index(monitor)]), Height(*imagewrapper[Index(monitor)]), 4, (const unsigned char*)images[Index(monitor)].get())) {
44+
if (!tje_encode_to_file(s.c_str(), Width(*imagewrapper[Index(monitor)]), Height(*imagewrapper[Index(monitor)]), 4, (const unsigned char*)images[Index(monitor)].get())) {
4545
std::cout << "Could not write JPEG\n";
46-
}*/
46+
}
4747
};
4848
auto wholefunc = [&](const SL::Screen_Capture::Image& img, const SL::Screen_Capture::Monitor& monitor) {
4949

src/windows/DXFrameProcessor.cpp

+37-4
Original file line numberDiff line numberDiff line change
@@ -2,18 +2,48 @@
22
#include <memory>
33
#include <atomic>
44
#include <mutex>
5+
#include <string>
6+
#include <iostream>
7+
8+
#if (_MSC_VER >= 1700) && defined(_USING_V110_SDK71_)
9+
namespace SL {
10+
namespace Screen_Capture {
11+
12+
struct DXFrameProcessorImpl {
13+
14+
};
15+
16+
17+
DXFrameProcessor::DXFrameProcessor()
18+
{
19+
20+
}
21+
22+
DXFrameProcessor::~DXFrameProcessor()
23+
{
24+
25+
}
26+
DUPL_RETURN DXFrameProcessor::Init(std::shared_ptr<THREAD_DATA> data) {
27+
return DUPL_RETURN::DUPL_RETURN_ERROR_EXPECTED;
28+
}
29+
DUPL_RETURN DXFrameProcessor::ProcessFrame() {
30+
return DUPL_RETURN::DUPL_RETURN_ERROR_EXPECTED;
31+
}
32+
33+
}
34+
}
35+
#else
36+
537
#define NOMINMAX
638
#define WIN32_LEAN_AND_MEAN
7-
839
#include <windows.h>
940
#include <d3d11.h>
1041
#include <dxgi1_2.h>
1142
#include <wrl.h>
1243

1344
#pragma comment(lib,"dxgi.lib")
1445
#pragma comment(lib,"d3d11.lib")
15-
#include <string>
16-
#include <iostream>
46+
1747

1848
namespace SL {
1949
namespace Screen_Capture {
@@ -490,4 +520,7 @@ namespace SL {
490520
}
491521

492522
}
493-
}
523+
}
524+
525+
#endif
526+

0 commit comments

Comments
 (0)