fix initializations.
This commit is contained in:
@@ -33,7 +33,7 @@ class ScopedReleaser
|
|||||||
public:
|
public:
|
||||||
using ReleaseFuncType = std::function<void()>;
|
using ReleaseFuncType = std::function<void()>;
|
||||||
ScopedReleaser(ReleaseFuncType&& func) : func_(func) {}
|
ScopedReleaser(ReleaseFuncType&& func) : func_(func) {}
|
||||||
~ScopedReleaser() { func_(); }
|
virtual ~ScopedReleaser() { func_(); }
|
||||||
|
|
||||||
private:
|
private:
|
||||||
const ReleaseFuncType func_;
|
const ReleaseFuncType func_;
|
||||||
@@ -48,7 +48,7 @@ public:
|
|||||||
using microseconds = std::chrono::microseconds;
|
using microseconds = std::chrono::microseconds;
|
||||||
using TimerFuncType = std::function<void(microseconds)>;
|
using TimerFuncType = std::function<void(microseconds)>;
|
||||||
ScopedTimer(TimerFuncType&& func);
|
ScopedTimer(TimerFuncType&& func);
|
||||||
~ScopedTimer();
|
virtual ~ScopedTimer();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
const TimerFuncType func_;
|
const TimerFuncType func_;
|
||||||
@@ -71,7 +71,7 @@ void SendMessageToUnity(Message message);
|
|||||||
|
|
||||||
// Buffer
|
// Buffer
|
||||||
template <class T>
|
template <class T>
|
||||||
class Buffer
|
class Buffer final
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
Buffer()
|
Buffer()
|
||||||
|
|||||||
@@ -99,7 +99,7 @@ void Cursor::UpdateTexture(
|
|||||||
bgraBuffer_.ExpandIfNeeded(bgraBufferSize);
|
bgraBuffer_.ExpandIfNeeded(bgraBufferSize);
|
||||||
|
|
||||||
// Check buffers
|
// Check buffers
|
||||||
if (!bgraBuffer_ || !buffer_)
|
if (!bgraBuffer_ || !buffer_)
|
||||||
{
|
{
|
||||||
Debug::Error("Cursor::UpdateTexture() => no buffer.");
|
Debug::Error("Cursor::UpdateTexture() => no buffer.");
|
||||||
return;
|
return;
|
||||||
|
|||||||
@@ -9,7 +9,7 @@
|
|||||||
|
|
||||||
class Duplicator;
|
class Duplicator;
|
||||||
|
|
||||||
class Cursor
|
class Cursor final
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
explicit Cursor();
|
explicit Cursor();
|
||||||
@@ -39,7 +39,7 @@ private:
|
|||||||
int y_ = -1;
|
int y_ = -1;
|
||||||
Buffer<BYTE> buffer_;
|
Buffer<BYTE> buffer_;
|
||||||
Buffer<BYTE> bgraBuffer_;
|
Buffer<BYTE> bgraBuffer_;
|
||||||
DXGI_OUTDUPL_POINTER_SHAPE_INFO shapeInfo_;
|
DXGI_OUTDUPL_POINTER_SHAPE_INFO shapeInfo_ = {};
|
||||||
LARGE_INTEGER timestamp_;
|
LARGE_INTEGER timestamp_ = {};
|
||||||
D3D11_BOX capturedImageArea_;
|
D3D11_BOX capturedImageArea_ = {};
|
||||||
};
|
};
|
||||||
@@ -8,7 +8,7 @@
|
|||||||
|
|
||||||
|
|
||||||
// Thraed safe self created ID3D11Device from specified adapter
|
// Thraed safe self created ID3D11Device from specified adapter
|
||||||
class IsolatedD3D11Device
|
class IsolatedD3D11Device final
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
IsolatedD3D11Device();
|
IsolatedD3D11Device();
|
||||||
|
|||||||
@@ -30,7 +30,7 @@ enum class DuplicatorState
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
class Duplicator
|
class Duplicator final
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
using State = DuplicatorState;
|
using State = DuplicatorState;
|
||||||
@@ -83,7 +83,7 @@ private:
|
|||||||
|
|
||||||
std::shared_ptr<class IsolatedD3D11Device> device_;
|
std::shared_ptr<class IsolatedD3D11Device> device_;
|
||||||
Microsoft::WRL::ComPtr<IDXGIOutputDuplication> dupl_;
|
Microsoft::WRL::ComPtr<IDXGIOutputDuplication> dupl_;
|
||||||
Frame lastFrame_;
|
Frame lastFrame_ = {};
|
||||||
UINT lastFrameId_ = 0;
|
UINT lastFrameId_ = 0;
|
||||||
bool isFrameAcquired_ = false;
|
bool isFrameAcquired_ = false;
|
||||||
|
|
||||||
@@ -91,5 +91,5 @@ private:
|
|||||||
std::thread thread_;
|
std::thread thread_;
|
||||||
mutable std::mutex mutex_;
|
mutable std::mutex mutex_;
|
||||||
|
|
||||||
Metadata metaData_;
|
Metadata metaData_ = {};
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ class MonitorManager;
|
|||||||
enum class DuplicatorState;
|
enum class DuplicatorState;
|
||||||
|
|
||||||
|
|
||||||
class Monitor
|
class Monitor final
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
explicit Monitor(int id);
|
explicit Monitor(int id);
|
||||||
@@ -68,8 +68,8 @@ private:
|
|||||||
|
|
||||||
Microsoft::WRL::ComPtr<IDXGIOutput> output_;
|
Microsoft::WRL::ComPtr<IDXGIOutput> output_;
|
||||||
Microsoft::WRL::ComPtr<IDXGIAdapter> adapter_;
|
Microsoft::WRL::ComPtr<IDXGIAdapter> adapter_;
|
||||||
DXGI_OUTPUT_DESC outputDesc_;
|
DXGI_OUTPUT_DESC outputDesc_ = {};
|
||||||
MONITORINFOEX monitorInfo_;
|
MONITORINFOEX monitorInfo_ = {};
|
||||||
|
|
||||||
std::shared_ptr<class Duplicator> duplicator_;
|
std::shared_ptr<class Duplicator> duplicator_;
|
||||||
UINT lastFrameId_ = -1;
|
UINT lastFrameId_ = -1;
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ struct IUnityInterfaces;
|
|||||||
class Monitor;
|
class Monitor;
|
||||||
class Cursor;
|
class Cursor;
|
||||||
|
|
||||||
class MonitorManager
|
class MonitorManager final
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
MonitorManager();
|
MonitorManager();
|
||||||
|
|||||||
Reference in New Issue
Block a user