Fix name collision on iOS build

This commit is contained in:
Henrik Rydgård committed 2019-10-13 21:25:16 +02:00
1 parent 5adb61a5f2
commit 70c0a12b2b
4 files changed
+10 -10

No files matched your search

+3 -3
View File
@@ -20,7 +20,7 @@ DisplayRotation g_display_rotation;
Matrix4x4 g_display_rot_matrix;
template<class T>
void RotateRectToDisplayImpl(Rect<T> &rect, T curRTWidth, T curRTHeight) {
void RotateRectToDisplayImpl(DisplayRect<T> &rect, T curRTWidth, T curRTHeight) {
switch (g_display_rotation) {
case DisplayRotation::ROTATE_180:
rect.x = curRTWidth - rect.w - rect.x;
@@ -57,10 +57,10 @@ void RotateRectToDisplayImpl(Rect<T> &rect, T curRTWidth, T curRTHeight) {
}
}
void RotateRectToDisplay(Rect<int> &rect, int curRTWidth, int curRTHeight) {
void RotateRectToDisplay(DisplayRect<int> &rect, int curRTWidth, int curRTHeight) {
RotateRectToDisplayImpl<int>(rect, curRTWidth, curRTHeight);
}
void RotateRectToDisplay(Rect<float> &rect, float curRTWidth, float curRTHeight) {
void RotateRectToDisplay(DisplayRect<float> &rect, float curRTWidth, float curRTHeight) {
RotateRectToDisplayImpl<float>(rect, curRTWidth, curRTHeight);
}
+3 -3
View File
@@ -32,9 +32,9 @@ extern DisplayRotation g_display_rotation;
extern Matrix4x4 g_display_rot_matrix;
template<class T>
struct Rect {
struct DisplayRect {
T x, y, w, h;
};
void RotateRectToDisplay(Rect<float> &rect, float rtWidth, float rtHeight);
void RotateRectToDisplay(Rect<int> &rect, int rtWidth, int rtHeight);
void RotateRectToDisplay(DisplayRect<float> &rect, float rtWidth, float rtHeight);
void RotateRectToDisplay(DisplayRect<int> &rect, int rtWidth, int rtHeight);
+2 -2
View File
@@ -1011,7 +1011,7 @@ void VulkanQueueRunner::PerformRenderPass(const VKRStep &step, VkCommandBuffer c
vkCmdSetViewport(cmd, 0, 1, &c.viewport.vp);
} else {
const VkViewport &vp = c.viewport.vp;
Rect<float> rc{ vp.x, vp.y, vp.width, vp.height };
DisplayRect<float> rc{ vp.x, vp.y, vp.width, vp.height };
RotateRectToDisplay(rc, (float)vulkan_->GetBackbufferWidth(), (float)vulkan_->GetBackbufferHeight());
VkViewport final_vp;
final_vp.x = rc.x;
@@ -1031,7 +1031,7 @@ void VulkanQueueRunner::PerformRenderPass(const VKRStep &step, VkCommandBuffer c
} else {
// Rendering to backbuffer. Might need to rotate.
const VkRect2D &rc = c.scissor.scissor;
Rect<int> rotated_rc{ rc.offset.x, rc.offset.y, (int)rc.extent.width, (int)rc.extent.height };
DisplayRect<int> rotated_rc{ rc.offset.x, rc.offset.y, (int)rc.extent.width, (int)rc.extent.height };
RotateRectToDisplay(rotated_rc, vulkan_->GetBackbufferWidth(), vulkan_->GetBackbufferHeight());
_dbg_assert_(G3D, rotated_rc.x >= 0);
_dbg_assert_(G3D, rotated_rc.y >= 0);
+2 -2
View File
@@ -360,7 +360,7 @@ void D3D11DrawContext::HandleEvent(Event ev, int width, int height, void *param1
void D3D11DrawContext::SetViewports(int count, Viewport *viewports) {
D3D11_VIEWPORT vp[4];
for (int i = 0; i < count; i++) {
Rect<float> rc{ viewports[i].TopLeftX , viewports[i].TopLeftY, viewports[i].Width, viewports[i].Height };
DisplayRect<float> rc{ viewports[i].TopLeftX , viewports[i].TopLeftY, viewports[i].Width, viewports[i].Height };
if (curRenderTargetView_ == bbRenderTargetView_) // Only the backbuffer is actually rotated wrong!
RotateRectToDisplay(rc, curRTWidth_, curRTHeight_);
vp[i].TopLeftX = rc.x;
@@ -374,7 +374,7 @@ void D3D11DrawContext::SetViewports(int count, Viewport *viewports) {
}
void D3D11DrawContext::SetScissorRect(int left, int top, int width, int height) {
Rect<float> frc{ (float)left, (float)top, (float)width, (float)height };
DisplayRect<float> frc{ (float)left, (float)top, (float)width, (float)height };
if (curRenderTargetView_ == bbRenderTargetView_) // Only the backbuffer is actually rotated wrong!
RotateRectToDisplay(frc, curRTWidth_, curRTHeight_);
D3D11_RECT rc{};