Skip to content
This repository
Browse code

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...
commit 34a7ceb8562abb26d0c225a36a0ceb67bde28ea2 1 parent 20ad647
Anthony Hu authored
9 test/deploy_to_playbook.sh
@@ -22,11 +22,12 @@
22 22 #since we use relative paths, please make sure you run this
23 23 #script in the directory where you found it.
24 24
25   -if [ $# -ne 3 ]
  25 +if [ $# -ne 4 ]
26 26 then
27   - echo "Usage: `basename $0` <testapp> <playbook_ipaddr> <playbook_password>"
  27 + echo "Usage: `basename $0` <testapp> <playbook_ipaddr> <playbook_password> [8bpp | 32bpp]"
28 28 exit -1
29 29 fi
  30 +
30 31 cp ../../TouchControlOverlay/Device-Debug/libTouchControlOverlay.so ../playbook_prefix/lib/
31 32 echo "<qnx>" > blackberry-tablet.xml
32 33 echo " <id>org.libsdl.$1</id>" >> blackberry-tablet.xml
@@ -51,6 +52,10 @@ echo " <asset path=\"sample.wav\">sample.wav</asset>" >> blackberry-tablet.xml
51 52 echo " <asset path=\"moose.dat\">moose.dat</asset>" >> blackberry-tablet.xml
52 53 echo " <asset path=\"utf8.txt\">utf8.txt</asset>" >> blackberry-tablet.xml
53 54
  55 +if [ "$4" = "8bpp" ]
  56 +then
  57 + echo " <env var=\"SDL_VIDEODRIVER\" value=\"pb-8bit\"/>" >> blackberry-tablet.xml
  58 +fi
54 59 echo " <env var=\"LD_LIBRARY_PATH\" value=\"app/native/lib\"/>" >> blackberry-tablet.xml
55 60 echo "</qnx>" >> blackberry-tablet.xml
56 61
2  test/graywin.c
@@ -148,7 +148,7 @@ int main(int argc, char *argv[])
148 148 /* See if we try to get a hardware colormap */
149 149 width = 640;
150 150 height = 480;
151   - bpp = 32;
  151 + bpp = 8;
152 152 videoflags = SDL_SWSURFACE;
153 153 while ( argc > 1 ) {
154 154 --argc;
2  test/testcursor.c
@@ -152,7 +152,7 @@ int main(int argc, char *argv[])
152 152 return(1);
153 153 }
154 154
155   - screen = SDL_SetVideoMode(320,200,32,SDL_ANYFORMAT);
  155 + screen = SDL_SetVideoMode(320,200,8,SDL_ANYFORMAT);
156 156 if (screen==NULL) {
157 157 fprintf(stderr, "Couldn't initialize video mode: %s\n",SDL_GetError());
158 158 return(1);
2  test/testsprite.c
@@ -170,7 +170,7 @@ int main(int argc, char *argv[])
170 170 videoflags = SDL_SWSURFACE|SDL_ANYFORMAT;
171 171 width = 640;
172 172 height = 480;
173   - video_bpp = 32;
  173 + video_bpp = 8;
174 174 debug_flip = 0;
175 175 while ( argc > 1 ) {
176 176 --argc;
2  test/testwm.c
@@ -348,7 +348,7 @@ int main(int argc, char *argv[])
348 348 /* Check command line arguments */
349 349 w = 640;
350 350 h = 480;
351   - video_bpp = 32;
  351 + video_bpp = 8;
352 352 video_flags = SDL_SWSURFACE;
353 353 parsed = 1;
354 354 while ( parsed ) {
2  test/threadwin.c
@@ -236,7 +236,7 @@ int main(int argc, char *argv[])
236 236
237 237 /* Set the options, based on command line arguments */
238 238 init_flags = SDL_INIT_VIDEO;
239   - video_bpp = 32;
  239 + video_bpp = 8;
240 240 video_flags = SDL_SWSURFACE;
241 241 parsed = 1;
242 242 while ( parsed ) {

0 comments on commit 34a7ceb

Please sign in to comment.
Something went wrong with that request. Please try again.