Difference between revisions of "LibSDL Research"

From WebOS Internals
Jump to navigation Jump to search
(Add a bug from personal experience)
 
(2 intermediate revisions by 2 users not shown)
Line 55: Line 55:
  
 
== SDL Extensions on Pre ==
 
== SDL Extensions on Pre ==
SDL_Image
+
SDL_Image <br>
SDL_TTF
+
SDL_TTF<br>
  
 
== SDL Nuances ==
 
== SDL Nuances ==
- Only supports SDSURFACE and ..
+
- Only supports SDSURFACE and .. <br>
- Does not support Double Buffering = SDL_Flip
+
- Does not support Double Buffering = SDL_Flip<br>
- SDL_Image did not appear to handle PNG files correctly (zonyl)
+
- SDL_Image did not appear to handle PNG files correctly (zonyl)<br>
 +
- SDL_GetTicks on Pixi WebOS 1.4.5 (at least), occasionally returns values in the past. This isn't really SDL's fault, but software using SDL_GetTicks may need to take this into account.
  
 
== SDL Input Devices ==
 
== SDL Input Devices ==
Line 72: Line 73:
 
If SDL_vnc works, would be a way of running arbitrary X11 applications on the Palm Pre:  
 
If SDL_vnc works, would be a way of running arbitrary X11 applications on the Palm Pre:  
 
[http://www.ferzkopp.net/Software/SDL_vnc/ SDL_vnc]
 
[http://www.ferzkopp.net/Software/SDL_vnc/ SDL_vnc]
 +
 +
'''Update:''' This has now been done; see [[Application:SdlVNC]] :-)
  
 
=== SDL Terminal ===
 
=== SDL Terminal ===
 
A pseudo-ansi SDL terminal (or console) library - [http://sourceforge.net/projects/sdl-terminal/ sdl-terminal]
 
A pseudo-ansi SDL terminal (or console) library - [http://sourceforge.net/projects/sdl-terminal/ sdl-terminal]

Latest revision as of 05:23, 29 July 2011


Source material

[ http://palm.cdnetworks.net/opensource/1.3.5/libsdl-1.2.tgz (base SDL Lib)]

[ http://palm.cdnetworks.net/opensource/1.3.5/libsdl-1.2-patch.gz (Palm patches)]

New files in patch

patch -p0 < ../libsdl-1.2-patch > /dev/null gives us only new files


Patching

tar xvzf libsdl-1.2.tgz && zcat libsdl-1.2-patch.gz | patch -p0

Compiling

Currently this fails to compile due to missing Piranha headers:

sh autogen.sh; ./configure --disable-ipod --enable-webos --enable-video-opengles

 gcc -g -O2 -I./include -D_GNU_SOURCE=1 -fvisibility=hidden -Werror-implicit-function-declaration -DPALM -D_REENTRANT -DHAVE_LINUX_VERSION_H -c ./src/video/fbcon/SDL_fbvideo.c -o build/SDL_fbvideo.o >/dev/null 2>&1
/bin/sh ./libtool --mode=compile gcc -g -O2  -I./include -D_GNU_SOURCE=1 -fvisibility=hidden -Werror-implicit-function-declaration -DPALM -D_REENTRANT -DHAVE_LINUX_VERSION_H -c ./src/video/fbcon/SDL_fbvfb.cc  -o build/SDL_fbvfb.lo
 gcc -g -O2 -I./include -D_GNU_SOURCE=1 -fvisibility=hidden -Werror-implicit-function-declaration -DPALM -D_REENTRANT -DHAVE_LINUX_VERSION_H -c ./src/video/fbcon/SDL_fbvfb.cc  -fPIC -DPIC -o build/.libs/SDL_fbvfb.o
cc1plus: warning: command line option "-Werror-implicit-function-declaration" is valid for C/ObjC but not for C++
./src/video/fbcon/SDL_fbvfb.cc:5:30: error: Piranha/PContext.h: No such file or directory
./src/video/fbcon/SDL_fbvfb.cc:6: error: 'PContext2D' does not name a type
./src/video/fbcon/SDL_fbvfb.cc: In function 'void FB_VfbBlit(FB_VfbBlitSurface*, FB_VfbBlitSurface*, int)':
./src/video/fbcon/SDL_fbvfb.cc:13: error: 'PPixmap' was not declared in this scope
./src/video/fbcon/SDL_fbvfb.cc:13: error: 'DstPix' was not declared in this scope
./src/video/fbcon/SDL_fbvfb.cc:13: error: 'Context' was not declared in this scope
./src/video/fbcon/SDL_fbvfb.cc:14: error: 'PFORMAT_8888' was not declared in this scope
./src/video/fbcon/SDL_fbvfb.cc:18: error: 'SrcPix' was not declared in this scope
./src/video/fbcon/SDL_fbvfb.cc:21: error: 'PMatrix3D' was not declared in this scope
./src/video/fbcon/SDL_fbvfb.cc:21: error: expected `;' before 'Transform'
./src/video/fbcon/SDL_fbvfb.cc:23: error: 'Transform' was not declared in this scope
./src/video/fbcon/SDL_fbvfb.cc:23: error: 'PValue' was not declared in this scope
./src/video/fbcon/SDL_fbvfb.cc:24: error: 'PVertex2D' was not declared in this scope
./src/video/fbcon/SDL_fbvfb.cc:26: error: 'Transform' was not declared in this scope
./src/video/fbcon/SDL_fbvfb.cc:28: error: 'PVertex2D' was not declared in this scope
./src/video/fbcon/SDL_fbvfb.cc:28: error: expected `;' before 'DstStart'
./src/video/fbcon/SDL_fbvfb.cc:29: error: expected `;' before 'DstEnd'
./src/video/fbcon/SDL_fbvfb.cc:31: error: expected `;' before 'SrcStart'
./src/video/fbcon/SDL_fbvfb.cc:32: error: expected `;' before 'SrcEnd'
./src/video/fbcon/SDL_fbvfb.cc:37: error: 'DstStart' was not declared in this scope
./src/video/fbcon/SDL_fbvfb.cc:37: error: 'DstEnd' was not declared in this scope
./src/video/fbcon/SDL_fbvfb.cc:37: error: 'SrcStart' was not declared in this scope
./src/video/fbcon/SDL_fbvfb.cc:37: error: 'SrcEnd' was not declared in this scope
make: *** [build/SDL_fbvfb.lo] Error 1
root@castle:~/libsdl-1.2#

SDL Extensions on Pre

SDL_Image
SDL_TTF

SDL Nuances

- Only supports SDSURFACE and ..
- Does not support Double Buffering = SDL_Flip
- SDL_Image did not appear to handle PNG files correctly (zonyl)
- SDL_GetTicks on Pixi WebOS 1.4.5 (at least), occasionally returns values in the past. This isn't really SDL's fault, but software using SDL_GetTicks may need to take this into account.

SDL Input Devices

Joysticks

SDL Applications

Via WebOS 1.3.5+ - Palm's Native webOS App Secrets Revealed

SDL_vnc

If SDL_vnc works, would be a way of running arbitrary X11 applications on the Palm Pre: SDL_vnc

Update: This has now been done; see Application:SdlVNC :-)

SDL Terminal

A pseudo-ansi SDL terminal (or console) library - sdl-terminal