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

@@ -59,8 +59,8 @@ void Mettre_Ecran_A_Jour(short X, short Y, short Largeur, short Hauteur)
// Et ensuite dans la partie zoomée
if(Loupe_Mode)
{
X_effectif = Max(X-Loupe_Decalage_X,0) * Loupe_Facteur;
Y_effectif = Max(Y-Loupe_Decalage_Y,0) * Loupe_Facteur;
X_effectif = Min(Max(X-Loupe_Decalage_X,0) * Loupe_Facteur, Principal_Largeur_image);
Y_effectif = Min(Max(Y-Loupe_Decalage_Y,0) * Loupe_Facteur, Menu_Ordonnee);
Largeur *= Loupe_Facteur;
Hauteur *= Loupe_Facteur;
@@ -69,7 +69,7 @@ void Mettre_Ecran_A_Jour(short X, short Y, short Largeur, short Hauteur)
// mais personne ne devrait demander d'update en dehors de cette limite, même le fill est contraint
// a rester dans la zone visible de l'image
if(X_effectif + Largeur <= Principal_Largeur_image) L_effectif = Largeur;
else L_effectif = Principal_Largeur_image - X_effectif;
else L_effectif = Principal_Largeur_image - X_effectif - 1;
if(Y_effectif + Hauteur <= Menu_Ordonnee) H_effectif = Hauteur;
else H_effectif = Menu_Ordonnee - Y_effectif;
@@ -912,6 +912,7 @@ void Initialiser_mode_video(int Numero)
{
Largeur_ecran = Mode_video[Numero].Largeur;
Hauteur_ecran = Mode_video[Numero].Hauteur;
Plein_ecran = Mode_video[Numero].Fullscreen;
switch (Config.Ratio)
{