2011-06-09 04:39:44     Cannot set video mode in SDL for 2101R1

Document created by Aaronwu Employee on Aug 27, 2013
Version 1Show Document
  • View in full screen mode

2011-06-09 04:39:44     Cannot set video mode in SDL for 2101R1

Chandrashekhar Lavania (INDIA)

Message: 101142   

 

Hi,

 

I am trying to build a simple SDL test app.

 

I am using 2010R1-RC4 toolchain.

 

I am using the 2010R1-RC5 distribution

 

I have an Display Initialization function which looks like the following:

 

 

 

int sdl_init(FPSmanager * manager)

{

    char *str = "SDL Test";

 

    // initializing SDL

    SDL_Init(SDL_INIT_EVERYTHING);

 

if (!(screen = SDL_SetVideoMode(WIDTH, HEIGHT, DEPTH, SDL_HWSURFACE))) {

 

printf("Could not set videomode of SDL::%s\n",SDL_GetError());

 

SDL_Quit();

return -1;

exit(0);

}

 

 

 

 

    // initialize the Frame rate manager

   SDL_initFramerate(&manager);

 

   // set new frame rate

  SDL_setFramerate(&manager, 10);

 

 

  int rate;

 

  // get the current frame rate

  rate= SDL_getFramerate(&manager);

  printf("\n Frame Rate is %d\n",rate);

 

  //setting font

  gfxPrimitivesSetFont(&SDL_gfx_font_5x7_fnt,5,7);

 

  //Label

  stringRGBA(screen, 55 , 105 ,str ,255,255,0,255);

 

  //Display screen on LCD

  SDL_Flip(screen);

  return 0;

}

 

 

 

 

When I try to execute it I get the following error:

Could not set videomode of SDL::Unable to open mouse

 

 

But when I compile the same code with 2009R1 and use the 2009R1 distribution, it works fine.

 

Any idea what I am missing here?

 

Regards,

Shekhar

QuoteReplyEditDelete

 

 

2011-06-09 10:19:32     Re: Cannot set video mode in SDL for 2101R1

Mike Frysinger (UNITED STATES)

Message: 101150   

 

presumably you dont have a mouse, so did you export the env var to disable it as the wiki documents ?

QuoteReplyEditDelete

Attachments

    Outcomes