Salut j'ai député avec la sdl 2 en c mais j'ai un soucis je veux utiliser la fonction SDL_GetwindowSize.
Voici un extrait de mon code
Mais j'ai des valeurs qui ne correspondent pas à ce que je m'attendais a avoir
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19 SDL_Window *window=NULL; int *w=NULL,*h=NULL; if(SDL_Init(SDL_INIT_VIDEO)==NULL) { fprintf(stderr,"erreur %s",GetError()); goto Quit; } w=CreateWindow("fenêtre sdl",SDL_WINDOWPOS_UNDEFINED,SDL_WINDOWPOS_UNDEFINED,640,480,0); if(w==NULL) { fprintf (stderr,"erreur %s ",GetError()); goto Quit; } SDL_GetwindowSize(window,w,h); Printf ("%d,%d",w,h); SDL_Deplay(5000); SDL_DestroyWindow(window); Quit: SDL_Quit();
J'AI besoin d'aide merci
Masquer les messages précédents
Partager