taille plateau max
This commit is contained in:
parent
269fa59870
commit
4b335e6825
@ -52,7 +52,7 @@ int menu_taille (SDL_Surface* window, scrolling_t scroll)
|
|||||||
break;
|
break;
|
||||||
case M_RIGHT :
|
case M_RIGHT :
|
||||||
{
|
{
|
||||||
if (param->size < SIZE_MAX)
|
if (param->size < MAXSIZE)
|
||||||
{
|
{
|
||||||
++param->size;
|
++param->size;
|
||||||
sprintf (entries [2], "%dx%d", param->size, param->size);
|
sprintf (entries [2], "%dx%d", param->size, param->size);
|
||||||
@ -175,7 +175,6 @@ int menu_charger (SDL_Surface* window, scrolling_t scroll, char** file)
|
|||||||
cur = nb_sav - 1;
|
cur = nb_sav - 1;
|
||||||
else
|
else
|
||||||
--cur;
|
--cur;
|
||||||
printf ("%d\n", cur);
|
|
||||||
sprintf (entries [2], "%s", liste[cur]);
|
sprintf (entries [2], "%s", liste[cur]);
|
||||||
vec2 c = m->cur;
|
vec2 c = m->cur;
|
||||||
m->cur.x = 1;
|
m->cur.x = 1;
|
||||||
@ -187,7 +186,6 @@ int menu_charger (SDL_Surface* window, scrolling_t scroll, char** file)
|
|||||||
case M_RIGHT :
|
case M_RIGHT :
|
||||||
{
|
{
|
||||||
cur = (cur + 1) % nb_sav;
|
cur = (cur + 1) % nb_sav;
|
||||||
printf ("%d\n", cur);
|
|
||||||
sprintf (entries [2], "%s", liste[cur]);
|
sprintf (entries [2], "%s", liste[cur]);
|
||||||
vec2 c = m->cur;
|
vec2 c = m->cur;
|
||||||
m->cur.x = 1;
|
m->cur.x = 1;
|
||||||
|
@ -103,7 +103,7 @@ int chargement(char *nom , int **tab, int *IA)
|
|||||||
return ERROR_IA;
|
return ERROR_IA;
|
||||||
}
|
}
|
||||||
fscanf(f_chargement, "%d", &taille);
|
fscanf(f_chargement, "%d", &taille);
|
||||||
if(taille<1 || taille > SIZE_MAX){
|
if(taille<1 || taille > MAXSIZE){
|
||||||
return ERROR_SIZE;
|
return ERROR_SIZE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
10
src/window.c
10
src/window.c
@ -97,17 +97,19 @@ SDL_Surface* fullscreen_window (SDL_Surface* window)
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
SDL_Rect** modes = SDL_ListModes(window->format, SDL_HWSURFACE | SDL_FULLSCREEN | SDL_DOUBLEBUF);
|
SDL_Rect** modes = SDL_ListModes(window->format, SDL_HWSURFACE | SDL_FULLSCREEN | SDL_DOUBLEBUF);
|
||||||
if(modes == (SDL_Rect **)0)
|
/*if(modes == (SDL_Rect **)0)
|
||||||
{
|
{
|
||||||
printf("No modes available!\n");
|
printf("No modes available!\n");
|
||||||
}
|
}*/
|
||||||
|
|
||||||
/* Check if our resolution is restricted */
|
/* Check if our resolution is restricted */
|
||||||
if(modes == (SDL_Rect **)-1)
|
/*if(modes == (SDL_Rect **)-1)
|
||||||
{
|
{
|
||||||
printf("All resolutions available.\n");
|
printf("All resolutions available.\n");
|
||||||
}
|
}
|
||||||
else{
|
else{*/
|
||||||
|
if(modes != (SDL_Rect **)-1)
|
||||||
|
{
|
||||||
/* Print valid modes
|
/* Print valid modes
|
||||||
printf("Available Modes\n");
|
printf("Available Modes\n");
|
||||||
for(int i=0;modes[i];++i)
|
for(int i=0;modes[i];++i)
|
||||||
|
Loading…
Reference in New Issue
Block a user