Quick Links: Download Gideros Studio | Gideros Documentation | Gideros Development Center | Gideros community chat | DONATE
Landscape LEFT orientation — Gideros Forum

Landscape LEFT orientation

MysiaGamesMysiaGames Member
edited March 2013 in General questions
I set my project with this properties:

Landscape Left

I use on my program:

generalWidth = application:getContentWidth()
generalHeight = application:getContentHeight()

to access absolute logical coordinates from screen. The program works fine, and all object and relative positions works fine on different devices. But when i try to take a snapshot from the screen (POWER+HOME) i got the photo turned 90 degress. It seems that the device doesn't recognize the game is landscape orientation. How can i fix that?

Likes: Yan

+1 -1 (+1 / -0 )Share on Facebook


  • ScouserScouser Guru
    Accepted Answer
    I assume you are using the Gideros Player on your android device. If you are then you will notice it was written for a portrait device. If you want Android to recognise it as a landscape device, you will have to create your own version of the player. There are many tutorials on how to do that. Try this one. When you have exported the project to Eclipse, you need to change the AndroidManifest.xml file.

    Find the line which reads android:screenOrientation="portrait" and change it to read android:screenOrientation="landscape" Then continue to build your NewGiderosPlayer app.

    If you have done it correctly then when you run your app through the NewGiderosPlayer then the OS will recognise it as a landscape app.

    This is also how you change your app to landscape mode when you are ready to build it for release.

    @atilim: Squeak, Squeak as requested here :D
  • Now, i've created a executable on my iPad and i got some weird result. The setup is:

    - I've set Gideros project as Landscape Left orientation, no autorotation.
    - In XCode i've choose Landscape Left for iPhone and iPad devices. Only "landscape left" icon is in black, rest of icons are grey.
    - After run on my iPad, I see the landscape screen with volume buttons on top. That's right what i expected with "Landscape left" orientation.

    But when i press volume control, the volume icon appear turned in 180 degress. The notification slide tab, show on screen bottom. It's like the screen is turned 180 degress.
    What could be the mistake? Even, the Launch images show me turned 180 degress.
  • Well, it seems that Landscape left on Gideros is not Landscape left on Iphone devices. I had to choose Landscape Left on Gideros, and on XCode I choose Landscape Right. After that, all the app looks fine on my iPad with slide notifications correctly at top, and volumen icon right too.

    However, i got an error on the iPad emulator, i guess maybe this is the key why my app is rejected on the Store. This is the error:

    'Supported orientations has no common orientation with the application, and shouldAutorotate is returning YES'

    Well, anyone here did a landscape app, what configuration take for Gideros and Xcode software in order to get a good executable?
  • ar2rsawseenar2rsawseen Maintainer
    @MysiaGames why would you disable autorotation? Isn't it mandatory practice from apple?
  • I disable autorotation, because i see some stripes of 1 pixel along my blocks. I guess should be because some strange effect of the autoscale retina to ipad2 graphics. But when i set with autorotation NO i got the screen right with any stripe on it.
  • I fix the stripes using only pair coordinates. The autoscaling has problem with odd values. The executable works fine on my iPad2, but with emulator i read the following error:

    "music.mp3 : No such file or directory."

    and the execution stop in emulator. That's strange, however works fine on real device. What can i do to avoid this error?
  • I've change the order of loading the assets, and this made the magic for me. No errors now on simulator. Perhaps, now my game could pass the store checking.
  • ar2rsawseenar2rsawseen Maintainer
    Wow, you are fast and figuring out stuff :)
    Perhaps, now my game could pass the store checking.
    Fingers crossed ;)

Sign In or Register to comment.