From a47bcf6cc12967a36ba9df069219bb1bd1525722 Mon Sep 17 00:00:00 2001 From: TwinAphex51224 Date: Sat, 10 Mar 2012 16:50:11 +0100 Subject: [PATCH] (360) Texture coordinates updated now again per video width/height change --- 360/xdk360_video.cpp | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/360/xdk360_video.cpp b/360/xdk360_video.cpp index 877c715e35..9f9e3ff3f3 100644 --- a/360/xdk360_video.cpp +++ b/360/xdk360_video.cpp @@ -134,13 +134,13 @@ void xdk360_set_orientation(uint32_t orientation) angle = M_PI * 0 / 180; break; case ORIENTATION_VERTICAL: - angle = M_PI * 90 / 180; + angle = M_PI * 270 / 180; break; case ORIENTATION_FLIPPED: angle = M_PI * 180 / 180; break; case ORIENTATION_FLIPPED_ROTATED: - angle = M_PI * 270 / 180; + angle = M_PI * 90 / 180; break; } vid->modelViewProj = XMMatrixRotationZ(angle); @@ -368,6 +368,17 @@ static bool xdk360_gfx_frame(void *data, const void *frame, float tex_w = width / 512.0f; float tex_h = height / 512.0f; + + const DrawVerticeFormats verts[] = { + { -1.0f, -1.0f, 0.0f, tex_h }, + { 1.0f, -1.0f, tex_w, tex_h }, + { -1.0f, 1.0f, 0.0f, 0.0f }, + { 1.0f, 1.0f, tex_w, 0.0f }, + }; + + void *verts_ptr = (BYTE*)D3DVertexBuffer_Lock(vid->vertex_buf, 0, 0, 0); + memcpy(verts_ptr, verts, sizeof(verts)); + D3DVertexBuffer_Unlock(vid->vertex_buf); vid->last_width = width; vid->last_height = height;