Wrap the display globals in a struct (#16998)

* Wrap the display globals in a struct

Makes it easier to search/replace these, for future refactorings.

* Some renaming

* Qt buildfix, also fix the Qt build on Mac (got broken with battery changes)

* Attempt at buildfixing ios

* UWP buildfix
This commit is contained in:
Henrik Rydgård authored and GitHub committed 2023-02-25 13:09:44 +01:00
1 parent 3e98d313a8
commit 8b431b39ba
48 files changed
+319 -313

No files matched your search

+4 -4
View File
@@ -1205,8 +1205,8 @@ void FramebufferManagerCommon::DrawPixels(VirtualFramebuffer *vfb, int dstX, int
// TODO: Replace with draw2D_.Blit() directly.
DrawActiveTexture(dstX, dstY, width, height,
vfb ? vfb->bufferWidth : pixel_xres,
vfb ? vfb->bufferHeight : pixel_yres,
vfb ? vfb->bufferWidth : g_display.pixel_xres,
vfb ? vfb->bufferHeight : g_display.pixel_yres,
u0, v0, u1, v1, ROTATION_LOCKED_HORIZONTAL, flags);
gpuStats.numUploads++;
@@ -3081,11 +3081,11 @@ void FramebufferManagerCommon::DrawActiveTexture(float x, float y, float w, floa
coord[i].y = coord[i].y * invDestH - 1.0f;
}
if ((flags & DRAWTEX_TO_BACKBUFFER) && g_display_rotation != DisplayRotation::ROTATE_0) {
if ((flags & DRAWTEX_TO_BACKBUFFER) && g_display.rotation != DisplayRotation::ROTATE_0) {
for (int i = 0; i < 4; i++) {
// backwards notation, should fix that...
Lin::Vec3 pos = Lin::Vec3(coord[i].x, coord[i].y, 0.0);
pos = pos * g_display_rot_matrix;
pos = pos * g_display.rot_matrix;
coord[i].x = pos.x;
coord[i].y = pos.y;
}