mirror of
https://github.com/thunderbrewhq/thunderbrew
synced 2025-04-16 01:55:21 +03:00
feat(gx): implement window size queries in d3d backend
This commit is contained in:
parent
99691860d6
commit
8d36078606
@ -385,11 +385,28 @@ int32_t CGxDeviceD3d::BufUnlock(CGxBuf* buf, uint32_t size) {
|
||||
}
|
||||
|
||||
void CGxDeviceD3d::CapsWindowSize(CRect& dst) {
|
||||
// TODO
|
||||
dst = this->DeviceCurWindow();
|
||||
}
|
||||
|
||||
void CGxDeviceD3d::CapsWindowSizeInScreenCoords(CRect& dst) {
|
||||
// TODO
|
||||
if (this->IDevIsWindowed()) {
|
||||
auto windowRect = this->DeviceCurWindow();
|
||||
|
||||
POINT points[2];
|
||||
points[0].x = 0;
|
||||
points[0].y = 0;
|
||||
points[1].x = windowRect.maxX;
|
||||
points[1].y = windowRect.maxY;
|
||||
|
||||
MapWindowPoints(this->m_hwnd, nullptr, points, 2);
|
||||
|
||||
dst.minY = points[0].y;
|
||||
dst.minX = points[0].x;
|
||||
dst.maxY = points[1].y;
|
||||
dst.maxX = points[1].x;
|
||||
} else {
|
||||
dst = this->DeviceCurWindow();
|
||||
}
|
||||
}
|
||||
|
||||
int32_t CGxDeviceD3d::CreatePoolAPI(CGxPool* pool) {
|
||||
|
Loading…
Reference in New Issue
Block a user