From f4e81048ab7057475d74e0b0ef6263dee5fb8da2 Mon Sep 17 00:00:00 2001 From: Franck Charlet Date: Thu, 16 Oct 2008 21:55:29 +0000 Subject: [PATCH] MacOSX: Fixed a bug in the filenames input and another one with the backspace key not being sent. git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@270 416bcca6-2ee7-4201-b75f-2eb2f807beb1 --- .DS_Store | Bin 15364 -> 15364 bytes English.lproj/InfoPlist.strings | Bin 558 -> 630 bytes Grafx2.xcodeproj/xx.pbxuser | 151 +++++++++++++++++++++++--------- Grafx2.xcodeproj/xx.perspective | 150 ++++++++++++++++++++++++------- clavier.c | 9 ++ const.h | 2 +- readline.c | 12 ++- 7 files changed, 248 insertions(+), 76 deletions(-) diff --git a/.DS_Store b/.DS_Store index 044e1969237e2453166e6107ff3c5edf829405c9..1e60023b1a1a4500026015a879623ae703641535 100644 GIT binary patch delta 52 zcmZpvXsMXs<QhU^hQw@Ma!?)%=sImgFizsg91YY5SKBeG88csGh{O417#H$k{Bw1q#IBy e5y($w$OiJ988U#pB8D8G+7bpm1|Notifications OpenEditors - + + + Content + + PBXProjectModuleGUID + F5B8B78E0EA7EE9F00214777 + PBXProjectModuleLabel + SDL_keysym.h + PBXSplitModuleInNavigatorKey + + Split0 + + PBXProjectModuleGUID + F5B8B78F0EA7EE9F00214777 + PBXProjectModuleLabel + SDL_keysym.h + _historyCapacity + 0 + bookmark + F5B8B7920EA7EE9F00214777 + history + + F5B8B7900EA7EE9F00214777 + + + SplitCount + 1 + + StatusBarVisibility + + + Geometry + + Frame + {{0, 20}, {906, 568}} + PBXModuleWindowStatusBarHidden2 + + RubberWindowFrame + 38 28 906 609 0 0 1024 746 + + + + Content + + PBXProjectModuleGUID + F5B8B7940EA7EE9F00214777 + PBXProjectModuleLabel + SDL_keyboard.h + PBXSplitModuleInNavigatorKey + + Split0 + + PBXProjectModuleGUID + F5B8B7950EA7EE9F00214777 + PBXProjectModuleLabel + SDL_keyboard.h + _historyCapacity + 0 + bookmark + F5B8B7980EA7EE9F00214777 + history + + F5B8B7960EA7EE9F00214777 + + + SplitCount + 1 + + StatusBarVisibility + + + Geometry + + Frame + {{0, 20}, {906, 568}} + PBXModuleWindowStatusBarHidden2 + + RubberWindowFrame + 15 132 906 609 0 0 1024 746 + + + PerspectiveWidths - 985 - 985 - 985 + 992 + 992 + 992 Perspectives @@ -270,12 +351,12 @@ PBXSmartGroupTreeModuleOutlineStateSelectionKey - 40 - 39 + 3 + 0 PBXSmartGroupTreeModuleOutlineStateVisibleRectKey - {{0, 494}, {339, 262}} + {{0, 0}, {339, 261}} PBXTopSmartGroupGIDs @@ -285,7 +366,7 @@ GeometryConfiguration Frame - {{0, 0}, {356, 280}} + {{0, 0}, {356, 279}} GroupTreeTableConfiguration FileBuiltColumn @@ -296,7 +377,7 @@ 297 RubberWindowFrame - 11 98 992 321 0 0 1024 746 + 24 426 883 320 0 0 1024 746 Module PBXSmartGroupTreeModule @@ -324,7 +405,7 @@ _historyCapacity 0 bookmark - F5D35A630EA6AE4800497F18 + F5B8B7890EA7EE9F00214777 history F5B19C160EA4D6E8003F4BA4 @@ -333,7 +414,7 @@ F5DCE26C0EA50EDC0065B0EF F5B1D1770EA5FE2100AB8D0F F5B1D1B50EA602BA00AB8D0F - F5BF1F1F0EA69319000E9B3D + F5B8B7700EA7E20300214777 prevStack @@ -353,9 +434,9 @@ GeometryConfiguration Frame - {{0, 0}, {631, 0}} + {{0, 0}, {522, 0}} RubberWindowFrame - 11 98 992 321 0 0 1024 746 + 24 426 883 320 0 0 1024 746 Module PBXNavigatorGroup @@ -364,7 +445,7 @@ Proportion - 275pt + 274pt Tabs @@ -378,9 +459,9 @@ GeometryConfiguration Frame - {{10, 27}, {631, 248}} + {{10, 27}, {522, 247}} RubberWindowFrame - 11 98 992 321 0 0 1024 746 + 24 426 883 320 0 0 1024 746 Module XCDetailModule @@ -421,7 +502,7 @@ Proportion - 631pt + 522pt Name @@ -439,11 +520,11 @@ TableOfContents - F5D35A4C0EA6A4F800497F18 + F5B8B7780EA7E2E200214777 1CA23ED40692098700951B8B - F5D35A4D0EA6A4F800497F18 + F5B8B7790EA7E2E200214777 F5B19BA70EA4BF24003F4BA4 - F5D35A4E0EA6A4F800497F18 + F5B8B77A0EA7E2E200214777 1CA23EDF0692099D00951B8B 1CA23EE00692099D00951B8B 1CA23EE10692099D00951B8B @@ -491,7 +572,7 @@ PBXSmartGroupTreeModuleColumnWidthsKey - 963 + 970 PBXSmartGroupTreeModuleColumnsKey_v4 @@ -512,7 +593,7 @@ PBXSmartGroupTreeModuleOutlineStateVisibleRectKey - {{0, 0}, {0, 0}} + {{0, 0}, {970, 262}} PBXTopSmartGroupGIDs @@ -522,17 +603,17 @@ GeometryConfiguration Frame - {{0, 0}, {980, 520}} + {{0, 0}, {987, 280}} GroupTreeTableConfiguration MainColumn - 963 + 970 Module PBXSmartGroupTreeModule Proportion - 980pt + 987pt Dock @@ -581,16 +662,16 @@ GeometryConfiguration Frame - {{0, 0}, {0, 361}} + {{0, 0}, {0, 253}} Module PBXNavigatorGroup Proportion - 361pt + 253pt Proportion - 0pt + 108pt Tabs @@ -608,7 +689,7 @@ GeometryConfiguration Frame - {{10, 27}, {0, -27}} + {{10, 27}, {0, 81}} Module PBXBuildResultsModule @@ -688,14 +769,14 @@ TableOfContents - F5D35A4F0EA6A4F800497F18 + F5B8B78A0EA7EE9F00214777 1CA23EE50692099D00951B8B - F5D35A500EA6A4F800497F18 + F5B8B78B0EA7EE9F00214777 F5B19BA70EA4BF24003F4BA4 - F5D35A510EA6A4F800497F18 + F5B8B78C0EA7EE9F00214777 XCMainBuildResultsModuleGUID 1CA23EE80692099D00951B8B - F5D35A520EA6A4F800497F18 + F5B8B78D0EA7EE9F00214777 ToolbarConfiguration xcode.toolbar.config.buildAndRun @@ -864,10 +945,11 @@ 5 WindowOrderList + F5B8B78E0EA7EE9F00214777 /Users/xx/Grafx2/Grafx2.xcodeproj WindowString - 11 98 992 321 0 0 1024 746 + 24 426 883 320 0 0 1024 746 WindowTools diff --git a/clavier.c b/clavier.c index 409e0b2b..289cd8e1 100644 --- a/clavier.c +++ b/clavier.c @@ -535,9 +535,18 @@ word Conversion_ANSI(SDL_keysym Sym) case 0xC600: return 'ã'; // ã } + // Touche entre 127 et 255 if (Sym.unicode<256) { +#ifdef __macosx__ + // fc: Looks like there's a mismatch with delete & backspace + // i don't why SDLK_DELETE was returned instead of SDLK_BACKSPACE + if(Sym.unicode == 127) + { + return(SDLK_BACKSPACE); + } +#endif return Sym.unicode; } // Sinon c'est une touche spéciale, on retourne son scancode diff --git a/const.h b/const.h index c723de9e..440dc729 100644 --- a/const.h +++ b/const.h @@ -29,7 +29,7 @@ #define M_2PI 6.28318530717958647692528676656 // Note: La taille du fichier GFX2.DAT est définie au début de INIT.C ! -#define POURCENTAGE_VERSION "97.3%" // Libellé du pourcentage de la version ß +#define POURCENTAGE_VERSION "97.4%" // Libellé du pourcentage de la version ß #define VERSION1 2 // | #define VERSION2 0 // |_ Numéro de version découpé en #define BETA1 97 // | plusieurs parties => 2.0 ß95.5% diff --git a/readline.c b/readline.c index d086b6a5..e57173ef 100644 --- a/readline.c +++ b/readline.c @@ -156,6 +156,10 @@ byte Readline(word Pos_X,word Pos_Y,char * Chaine,byte Taille_affichee,byte Type 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__ + Flush_update(); +#endif + while ((Touche_lue!=SDLK_RETURN) && (Touche_lue!=SDLK_ESCAPE)) { Touche_lue=Get_key(); @@ -219,6 +223,7 @@ byte Readline(word Pos_X,word Pos_Y,char * Chaine,byte Taille_affichee,byte Type } break; case SDLK_BACKSPACE : // Backspace : combinaison de gauche + suppr + if (Position) { Position--; @@ -279,9 +284,9 @@ byte Readline(word Pos_X,word Pos_Y,char * Chaine,byte Taille_affichee,byte Type goto affichage; } // Fin du test d'autorisation de touche } // Fin du test de place libre - break; + break; - affichage: +affichage: Taille=strlen(Chaine); // Formatage d'une partie de la chaine (si trop longue pour tenir) strncpy(Chaine_affichee, Chaine + Offset, Taille_affichee); @@ -295,6 +300,9 @@ byte Readline(word Pos_X,word Pos_Y,char * Chaine,byte Taille_affichee,byte Type 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__ + Flush_update(); +#endif } // Fin du "while" // Effacement de la chaîne