mirror of
https://github.com/Blinue/Magpie.git
synced 2026-06-24 02:04:10 +00:00
30 lines
536 B
C++
30 lines
536 B
C++
#pragma once
|
|
#include "pch.h"
|
|
#include "FrameSourceBase.h"
|
|
|
|
|
|
class LegacyGDIFrameSource : public FrameSourceBase {
|
|
public:
|
|
LegacyGDIFrameSource() {};
|
|
virtual ~LegacyGDIFrameSource() {}
|
|
|
|
bool Initialize() override;
|
|
|
|
ComPtr<ID3D11Texture2D> GetOutput() override;
|
|
|
|
bool Update() override;
|
|
|
|
bool HasRoundCornerInWin11() override {
|
|
return false;
|
|
}
|
|
|
|
private:
|
|
ComPtr<ID3D11DeviceContext> _d3dDC;
|
|
|
|
HWND _hwndSrc = NULL;
|
|
ComPtr<ID3D11Texture2D> _output;
|
|
|
|
BITMAPINFO _bi{};
|
|
RECT _frameInWindow{};
|
|
std::unique_ptr<BYTE> _pixels;
|
|
};
|