[SDL] is there anything wrong with my code?

sappfaye-dsl at yahoo.com.cn sappfaye-dsl at yahoo.com.cn
Sat Jun 18 22:38:22 PDT 2005


hi,all,
       i wrote some simple codes to test whether SDL can work in my computer.codes below:
 
#testSDL.c
#include"SDL.h"
#include"stdlib.h"
#include"stdio.h"
 
int main(int argc,char * argv[])
{
    if(-1==(SDL_Init(SDL_INIT_VIDEO)))
         {
            printf("SDL cannot be initialized.\n");
         }
    printf("SDL initialized\n");
    SDL_Quit();
}
 
I compiled it using "gcc testSDL.c -I /usr/local/include -L /usr/local/lib -lSDL -o testSDL",but when i executed testSDL,the console revolution changed to 320x200 immediately both in my debian and LFS(i donot use X,i executed testSDL in console mode),is there anything wrong in my codes???please give me some suggestions, thanks a lot!



		
---------------------------------
DO YOU YAHOO!?
  雅虎免费G邮箱-No.1的防毒防垃圾超大邮箱  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.libsdl.org/pipermail/sdl-libsdl.org/attachments/20050619/5b41db8b/attachment-0007.htm>


More information about the SDL mailing list