video mode and portrait support? #37

Open
crazycoder1999 opened this Issue Dec 9, 2012 · 6 comments

Comments

Projects
None yet
2 participants

Hello,
I've managed to compile&run a sample project on a BBOS10 device with SDL found on the forum here: http://supportforums.blackberry.com/t5/Native-Development/Problems-getting-SDL-to-work/td-p/1569839 ... and it runs in 640x480... a video here http://www.youtube.com/watch?v=7Vq95As7RK8&feature=plcp

Now, I would like to know.. how to set the orientation in portrait with 768x1280?

Thanks you!

Member

jnicholl commented Dec 10, 2012

Hello,
Did you just take the package of SDLHelloWorld on the forum link and compile that, or did you actually build your own versions of SDL and TouchControlOverlay? To start with, the main.c provided in SDLHelloWorld specifies a resolution of 640x480, so that’s how it runs. If you want a larger resolution, you will need to change that.
At the time the SDLHelloWorld sample was posted on that forum, SDL did not support either portrait mode or resolutions larger than 1024x600 (maximum for PlayBook). SDL has been updated to support both portrait mode and larger resolutions now, but you would have to build SDL and TouchControlOverlay from source. Rotation is not supported, however, so the application will have to specify either portrait or landscape in the bar-descriptor.xml file.
Hope this helps!


This transmission (including any attachments) may contain confidential information, privileged material (including material protected by the solicitor-client or other applicable privileges), or constitute non-public information. Any use of this information by anyone other than the intended recipient is prohibited. If you have received this transmission in error, please immediately reply to the sender and delete this information from your system. Use, dissemination, distribution, or reproduction of this transmission by unintended recipients is not authorized and may be unlawful.

Ok thanks you for the answer! :)
Good to know that for rotation I have just to update the bar-descriptor.xml file.

I've used the 2 library compiled and found inside SDLHelloWorld and I've also changed the resolution from main.c but with no success.

If you can help me, giving me , some instruction, on how to build the two .so library from sources, I try to generate and update it in the example... cause I didn't know which are the steps to follow :) Than I will try and report again..
I've a Mac.

jnicholl 👍 thanks you

Member

jnicholl commented Dec 10, 2012

I'm assuming you're working inside the Momentics IDE, and you have a Git client?
First, use Git to clone both the SDL (git://github.com/blackberry/SDL.git) and TouchControlOverlay (git://github.com/blackberry/TouchControlOverlay.git) repositories. Once you have the two repositories, open your IDE and choose File->Import. Choose the parent directory which contains both SDL and TouchControlOverlay and import them as projects into your workspace.
Before building, check your Build Configuration, right-click on each project root (SDL and TouchControlOverlay) and choose Build Configurations->Set Active->Device-Debug (or Device-Release if you prefer). In order to build, just right-click on the project root and Build Project. Build TouchControlOverlay before SDL.
After that you may need to modify the SDLHelloWorld project to use your new libraries. The simplest way would be to copy the libSDL12.so and libTouchControlOverlay.so from their respective project directories (inside Device-Debug or Device-Release) into the lib_armle-v7 directory inside SDLHelloWorld. You may wish to back up the old versions in case something goes wrong. The lib_x86 directory is for simulator.
Then rebuild the SDLHelloWorld project.

Hope that helps!

Member

jnicholl commented Dec 14, 2012

Did those instructions help? How is it going?

Hey Jnicholl! 👍
thanks you for your answer.

I didn't tried yet since your response because I haven't got much time.... but I promise I'll do tomorrow and I reply here :)

Many thanks for your help

I've just compiled the 2 library following your information..and now it all works! :)
thanks you very much!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment