Results 1 to 4 of 4

Thread: Forcing lanscape left

  1. #1
    Lesser Wizard
    Join Date
    Nov 2010
    Location
    Los Angeles, California, United States, United States
    Posts
    126

    Default Forcing lanscape left

    The landscape lock seems to be hardcoded in Proton. How can I set up an app so it only renders for Landscape Left?

  2. #2
    Administrator Seth's Avatar
    Join Date
    Jul 2002
    Location
    Japan
    Posts
    5,380

    Default

    So you want to additionally lock it to only left orientation in addition to only landscape?

    This is untested, but this might work:

    Edit shared\util\RenderUtils.cpp and change:

    Code:
    bool CanRotateTo(int orientation)
    {
    	if (orientation ==  4 || orientation == 3)
    	{
    		return true;
    	}
    	if (GetLockedLandscape()) return false;
    
    	return true;
    }
    to:

    Code:
    bool CanRotateTo(int orientation)
    {
    	if (orientation ==  4)
    	{
    		return true;
    	}
    	if (GetLockedLandscape()) return false;
    
    	return true;
    }
    That should only allow "left landscape" I think. Make sure you did SetLockedLandscape(true); somewhere at init as well.
    Seth A. Robinson
    Robinson Technologies

  3. #3
    Lesser Wizard
    Join Date
    Nov 2010
    Location
    Los Angeles, California, United States, United States
    Posts
    126

    Default

    This appears to force the rendering to portrait.

  4. #4
    Lesser Wizard
    Join Date
    Nov 2010
    Location
    Los Angeles, California, United States, United States
    Posts
    126

    Default Found a hack/fix:

    Call
    SetupScreenInfoIPhone(4);

    in App::Init() after SetLockedLandscape(true);

    That did the trick. Seems like a bit of a hack, but it'll work for now.

    Thanks!

Bookmarks

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •