Permalink
Browse files

Allow both 32bpp and 8bpp

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...
1 parent 20ad647 commit 34a7ceb8562abb26d0c225a36a0ceb67bde28ea2 Anthony Hu committed Dec 22, 2011
Showing with 12 additions and 7 deletions.
  1. +7 −2 test/deploy_to_playbook.sh
  2. +1 −1 test/graywin.c
  3. +1 −1 test/testcursor.c
  4. +1 −1 test/testsprite.c
  5. +1 −1 test/testwm.c
  6. +1 −1 test/threadwin.c
View
9 test/deploy_to_playbook.sh
@@ -22,11 +22,12 @@
#since we use relative paths, please make sure you run this
#script in the directory where you found it.
-if [ $# -ne 3 ]
+if [ $# -ne 4 ]
then
- echo "Usage: `basename $0` <testapp> <playbook_ipaddr> <playbook_password>"
+ echo "Usage: `basename $0` <testapp> <playbook_ipaddr> <playbook_password> [8bpp | 32bpp]"
exit -1
fi
+
cp ../../TouchControlOverlay/Device-Debug/libTouchControlOverlay.so ../playbook_prefix/lib/
echo "<qnx>" > blackberry-tablet.xml
echo " <id>org.libsdl.$1</id>" >> blackberry-tablet.xml
@@ -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=\"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 "</qnx>" >> blackberry-tablet.xml
View
2 test/graywin.c
@@ -148,7 +148,7 @@ int main(int argc, char *argv[])
/* See if we try to get a hardware colormap */
width = 640;
height = 480;
- bpp = 32;
+ bpp = 8;
videoflags = SDL_SWSURFACE;
while ( argc > 1 ) {
--argc;
View
2 test/testcursor.c
@@ -152,7 +152,7 @@ int main(int argc, char *argv[])
return(1);
}
- screen = SDL_SetVideoMode(320,200,32,SDL_ANYFORMAT);
+ screen = SDL_SetVideoMode(320,200,8,SDL_ANYFORMAT);
if (screen==NULL) {
fprintf(stderr, "Couldn't initialize video mode: %s\n",SDL_GetError());
return(1);
View
2 test/testsprite.c
@@ -170,7 +170,7 @@ int main(int argc, char *argv[])
videoflags = SDL_SWSURFACE|SDL_ANYFORMAT;
width = 640;
height = 480;
- video_bpp = 32;
+ video_bpp = 8;
debug_flip = 0;
while ( argc > 1 ) {
--argc;
View
2 test/testwm.c
@@ -348,7 +348,7 @@ int main(int argc, char *argv[])
/* Check command line arguments */
w = 640;
h = 480;
- video_bpp = 32;
+ video_bpp = 8;
video_flags = SDL_SWSURFACE;
parsed = 1;
while ( parsed ) {
View
2 test/threadwin.c
@@ -236,7 +236,7 @@ int main(int argc, char *argv[])
/* Set the options, based on command line arguments */
init_flags = SDL_INIT_VIDEO;
- video_bpp = 32;
+ video_bpp = 8;
video_flags = SDL_SWSURFACE;
parsed = 1;
while ( parsed ) {

0 comments on commit 34a7ceb

Please sign in to comment.