[vlc-devel] [PATCH] direct3d9: fix orientation

Salah-Eddin Shaban salah at videolan.org
Fri Nov 17 21:46:46 CET 2017


refs #11778, #18368
---
 modules/video_output/win32/direct3d9.c | 28 ++++++++++++++--------------
 1 file changed, 14 insertions(+), 14 deletions(-)

diff --git a/modules/video_output/win32/direct3d9.c b/modules/video_output/win32/direct3d9.c
index bada359642..b385a22a78 100644
--- a/modules/video_output/win32/direct3d9.c
+++ b/modules/video_output/win32/direct3d9.c
@@ -1505,48 +1505,48 @@ static void Direct3D9DestroyShaders(vout_display_t *vd)
 static void orientationVertexOrder(video_orientation_t orientation, int vertex_order[static 4])
 {
     switch (orientation) {
-        case ORIENT_ROTATED_90:
+        case ORIENT_ROTATED_90:      /* ORIENT_RIGHT_TOP */
             vertex_order[0] = 1;
             vertex_order[1] = 2;
             vertex_order[2] = 3;
             vertex_order[3] = 0;
             break;
-        case ORIENT_ROTATED_270:
+        case ORIENT_ROTATED_270:     /* ORIENT_LEFT_BOTTOM */
             vertex_order[0] = 3;
             vertex_order[1] = 0;
             vertex_order[2] = 1;
             vertex_order[3] = 2;
             break;
-        case ORIENT_ROTATED_180:
+        case ORIENT_ROTATED_180:     /* ORIENT_BOTTOM_RIGHT */
             vertex_order[0] = 2;
             vertex_order[1] = 3;
             vertex_order[2] = 0;
             vertex_order[3] = 1;
             break;
-        case ORIENT_TRANSPOSED:
+        case ORIENT_TRANSPOSED:      /* ORIENT_LEFT_TOP */
             vertex_order[0] = 0;
             vertex_order[1] = 3;
             vertex_order[2] = 2;
             vertex_order[3] = 1;
             break;
-        case ORIENT_HFLIPPED:
-            vertex_order[0] = 3;
-            vertex_order[1] = 2;
-            vertex_order[2] = 1;
-            vertex_order[3] = 0;
-            break;
-        case ORIENT_VFLIPPED:
+        case ORIENT_HFLIPPED:        /* ORIENT_TOP_RIGHT */
             vertex_order[0] = 1;
             vertex_order[1] = 0;
             vertex_order[2] = 3;
             vertex_order[3] = 2;
             break;
-        case ORIENT_ANTI_TRANSPOSED: /* transpose + vflip */
-            vertex_order[0] = 1;
+        case ORIENT_VFLIPPED:        /* ORIENT_BOTTOM_LEFT */
+            vertex_order[0] = 3;
             vertex_order[1] = 2;
-            vertex_order[2] = 3;
+            vertex_order[2] = 1;
             vertex_order[3] = 0;
             break;
+        case ORIENT_ANTI_TRANSPOSED: /* ORIENT_RIGHT_BOTTOM */
+            vertex_order[0] = 2;
+            vertex_order[1] = 1;
+            vertex_order[2] = 0;
+            vertex_order[3] = 3;
+            break;
        default:
             vertex_order[0] = 0;
             vertex_order[1] = 1;
-- 
2.12.3



More information about the vlc-devel mailing list