[maemo-developers] [maemo-developers] How to init SDL on the N770

From: klaus at rotters.de klaus at rotters.de
Date: Wed Oct 26 02:13:50 EEST 2005
Hello,

I got my Nokia 770 device and I started to port my first project, a bomberman clone 
for the N 770. (see at www.rotters.de for the Sharp Zaurus). I could run it quite nicely 
on the PC-x86 in scratchbox, but it would not run on the real device. It dies by calling 
SDL_init and says: "No available video device".

I have tried to run a very simple SDL program, but it dies also with this error 
message:

#include <stdlib.h>
#include <SDL.h>
int main(int argc, char *argv[])
{
   SDL_Surface *screen;
   if (SDL_Init(SDL_INIT_VIDEO) == -1) {
       printf("Can't init SDL:  %s\n", SDL_GetError());
       exit(1);
   }
   atexit(SDL_Quit); 
   screen = SDL_SetVideoMode(800, 480, 16, SDL_HWSURFACE);
   if (screen == NULL) {
       printf("Can't set video mode: %s\n", SDL_GetError());
       exit(1);
   }   
   SDL_Delay(3000);
   return 0;
}

How can i correctly Init SDL under Maemo? I have searched the docs but found 
nothing useful.

Thanks, -Klaus
-- 
 Klaus Rotter * klaus <at> rotters <dot> de * www.rotters.de


More information about the maemo-developers mailing list