Grafx2 can now read and convert gfx2.cfg from the original DOS (96.5%) format.
Older .cfg files in svn were saved incorrectly: the wrong size of chunk #5 (0x0101 instead of 0xE1) made it impossible to re-read the file in gfxcfg. gfxcfg can read and save gfx2.cfg. Upward compatibility is provided: - If new chunk types are added to the format, it only needs a re-compile. Older files can be read and saved. - If new keyboard shortcuts are added (134 currently), the older files can be read and the default shortcut will be used for missing keys. Fixed many endianness cases, hopefully Fixed LBM loading : bug in ASM->C conversion of Couleur_ILBM_line() Broke PCX loading : argh! git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@176 416bcca6-2ee7-4201-b75f-2eb2f807beb1
This commit is contained in:
12
clavier.c
12
clavier.c
@@ -298,10 +298,12 @@ word Conversion_Touche(SDL_keysym Sym)
|
||||
|
||||
// Les touches qui n'ont qu'une valeur unicode (très rares)
|
||||
// seront codées sur 11 bits, le 12e bit est mis à 1 (0x0800)
|
||||
if (Sym.sym > 0)
|
||||
if (Sym.sym != 0)
|
||||
Retour = Sym.sym;
|
||||
else if (Sym.unicode > 0)
|
||||
Retour = (Sym.unicode & 0x07FF) | 0x0800;
|
||||
else if (Sym.scancode != 0)
|
||||
{
|
||||
Retour = (Sym.scancode & 0x07FF) | 0x0800;
|
||||
}
|
||||
|
||||
if (Sym.mod & (KMOD_LSHIFT | KMOD_RSHIFT))
|
||||
Retour |= MOD_SHIFT;
|
||||
@@ -309,7 +311,7 @@ word Conversion_Touche(SDL_keysym Sym)
|
||||
Retour |= MOD_CTRL;
|
||||
if (Sym.mod & (KMOD_LALT | KMOD_RALT | KMOD_MODE))
|
||||
Retour |= MOD_ALT;
|
||||
return Retour;
|
||||
return Retour;
|
||||
}
|
||||
|
||||
const char * Nom_touche(word Touche)
|
||||
@@ -434,7 +436,7 @@ const char * Nom_touche(word Touche)
|
||||
}
|
||||
}
|
||||
// Autres touches inconnues
|
||||
sprintf(Buffer+strlen(Buffer), "(%d)", Touche);
|
||||
sprintf(Buffer+strlen(Buffer), "0x%X", Touche & 0x7FF);
|
||||
return Buffer;
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user