Closed Phanty133 closed 3 years ago
this is very strange. Ill check this example out to see if I can reproduce this.
So i did get around to testing this exact code with the same setup, x64 ms windows 10, etrc. I have no issues at all. Therefore, its going to be something more specific to your setup.
Id debug this by going into the getmonitors function and going step by step to see the differences.
If you want to set up a live share in visual studio we can debug this. Let me know
I haven't had much time to look into the problem, but I managed to fix it? I switched to CMake with MSVC and just built the v17.0.3 source code together with my project. I used the CMakeLists.txt from the example, and it seems to work now. I still don't have the faintest clue of why it was bugging out in such a cursed way, but it works and I ain't tempting fate any further :).
If I return
SL::Screen_Capture::GetMonitors()
directly in the CreateCaptureConfiguration lambda, everything works fine, but if I first set a variable toSL::Screen_Capture::GetMonitors()
and I return it, I getExiting Thread due to expected error
in the console. The vector's size is 0 as well.My code:
I'm using x64 of release 17.0.3; Windows 10; MSVC C++14.