Video modes can now be windowed or fullscreen. Quite hacky, however. We would need a way to :

-Easily change the number of video modes in the list (i'd like to use my 1440x900 screen at full resoluution !)
-Maybe add a resizeable window mode, but that would require more work, so i'd like to keep that for 2.0 .

In the meantime, i've made the list symetric, ie, mode are loaded from the cfg file and when the list is processed, each mode is copied to a fullscreen equivalent. Note this way of doing things will prevent the config file to save the selected video mode properly, so the program will switch to the default 800x600 windowed. When you load an image, Grafx2 will switch back to windowed mode when selecting the appropriate resolution for that image.

The NB_MODES_VIDEO constant is also only the HALF of the actually available video modes


git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@183 416bcca6-2ee7-4201-b75f-2eb2f807beb1
This commit is contained in:
Adrien Destugues
2008-09-30 15:12:40 +00:00
parent cd6b94f594
commit 92c4340dbd
8 changed files with 119 additions and 1456 deletions

View File

@@ -72,11 +72,11 @@ struct S_Mode_video
word Facteur_Y;
char Ratio[5];
signed char Refresh; // <0 => entrelacé
word Mode_VESA_de_base;
word Fullscreen;
void * Pointeur;
byte Etat; // 0:Cool 1:OK ; 2:Bof ; 3:Naze ; si on rajoute +128 => incompatible
};
GLOBAL struct S_Mode_video Mode_video[NB_MODES_VIDEO];
GLOBAL struct S_Mode_video Mode_video[2*NB_MODES_VIDEO];
GLOBAL struct
@@ -187,6 +187,7 @@ GLOBAL short Ecran_original_X; // |_ Dimensions de l'
GLOBAL short Ecran_original_Y; // | l'image qui vient d'être chargée.
GLOBAL short Largeur_ecran; // Largeur de l'écran
GLOBAL short Hauteur_ecran; // Hauteur de l'écran
GLOBAL byte Plein_ecran; // Indique si on est en mode plein écran ou fenêtré
GLOBAL short Limite_Haut; // |
GLOBAL short Limite_Bas; // |_ Limites dans lesquelles
GLOBAL short Limite_Gauche; // | on peut écrire