none
Screen Rotation on i.MX23 WinCE6 RRS feed

  • Question

  • Hi all,

    I try setting the screen orientation as portrait mode.

    I have modified the Angle key value under HKEY_LOCAL_MACHINE\SYSTEM\GDI\ROTATION\ (90). The screen rotated but the bottom side of the screen remains black. Where does the problem arise from?

    I look over the source files of BSP's display driver but I can't know where I should change. I've attached a part of code in the constructor of DDLcdif class. On debug window, m_nScreenHeightSave is 272, m_nScreenWidthSave is 480.  How can I succeed that Windows CE boots correctly on the portrait orientation mode?

     

     GetModeInfoEx(&m_ModeInfoEx, DISPLAY_MODE_DEVICE);
     m_pMode = &m_ModeInfoEx.modeInfo;
     m_pModeEx = &m_ModeInfoEx;
    
     m_nScreenHeightSave = m_pMode->height;
     m_nScreenWidthSave = m_pMode->width;
     m_iRotate = GetRotateModeFromReg();
    
     RETAILMSG(1, (TEXT("INFO: BEFORE: m_nScreenHeightSave=%d, m_nScreenWidthSave=%d, m_iRotate=%d.\r\n"
    
    ), m_nScreenHeightSave, m_nScreenWidthSave, m_iRotate));
    
     SetRotateParams();
    
     m_nScreenWidth = m_pMode->width;
     m_nScreenHeight = m_pMode->height;
     m_nScreenBpp = m_pMode->Bpp;
     m_nScreenStride = ((m_nScreenWidthSave * (m_nScreenBpp / 8) + 3) >> 2) << 2;
     m_pModeEx->lPitch = m_nScreenStride;
     m_dwPhysicalModeID = m_pMode->modeId;
     m_nCurrentDisplayMode = m_pMode->modeId;
    
    

     

    Thanks in advance for your helps and clarifications.

    Wednesday, February 9, 2011 3:05 PM

All replies

  • Are those the correct dimensions for your LCD (480 x 272)?
    Tom Gensel PTG Systems, LLC
    http://www.ptgsystems.com
    Wednesday, February 9, 2011 6:25 PM
  • I had the same issue with the imx25, spent a bit of time on it but couldn't find the issue. For some reason even when I forced some of the parameters to be the correct values for the orientation it still would display black over half the screen. I resolved it in the end by running an app at startup that rotates the screen using the example here: http://geekswithblogs.net/BruceEitman/archive/2008/12/10/windows-ce-dynamic-screen-rotation.aspx which works, although it does nothing special that the driver shouldn't be able to handle when it is initialised.

    I would be interested if you do find out what is causing the issue.

    Thursday, February 10, 2011 2:46 AM
  • Hi,

    I have the same problem. Bruce Eitmans example also works on my device.

    Does anybody find a solution for this problem? The example code is fine, but I like to rotate the screen via registry at startup. Here the situation after startup, if I set HKEY_LOCAL_MACHINE\SYSTEM\GDI\ROTATION\ (90).

    Best regards,

    Andreas

    Monday, December 17, 2012 12:33 PM