SDL 1.3 iPhone hacking

Hello guys,

I’m currently hacking an iPhone app using SDL 1.3 and I found some limitations… after studying the SDL source code, especially the video/uikit part I’ve got ideas how to improve it a little bit. Question is, should I modify my local copy of SDL to my needs or I can send you patches?

  1. Text input is hacked together and it’s sending keys to the event queue using SDL_SendKeyboardKey … I bet this will work for default keyboard, but when it comes to different languages I think it won’t work properly. I think it should be using TextEditing and TextInput events … I think this could be fixed pretty quickly.

  2. Keyboard is using default “return” key defined as: textField.returnKeyType = UIReturnKeyDefault; … however there are more types of return keys available and it should be really easy to add iphone helper function to modify this key.

  3. Same as above for keyboard appearance: textField.keyboardAppearance = UIKeyboardAppearanceDefault; … there’s also transparent version of the keyboard.

  4. Also if I understand this one correctly: textField.secureTextEntry = NO; … when this is changed to YES you are allowed to accept passwords with hidden characters.

So what do you think, is anybody working on the UIKit part of the SDL or should I start hacking it myself? :slight_smile:

Pavel

I forgot one small thing.

When my SDL application starts on the iphone, it starts with correctly displayed Default.png as splash image, then when my app starts and before I draw something, screen goes to black for 1 second and it looks kinda annoying. Can anybody tell me if this is a limitation of SDL currently or if this could be fixed somehow? Maybe when the UIKit view is created it is cleared to black or something … and it shouldn’t … any ideas??

PavelOn 1.10.2010, at 22:33, Pavel Kanzelsberger wrote:

Hello guys,

I’m currently hacking an iPhone app using SDL 1.3 and I found some limitations… after studying the SDL source code, especially the video/uikit part I’ve got ideas how to improve it a little bit. Question is, should I modify my local copy of SDL to my needs or I can send you patches?

  1. Text input is hacked together and it’s sending keys to the event queue using SDL_SendKeyboardKey … I bet this will work for default keyboard, but when it comes to different languages I think it won’t work properly. I think it should be using TextEditing and TextInput events … I think this could be fixed pretty quickly.

  2. Keyboard is using default “return” key defined as: textField.returnKeyType = UIReturnKeyDefault; … however there are more types of return keys available and it should be really easy to add iphone helper function to modify this key.

  3. Same as above for keyboard appearance: textField.keyboardAppearance = UIKeyboardAppearanceDefault; … there’s also transparent version of the keyboard.

  4. Also if I understand this one correctly: textField.secureTextEntry = NO; … when this is changed to YES you are allowed to accept passwords with hidden characters.

So what do you think, is anybody working on the UIKit part of the SDL or should I start hacking it myself? :slight_smile:

Pavel

Hi again,

sorry to flood the mailing list, but I was testing with iPhone4 and it seems that SDL by default loads in 320x480 mode with that 2x scaling for older applications.

I see in SDL_uikitvideo.m that displays are being supported because of iPad. Could this be somehow extended to supports also retina display and resolution of 640x960 pixels? I was trying to create a window with 640x960 but SDL created 320x480 anyway :frowning:

PavelOn 1.10.2010, at 22:40, Pavel Kanzelsberger wrote:

I forgot one small thing.

When my SDL application starts on the iphone, it starts with correctly displayed Default.png as splash image, then when my app starts and before I draw something, screen goes to black for 1 second and it looks kinda annoying. Can anybody tell me if this is a limitation of SDL currently or if this could be fixed somehow? Maybe when the UIKit view is created it is cleared to black or something … and it shouldn’t … any ideas??

Pavel

On 1.10.2010, at 22:33, Pavel Kanzelsberger wrote:

Hello guys,

I’m currently hacking an iPhone app using SDL 1.3 and I found some limitations… after studying the SDL source code, especially the video/uikit part I’ve got ideas how to improve it a little bit. Question is, should I modify my local copy of SDL to my needs or I can send you patches?

  1. Text input is hacked together and it’s sending keys to the event queue using SDL_SendKeyboardKey … I bet this will work for default keyboard, but when it comes to different languages I think it won’t work properly. I think it should be using TextEditing and TextInput events … I think this could be fixed pretty quickly.

  2. Keyboard is using default “return” key defined as: textField.returnKeyType = UIReturnKeyDefault; … however there are more types of return keys available and it should be really easy to add iphone helper function to modify this key.

  3. Same as above for keyboard appearance: textField.keyboardAppearance = UIKeyboardAppearanceDefault; … there’s also transparent version of the keyboard.

  4. Also if I understand this one correctly: textField.secureTextEntry = NO; … when this is changed to YES you are allowed to accept passwords with hidden characters.

So what do you think, is anybody working on the UIKit part of the SDL or should I start hacking it myself? :slight_smile:

Pavel

Hi Pavel,

Sorry I have no replies for you – just wanted to let you know I’ll be doing an iPhone game shortly, and am following this thread with interest. If you resolve any of these issues, please post what you changed!

Hi,

yes I already resolved many of the issues myself and I’m about to finish my first iPhone app using SDL with combination of OpenGL ES, Quartz 2D and CoreText … will send some screenshots if anybody is interested :slight_smile:

PavelOn 19.10.2010, at 6:39, VernJensen wrote:

Hi Pavel,

Sorry I have no replies for you – just wanted to let you know I’ll be doing an iPhone game shortly, and am following this thread with interest. If you resolve any of these issues, please post what you changed!


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org


Pavel Kanzelsberger


E-Mail: pavel at kanzelsberger.com
Jabber: kanzelsberger at jabber.org, ICQ: 20990633

Start here

http://code.google.com/p/ffmpeg4iphone/source/browse/#svn/WebStreamx

Then look at this , please note wait a day or so, we started this beta last year, then got contacted and employed by a significant player in media tech, so its incomplete. the svn has been down since the last storm, but we’ve had a lot of request for the code so I will try to get it up today or tomorrow or move it to a new svn.

Webstreamx should keep you busy for a why though.

http://sol3.typepad.com/streamx_building_an_iphon/

There are apps in the appstore that have used the codebase as a beginning. Performance on the iphone is exceptional.

There are lots of changes to the uikit.

The streampad version on the svn has more updated sdl plus additional ffmpeg patches for rtsp, mms, therora etc.

enjoy.

search for my other posts for sdl / iphone iphone tutorials.

Pavel Kanzelsberger wrote:> Hi,

yes I already resolved many of the issues myself and I’m about to finish my first iPhone app using SDL with combination of OpenGL ES, Quartz 2D and CoreText … will send some screenshots if anybody is interested :slight_smile:

Pavel

On 19.10.2010, at 6:39, VernJensen wrote:

Hi Pavel,

Sorry I have no replies for you – just wanted to let you know I’ll be doing an iPhone game shortly, and am following this thread with interest. If you resolve any of these issues, please post what you changed!


SDL mailing list
SDL at lists.libsdl.org (SDL at lists.libsdl.org)
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org (http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org)


Pavel Kanzelsberger
http://www.kanzelsberger.com (http://www.kanzelsberger.com)
E-Mail: pavel at kanzelsberger.com (pavel at kanzelsberger.com)
Jabber: kanzelsberger at jabber.org (kanzelsberger at jabber.org), ICQ: 20990633

Pavel – Have you submitted your bugs (and fixes) to the SDL bug tracking system? If not, would you post your fixes here?

michelleC – what is WebStreamx?