summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/common/common_types.h10
-rw-r--r--src/video_core/renderer_opengl/renderer_opengl.cpp4
-rw-r--r--src/video_core/renderer_opengl/renderer_opengl.h2
3 files changed, 9 insertions, 7 deletions
diff --git a/src/common/common_types.h b/src/common/common_types.h
index 25dc912a9..402410507 100644
--- a/src/common/common_types.h
+++ b/src/common/common_types.h
@@ -100,16 +100,17 @@ union t128 {
100 __m128 a; ///< 128-bit floating point (__m128 maps to the XMM[0-7] registers) 100 __m128 a; ///< 128-bit floating point (__m128 maps to the XMM[0-7] registers)
101}; 101};
102 102
103namespace common {
103/// Rectangle data structure 104/// Rectangle data structure
104class BasicRect { 105class Rect {
105public: 106public:
106 BasicRect(int x0=0, int y0=0, int x1=0, int y1=0) { 107 Rect(int x0=0, int y0=0, int x1=0, int y1=0) {
107 x0_ = x0; 108 x0_ = x0;
108 y0_ = y0; 109 y0_ = y0;
109 x1_ = x1; 110 x1_ = x1;
110 y1_ = y1; 111 y1_ = y1;
111 } 112 }
112 ~BasicRect() { } 113 ~Rect() { }
113 114
114 int x0_; ///< Rect top left X-coordinate 115 int x0_; ///< Rect top left X-coordinate
115 int y0_; ///< Rect top left Y-coordinate 116 int y0_; ///< Rect top left Y-coordinate
@@ -119,7 +120,8 @@ public:
119 inline u32 width() const { return abs(x1_ - x0_); } 120 inline u32 width() const { return abs(x1_ - x0_); }
120 inline u32 height() const { return abs(y1_ - y0_); } 121 inline u32 height() const { return abs(y1_ - y0_); }
121 122
122 inline bool operator == (const BasicRect& val) const { 123 inline bool operator == (const Rect& val) const {
123 return (x0_ == val.x0_ && y0_ == val.y0_ && x1_ == val.x1_ && y1_ == val.y1_); 124 return (x0_ == val.x0_ && y0_ == val.y0_ && x1_ == val.x1_ && y1_ == val.y1_);
124 } 125 }
125}; 126};
127}
diff --git a/src/video_core/renderer_opengl/renderer_opengl.cpp b/src/video_core/renderer_opengl/renderer_opengl.cpp
index f2e809b1d..bb5eb34aa 100644
--- a/src/video_core/renderer_opengl/renderer_opengl.cpp
+++ b/src/video_core/renderer_opengl/renderer_opengl.cpp
@@ -37,7 +37,7 @@ void RendererOpenGL::SwapBuffers() {
37 // EFB->XFB copy 37 // EFB->XFB copy
38 // TODO(bunnei): This is a hack and does not belong here. The copy should be triggered by some 38 // TODO(bunnei): This is a hack and does not belong here. The copy should be triggered by some
39 // register write We're also treating both framebuffers as a single one in OpenGL. 39 // register write We're also treating both framebuffers as a single one in OpenGL.
40 BasicRect framebuffer_size(0, 0, m_resolution_width, m_resolution_height); 40 common::Rect framebuffer_size(0, 0, m_resolution_width, m_resolution_height);
41 RenderXFB(framebuffer_size, framebuffer_size); 41 RenderXFB(framebuffer_size, framebuffer_size);
42 42
43 // XFB->Window copy 43 // XFB->Window copy
@@ -75,7 +75,7 @@ void RendererOpenGL::FlipFramebuffer(const u8* in, u8* out) {
75 * @param src_rect Source rectangle in XFB to copy 75 * @param src_rect Source rectangle in XFB to copy
76 * @param dst_rect Destination rectangle in output framebuffer to copy to 76 * @param dst_rect Destination rectangle in output framebuffer to copy to
77 */ 77 */
78void RendererOpenGL::RenderXFB(const BasicRect& src_rect, const BasicRect& dst_rect) { 78void RendererOpenGL::RenderXFB(const common::Rect& src_rect, const common::Rect& dst_rect) {
79 79
80 FlipFramebuffer(LCD::GetFramebufferPointer(LCD::g_regs.framebuffer_top_left_1), m_xfb_top_flipped); 80 FlipFramebuffer(LCD::GetFramebufferPointer(LCD::g_regs.framebuffer_top_left_1), m_xfb_top_flipped);
81 FlipFramebuffer(LCD::GetFramebufferPointer(LCD::g_regs.framebuffer_sub_left_1), m_xfb_bottom_flipped); 81 FlipFramebuffer(LCD::GetFramebufferPointer(LCD::g_regs.framebuffer_sub_left_1), m_xfb_bottom_flipped);
diff --git a/src/video_core/renderer_opengl/renderer_opengl.h b/src/video_core/renderer_opengl/renderer_opengl.h
index 06e602b46..dd811cad6 100644
--- a/src/video_core/renderer_opengl/renderer_opengl.h
+++ b/src/video_core/renderer_opengl/renderer_opengl.h
@@ -28,7 +28,7 @@ public:
28 * @param src_rect Source rectangle in XFB to copy 28 * @param src_rect Source rectangle in XFB to copy
29 * @param dst_rect Destination rectangle in output framebuffer to copy to 29 * @param dst_rect Destination rectangle in output framebuffer to copy to
30 */ 30 */
31 void RenderXFB(const BasicRect& src_rect, const BasicRect& dst_rect); 31 void RenderXFB(const common::Rect& src_rect, const common::Rect& dst_rect);
32 32
33 /** 33 /**
34 * Set the emulator window to use for renderer 34 * Set the emulator window to use for renderer