Opened 14 months ago

Last modified 5 months ago

#114 new task

simplify hotkey.c

Reported by: Thomas Bernard Owned by: pulkomandy
Priority: minor Milestone: 2.8
Component: GrafX2 Version: 2.6
Keywords: Cc:

Description (last modified by Thomas Bernard)

I think we should merge the two big arrays in hotkey.c ConfigKey and Ordering

I see no reason we coudn't add a word Ordering field to T_Key_config.

Also there is possible confusion between ConfigKey and Config_Key :

hotkeys.h:extern T_Key_config ConfigKey[NB_SHORTCUTS];
global.h:GFX2_GLOBAL word Config_Key[NB_SPECIAL_SHORTCUTS][2];

Change History (5)

comment:1 Changed 14 months ago by Thomas Bernard

Description: modified (diff)

comment:2 Changed 14 months ago by Thomas Bernard

I think Config_Key should be renamed to Config_Specials

comment:3 Changed 14 months ago by PulkoMandy

There are possible tricks with the old gfx2.cfg config file which was in binary format, I think we still support importing settings from the DOS and early versions of the SDL port, and IIRC that structure was stored directly, which is why there is a separate array.

It's certainly possible to clean it up, now (keeping the importing support if possible)

comment:4 Changed 14 months ago by Thomas Bernard

that is T_Config_shortcut_info which is read/written from the .CFG file

comment:5 Changed 5 months ago by PulkoMandy

Milestone: 2.72.8
Note: See TracTickets for help on using tickets.