summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJordan Crouse <jordan.crouse@amd.com>2006-12-18 11:01:34 -0700
committerJordan Crouse <jordan.crouse@amd.com>2006-12-18 11:02:01 -0700
commite34f70fc46b36a0ea26636045ce9f9bf24ec89cd (patch)
tree6ddf76a163801fdba18518303d19c389ca357558
parent2e558b7cf6c508a1f745d922d911d612eba7d2c4 (diff)
Correctly rotate the HW cursor data so that it matches the rest of the screen
-rw-r--r--src/amd_gx_cursor.c24
1 files changed, 20 insertions, 4 deletions
diff --git a/src/amd_gx_cursor.c b/src/amd_gx_cursor.c
index 87dba0c..68b8f79 100644
--- a/src/amd_gx_cursor.c
+++ b/src/amd_gx_cursor.c
@@ -1,4 +1,4 @@
-/* Copyright (c) 2003-2005 Advanced Micro Devices, Inc.
+/* Copyright (c) 2003-2006 Advanced Micro Devices, Inc.
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to
@@ -233,9 +233,25 @@ GXLoadCursorImage(ScrnInfoPtr pScrni, unsigned char *src)
++rowp;
++mskp;
}
- //(*pGeode->Rotation) (x, y, 32, 32, &newX, &newY);
- newX = x;
- newY = y;
+
+ switch(pGeode->rotation) {
+ case RR_Rotate_0:
+ newX = x;
+ newY = y;
+ break;
+ case RR_Rotate_90:
+ newX = y;
+ newY = 31 - x;
+ break;
+ case RR_Rotate_180:
+ newX = 31 - x;
+ newY = 31 - y;
+ break;
+ case RR_Rotate_270:
+ newX = 31 - y;
+ newY = x;
+ break;
+ }
i = 7 - i;
n = 31 - newX;