Changed a lot of platform-specific code to "simplify" it:
A Unix-like system is now considered the default. The number of platform-specific blocks is down to: win32: 13, watcomc: 3, linux: 4, macosx: 16, amigaos4: 8, beos/haiku: 1 Removed linux.c, implemented the relevant functions for all platforms. (win32) In Stats screen, included free memory report (macosx) Conversion_ANSI: Fixed the __macosx__ with wrong case from my former 'fix', sorry. (macosx) readline.c : Removed a manual "Update_necessaire=1", because normally all calls to UpdateRect() will set this flag already. Don't hesitate to call Flush_Update() anywhere where it's lacking, but you shouldn't put it inside a #ifdef __macosx__ (win32) Packaging: 'make ziprelease' now includes libpng13.dll and zlib1.dll (win32) Hacked something to resolve naming conflict of MOD_SHIFT constants with windows.h (all) Resolution: Fixed the black space that appeared between button and label, the memory overwrite also caused resolutions above number 2 to disappear from list. Tested fine on Linux (without TTF) and Windows git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@345 416bcca6-2ee7-4201-b75f-2eb2f807beb1
This commit is contained in:
22
readline.c
22
readline.c
@@ -35,7 +35,6 @@
|
||||
#include "divers.h"
|
||||
#include "erreurs.h"
|
||||
#include "const.h"
|
||||
#include "linux.h"
|
||||
#include "sdlscreen.h"
|
||||
#include "readline.h"
|
||||
|
||||
@@ -44,8 +43,6 @@
|
||||
#define COULEUR_TEXTE_CURSEUR CM_Noir
|
||||
#define COULEUR_FOND_CURSEUR CM_Fonce
|
||||
|
||||
extern int Update_necessaire;
|
||||
|
||||
// Suppresion d'un caractère à une certaine POSITION dans une CHAINE.
|
||||
void Supprimer_caractere(char * Chaine, byte Position)
|
||||
{
|
||||
@@ -78,10 +75,13 @@ int CaractereValide(int Caractere)
|
||||
// Sous Linux: Seul le / est strictement interdit, mais beaucoup
|
||||
// d'autres poseront des problèmes au shell, alors on évite.
|
||||
// Sous Windows : c'est moins grave car le fopen() échouerait de toutes façons.
|
||||
#ifdef __linux__
|
||||
char CaracteresInterdits[] = {'/', '|', '?', '*', '<', '>'};
|
||||
#else
|
||||
// AmigaOS4: Pas de ':' car utilisé pour les volumes.
|
||||
#if defined(__WIN32__)
|
||||
char CaracteresInterdits[] = {'/', '|', '?', '*', '<', '>', ':', '\\'};
|
||||
#elif defined (__amigaos4__)
|
||||
char CaracteresInterdits[] = {'/', '|', '?', '*', '<', '>', ':'};
|
||||
#else
|
||||
char CaracteresInterdits[] = {'/', '|', '?', '*', '<', '>'};
|
||||
#endif
|
||||
|
||||
if (Caractere < ' ' || Caractere > 255)
|
||||
@@ -154,7 +154,7 @@ byte Readline_ex(word Pos_X,word Pos_Y,char * Chaine,byte Taille_affichee,byte T
|
||||
strcpy(Chaine_initiale,Chaine);
|
||||
|
||||
if (Type_saisie==1)
|
||||
itoa(atoi(Chaine),Chaine,10); // On tasse la chaine à gauche
|
||||
snprintf(Chaine,10,"%d",atoi(Chaine)); // On tasse la chaine à gauche
|
||||
// Chaine[0]='\0'; // On efface la chaîne si c'est valeur numérique
|
||||
|
||||
|
||||
@@ -173,11 +173,7 @@ byte Readline_ex(word Pos_X,word Pos_Y,char * Chaine,byte Taille_affichee,byte T
|
||||
Rafficher_toute_la_chaine(Pos_X,Pos_Y,Chaine_affichee,Position - Offset);
|
||||
UpdateRect(Fenetre_Pos_X+(Pos_X*Menu_Facteur_X),Fenetre_Pos_Y+(Pos_Y*Menu_Facteur_Y),
|
||||
Taille_affichee*(Menu_Facteur_X<<3),(Menu_Facteur_Y<<3));
|
||||
|
||||
#ifdef __macosx__
|
||||
Update_necessaire = 1;
|
||||
Flush_update();
|
||||
#endif
|
||||
|
||||
while ((Touche_lue!=SDLK_RETURN) && (Touche_lue!=SDLK_ESCAPE))
|
||||
{
|
||||
@@ -319,11 +315,7 @@ affichage:
|
||||
UpdateRect(Fenetre_Pos_X+(Pos_X*Menu_Facteur_X),Fenetre_Pos_Y+(Pos_Y*Menu_Facteur_Y),
|
||||
Taille_affichee*(Menu_Facteur_X<<3),(Menu_Facteur_Y<<3));
|
||||
} // Fin du "switch(Touche_lue)"
|
||||
|
||||
#ifdef __macosx__
|
||||
Update_necessaire = 1;
|
||||
Flush_update();
|
||||
#endif
|
||||
|
||||
} // Fin du "while"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user