Opened 4 years ago

Last modified 21 months ago

#114 new task

simplify hotkey.c

Reported by: Thomas Bernard Owned by: pulkomandy
Priority: minor Milestone: 2.9
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 (6)

comment:1 by Thomas Bernard, 4 years ago

Description: modified (diff)

comment:2 by Thomas Bernard, 4 years ago

I think Config_Key should be renamed to Config_Specials

comment:3 by PulkoMandy, 4 years ago

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 by Thomas Bernard, 4 years ago

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

comment:5 by PulkoMandy, 3 years ago

Milestone: 2.72.8

comment:6 by PulkoMandy, 21 months ago

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