none
Screen Rotation, WinCE 6.0 RRS feed

  • Question

  • I have been struggling and learning how to create a Windows Embedded 6.0 OS image. I have, finally, successfully created one that has nearly all of the required settings.

    One thing I cannot figure out is the screen rotation. Instructions I have from the person who originally developed the platform indicate to change the Angle entry in the dss.reg file:

    [HKEY_LOCAL_MACHINE\System\GDI\Drivers]
        "Angle" = dword:4

    Another resource had a different instruction, as found here: https://msdn.microsoft.com/en-US/library/Ee504554(v=WinEmbedded.60).aspx

    Neither of these registry changes, separately or in combination, will rotate the screen imagery. However, the touch screen IS rotated.

    What do I need to change?


    • Edited by RyreInc Thursday, August 27, 2015 2:58 PM
    Thursday, August 27, 2015 1:59 PM

Answers

  • Ok, now we have something to look at.

    I assume that you mean that you are using Platform Builder, modifying a REG file, then building.

    The first thing that I would do is check reginit.ini in your _FLATRELEASEDIR.  Search the file for your value name, or value, or key and see if it shows up more than one time.   The last time it shows up is the value that will be used.



    Bruce Eitman (eMVP)
    Senior Engineer
    Bruce.Eitman AT Eurotech DOT com
    My BLOG http://geekswithblogs.net/bruceeitman
    I work for Eurotech

    • Marked as answer by RyreInc Monday, August 31, 2015 6:05 PM
    Monday, August 31, 2015 2:29 PM
    Moderator
  • reginit.ini is an output from makeimg (or actually fmerge, which is run by makeimg).  So, modifying it is not a practical solution.

    If you want to just do a quick test with your modified reginit.ini, open a build window from the Build menu and run "romimage ce.bib".

    But for the real solution, you will need to find the REG file that contains the information that you want to change - or try modifying your Platform.reg at the end of the file.



    Bruce Eitman (eMVP)
    Senior Engineer
    Bruce.Eitman AT Eurotech DOT com
    My BLOG http://geekswithblogs.net/bruceeitman
    I work for Eurotech


    Monday, August 31, 2015 4:03 PM
    Moderator

All replies

  • We don't know how you tried to change the registry or if your changes are actually in the OS.  We also don't know anything about your display driver.

    But it is probably safe to assume that the rotation only occurs when the driver starts running, so the registry value will need to be in available when the OS starts.  Is that setting in the OS?

    Your touch screen is probably rotated simply because of how it is attached to the display.



    Bruce Eitman (eMVP)
    Senior Engineer
    Bruce.Eitman AT Eurotech DOT com
    My BLOG http://geekswithblogs.net/bruceeitman
    I work for Eurotech

    Thursday, August 27, 2015 3:15 PM
    Moderator
  • I am changing the registry by editing the dss.reg and project.reg files in the Platform Builder Release folder (the contents of which are generated after a Sysgen build). Then I Build the AM35x_BSP platform by right clicking on that item from the Solution Explorer pane. This compiles everything into an NK.bin file.

    I know these changes are getting through as I can see the results of other changes as I make them (changes which have been made in the same fashion).

    I do not know if there is a setting to allow a registry value to be available on startup. Where would this be located?
    • Edited by RyreInc Thursday, August 27, 2015 4:10 PM
    Thursday, August 27, 2015 4:08 PM
  • Based on some of your previous questions, I suspect your custom BSP video driver may not support rotation.  If you write a simple application to rotate using https://technet.microsoft.com/en-us/subscriptions/ee505713 asking for DM_DISPLAYQUERYORIENTATION what do you get in response?

    There is a sample from CE 5 available at https://msdn.microsoft.com/en-us/library/ms914393.aspx

    Sincerely,

    IoTGirl

    Thursday, August 27, 2015 4:28 PM
    Moderator
  • Or here:  http://geekswithblogs.net/BruceEitman/archive/2008/12/10/windows-ce-dynamic-screen-rotation.aspx



    Bruce Eitman (eMVP)
    Senior Engineer
    Bruce.Eitman AT Eurotech DOT com
    My BLOG http://geekswithblogs.net/bruceeitman
    I work for Eurotech

    Thursday, August 27, 2015 4:42 PM
    Moderator
  • If, and you haven't convinced me that it isn't "if" your setting is in the OS, then you should be able to check that in the OS and if it is there it is available when the driver starts.

    A registry editor is available from: http://geekswithblogs.net/BruceEitman/archive/2009/07/27/window-ce-simple-little-registry-editor.aspx



    Bruce Eitman (eMVP)
    Senior Engineer
    Bruce.Eitman AT Eurotech DOT com
    My BLOG http://geekswithblogs.net/bruceeitman
    I work for Eurotech

    Thursday, August 27, 2015 4:45 PM
    Moderator
  • The display supports screen rotation; I can manually change it from CECPv2 on the console. Also, the hardware has mostly not changed from an earlier revision which also allowed screen rotation.

    But even if I do a registry save from CECPv2, it reverts back to the default orientation after a reboot...

    Thursday, August 27, 2015 5:30 PM
  • Hi Ryre,

    Please explain what you mean by "manually change"?  The output from the code both Bruce and I supplied will give the real answer as to whether the video driver actually supports rotation via software on your current hardware.

    Sincerely,

    IoTGirl

    Thursday, August 27, 2015 7:03 PM
    Moderator
  • What I mean is that I can open up CECPv2 on the WinCE console, go to Screen Rotate, and set the rotation to 270°.

    Then I go to Registry Save and click Save Registry, but upon reboot the screen is back in its default orientation.

    Thursday, August 27, 2015 7:28 PM
  • Hi Ryre,

    That still does not tell us the information we asked.  There are many ways to rotate the screen and based on your statements, your driver may not do the rotation.

    1. When you "Save the Registry" what value are you saving? When you reboot is that value still there and was potentially ignored?

    2. What value does your simple application to rotate using https://technet.microsoft.com/en-us/subscriptions/ee505713 asking for DM_DISPLAYQUERYORIENTATION get in response?

    Again, it sounds like you are hacking one BSP to work on other hardware so your option would be to look at the source for your v2 Control Panel and see what it is doing for screen rotation.  I suspect a software call without a registry update.

    Sincerely,

    IoTGirl 

    Thursday, August 27, 2015 7:41 PM
    Moderator
  • What is CECPv2?  If it is relevant to your line of questions, then it would be relevant to define it.  Does this CEPCv2 do anything with the registry?  If it doesn't then of course the display won't be rotated on reboot.

    If it does modify the registry, then the following questions apply:

    1. Have you added hive based registry to your OS? 
    2. Have you tested that it works?
    3. Did you flush the registry so that it is saved to persistent storage for the next boot?

    Going back to your modification of the registry files, have you checked the registry to see if your changes are in the OS as I recommended?



    Bruce Eitman (eMVP)
    Senior Engineer
    Bruce.Eitman AT Eurotech DOT com
    My BLOG http://geekswithblogs.net/bruceeitman
    I work for Eurotech

    Friday, August 28, 2015 1:01 PM
    Moderator
  • Hi Bruce,

    There are two control Panel's available in Compact; Standard Shell & Silverlight(XAML). Ryre is using the XAML version.

    Sincerely,

    IoTGirl

    https://msdn.microsoft.com/en-us/library/gg159127.aspx

    Friday, August 28, 2015 6:30 PM
    Moderator
  • I guess that I haven't heard it by that name...  I even Binged for it first.


    Bruce Eitman (eMVP)
    Senior Engineer
    Bruce.Eitman AT Eurotech DOT com
    My BLOG http://geekswithblogs.net/bruceeitman
    I work for Eurotech

    Friday, August 28, 2015 8:06 PM
    Moderator
  • Sorry I haven't been responding timely. I am juggling this alongside other projects. I will have some answers for you early next week.
    Friday, August 28, 2015 9:03 PM
  • After further investigation I have found that a deeper cause is that some registry entries are not being accepted; while I can modify some entries and see the change go through, others will not take effect... These can be two entries under the same key, in the same .reg file.
    Monday, August 31, 2015 2:18 PM
  • Ok, now we have something to look at.

    I assume that you mean that you are using Platform Builder, modifying a REG file, then building.

    The first thing that I would do is check reginit.ini in your _FLATRELEASEDIR.  Search the file for your value name, or value, or key and see if it shows up more than one time.   The last time it shows up is the value that will be used.



    Bruce Eitman (eMVP)
    Senior Engineer
    Bruce.Eitman AT Eurotech DOT com
    My BLOG http://geekswithblogs.net/bruceeitman
    I work for Eurotech

    • Marked as answer by RyreInc Monday, August 31, 2015 6:05 PM
    Monday, August 31, 2015 2:29 PM
    Moderator
  • Sure enough there are registry entries that conflict with the changes I am trying to make.

    After I edit the reginit.ini file, when I Build the platform the file is overwritten and the values revert back... how do I get it to accept the new data?

    I have opened every .reg file in the flat release directory (there are duplicates of these files in the \postproc folder as well) and searched for the registry entries I want to change. Everything is good here.

    I did just find this article which appears related: https://guruce.com/blogpost/what-to-build-when. Am I on the right path here?

    Monday, August 31, 2015 3:19 PM
  • reginit.ini is an output from makeimg (or actually fmerge, which is run by makeimg).  So, modifying it is not a practical solution.

    If you want to just do a quick test with your modified reginit.ini, open a build window from the Build menu and run "romimage ce.bib".

    But for the real solution, you will need to find the REG file that contains the information that you want to change - or try modifying your Platform.reg at the end of the file.



    Bruce Eitman (eMVP)
    Senior Engineer
    Bruce.Eitman AT Eurotech DOT com
    My BLOG http://geekswithblogs.net/bruceeitman
    I work for Eurotech


    Monday, August 31, 2015 4:03 PM
    Moderator
  • I have found that when I Build the BSP it is pulling registry files from C:\WINCE600\PLATFORM\AM35x_BSP\SRC instead of the release directory.

    I had previously found that I needed to copy files into subdirectories under the SRC folder in order to get a successful Sysgen and BSP build. It is apparently still referencing these files.

    Monday, August 31, 2015 4:09 PM
  • If I am following you correctly, that must mean that you modified your platform.reg to "#include" these other REG files.


    Bruce Eitman (eMVP)
    Senior Engineer
    Bruce.Eitman AT Eurotech DOT com
    My BLOG http://geekswithblogs.net/bruceeitman
    I work for Eurotech

    Monday, August 31, 2015 4:19 PM
    Moderator
  • So, after changing the REG files in that other location the changes go through as expected!

    Now the last remaining issue is that changes made to the registry from within the terminal are not saved after reboot.

    Monday, August 31, 2015 4:23 PM
  • You are correct, I see that now. This was included in the file before I laid hands on it. This explains some of the earlier troubles I was having doing a Sysgen.
    Monday, August 31, 2015 4:46 PM
  • I recommend that you mark this as answered, then create a new discussion thread for persisting registry.


    Bruce Eitman (eMVP)
    Senior Engineer
    Bruce.Eitman AT Eurotech DOT com
    My BLOG http://geekswithblogs.net/bruceeitman
    I work for Eurotech

    Monday, August 31, 2015 5:29 PM
    Moderator