[PATCH xglamo] Fix touchscreen x-coord when rotated.
SCarlson
scottrcarlson at gmail.com
Sun Sep 14 03:54:47 CEST 2008
Hello Chris --
I just came across this post. I'm running OM2008.8-update 09-13-2008
image.. I am developing an application that requires me to fix this issue
pronto. At 320x240 in landscape mode.. I am having trouble getting started
in the right place. I've so far attempted to download a snapshot of the git
repo.
I've ran om-conf with some errors, but I believe I can get through that.
Once I've compiled, I am going to make an ipk so I can install in my current
image. Does this seem like a reasonable approach?
Also, is there a chance I can get ahold of a pre-compiled binary with your
patch?
Thanks a ton,
Scott
Chris Ball-8 wrote:
>
> Hi,
>
> Here's a tested patch to fix http://docs.openmoko.org/trac/ticket/1244,
> please apply.
>
> Thanks from a very happy Freerunner owner,
>
> - Chris.
>
> From: Chris Ball <cjb at laptop.org>
> Date: Wed, 6 Aug 2008 21:42:58 -0400
> Subject: [PATCH] Fix x-coord of input when rotated.
>
> It seems that KdComputeMouseMatrix() requires us to call it after setting
> up the desired randr, but before we set pScreen->{width,height} to our
> new orientation. This patch does that, with the result that rotating to
> left/right no longer introduces a 120px xcoord offset. Fixes Trac #1244.
>
> Signed-off-by: Chris Ball <cjb at laptop.org>
> ---
> hw/kdrive/glamo/glamo.c | 10 ++++++----
> 1 files changed, 6 insertions(+), 4 deletions(-)
>
> diff --git a/hw/kdrive/glamo/glamo.c b/hw/kdrive/glamo/glamo.c
> index 2c353ec..1ceebd0 100644
> --- a/hw/kdrive/glamo/glamo.c
> +++ b/hw/kdrive/glamo/glamo.c
> @@ -420,14 +420,16 @@ glamoSetScannoutGeometry (ScreenPtr pScreen,
> priv->var.xres, priv->var.yres, priv->fix.line_length,
> priv->var.xres_virtual, priv->var.yres_virtual,
> priv->var.rotate);
> - pScreen->width = screen->width = priv->var.xres;
> - pScreen->height = screen->height = priv->var.yres;
> - screen->fb[0].byteStride =
> - screen->width * screen->fb[0].bitsPerPixel / 8;
> screen->randr = rotation;
> memset(&m, 0, sizeof(m));
> KdComputeMouseMatrix(&m, screen->randr, screen->width, screen->height);
> KdSetMouseMatrix(&m);
> +
> + pScreen->width = screen->width = priv->var.xres;
> + pScreen->height = screen->height = priv->var.yres;
> + screen->fb[0].byteStride =
> + screen->width * screen->fb[0].bitsPerPixel / 8;
> +
> /*TODO: not yet supported by glamo fb module*/
> pScreen->mmWidth = priv->var.width;
> pScreen->mmHeight = priv->var.height;
> --
> 1.5.6.4
>
>
> --
> Chris Ball <cjb at laptop.org>
> One Laptop per Child
>
> _______________________________________________
> devel mailing list
> devel at lists.openmoko.org
> https://lists.openmoko.org/mailman/listinfo/devel
>
>
--
View this message in context: http://n2.nabble.com/-PATCH-xglamo--Fix-touchscreen-x-coord-when-rotated.-tp677542p1088061.html
Sent from the Openmoko Devel mailing list archive at Nabble.com.
More information about the devel
mailing list