Skip to content
This repository has been archived by the owner on Sep 4, 2019. It is now read-only.

Commit

Permalink
Allow both 32bpp and 8bpp
Browse files Browse the repository at this point in the history
In an earlier commit we changed all the test to do 32 bpp.

We revert those changes since we have an environment variable
that allows 8bpp.  However, the overlay tests cannot run on
8bpp drivers so we cannot always have that environment
variable active for each of the tests.  Thus a command
line paramater to enable that environment variable.
  • Loading branch information
Anthony Hu committed Dec 22, 2011
1 parent 20ad647 commit 34a7ceb
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 7 deletions.
9 changes: 7 additions & 2 deletions test/deploy_to_playbook.sh
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -22,11 +22,12 @@
#since we use relative paths, please make sure you run this #since we use relative paths, please make sure you run this
#script in the directory where you found it. #script in the directory where you found it.


if [ $# -ne 3 ] if [ $# -ne 4 ]
then then
echo "Usage: `basename $0` <testapp> <playbook_ipaddr> <playbook_password>" echo "Usage: `basename $0` <testapp> <playbook_ipaddr> <playbook_password> [8bpp | 32bpp]"
exit -1 exit -1
fi fi

cp ../../TouchControlOverlay/Device-Debug/libTouchControlOverlay.so ../playbook_prefix/lib/ cp ../../TouchControlOverlay/Device-Debug/libTouchControlOverlay.so ../playbook_prefix/lib/
echo "<qnx>" > blackberry-tablet.xml echo "<qnx>" > blackberry-tablet.xml
echo " <id>org.libsdl.$1</id>" >> blackberry-tablet.xml echo " <id>org.libsdl.$1</id>" >> blackberry-tablet.xml
Expand All @@ -51,6 +52,10 @@ echo " <asset path=\"sample.wav\">sample.wav</asset>" >> blackberry-tablet.xml
echo " <asset path=\"moose.dat\">moose.dat</asset>" >> blackberry-tablet.xml echo " <asset path=\"moose.dat\">moose.dat</asset>" >> blackberry-tablet.xml
echo " <asset path=\"utf8.txt\">utf8.txt</asset>" >> blackberry-tablet.xml echo " <asset path=\"utf8.txt\">utf8.txt</asset>" >> blackberry-tablet.xml


if [ "$4" = "8bpp" ]
then
echo " <env var=\"SDL_VIDEODRIVER\" value=\"pb-8bit\"/>" >> blackberry-tablet.xml
fi
echo " <env var=\"LD_LIBRARY_PATH\" value=\"app/native/lib\"/>" >> blackberry-tablet.xml echo " <env var=\"LD_LIBRARY_PATH\" value=\"app/native/lib\"/>" >> blackberry-tablet.xml
echo "</qnx>" >> blackberry-tablet.xml echo "</qnx>" >> blackberry-tablet.xml


Expand Down
2 changes: 1 addition & 1 deletion test/graywin.c
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ int main(int argc, char *argv[])
/* See if we try to get a hardware colormap */ /* See if we try to get a hardware colormap */
width = 640; width = 640;
height = 480; height = 480;
bpp = 32; bpp = 8;
videoflags = SDL_SWSURFACE; videoflags = SDL_SWSURFACE;
while ( argc > 1 ) { while ( argc > 1 ) {
--argc; --argc;
Expand Down
2 changes: 1 addition & 1 deletion test/testcursor.c
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ int main(int argc, char *argv[])
return(1); return(1);
} }


screen = SDL_SetVideoMode(320,200,32,SDL_ANYFORMAT); screen = SDL_SetVideoMode(320,200,8,SDL_ANYFORMAT);
if (screen==NULL) { if (screen==NULL) {
fprintf(stderr, "Couldn't initialize video mode: %s\n",SDL_GetError()); fprintf(stderr, "Couldn't initialize video mode: %s\n",SDL_GetError());
return(1); return(1);
Expand Down
2 changes: 1 addition & 1 deletion test/testsprite.c
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ int main(int argc, char *argv[])
videoflags = SDL_SWSURFACE|SDL_ANYFORMAT; videoflags = SDL_SWSURFACE|SDL_ANYFORMAT;
width = 640; width = 640;
height = 480; height = 480;
video_bpp = 32; video_bpp = 8;
debug_flip = 0; debug_flip = 0;
while ( argc > 1 ) { while ( argc > 1 ) {
--argc; --argc;
Expand Down
2 changes: 1 addition & 1 deletion test/testwm.c
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -348,7 +348,7 @@ int main(int argc, char *argv[])
/* Check command line arguments */ /* Check command line arguments */
w = 640; w = 640;
h = 480; h = 480;
video_bpp = 32; video_bpp = 8;
video_flags = SDL_SWSURFACE; video_flags = SDL_SWSURFACE;
parsed = 1; parsed = 1;
while ( parsed ) { while ( parsed ) {
Expand Down
2 changes: 1 addition & 1 deletion test/threadwin.c
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -236,7 +236,7 @@ int main(int argc, char *argv[])


/* Set the options, based on command line arguments */ /* Set the options, based on command line arguments */
init_flags = SDL_INIT_VIDEO; init_flags = SDL_INIT_VIDEO;
video_bpp = 32; video_bpp = 8;
video_flags = SDL_SWSURFACE; video_flags = SDL_SWSURFACE;
parsed = 1; parsed = 1;
while ( parsed ) { while ( parsed ) {
Expand Down

0 comments on commit 34a7ceb

Please sign in to comment.