remove useless zero-ing

This commit is contained in:
Gwenhael Le Moine 2024-06-12 13:49:29 +02:00
parent 1eb4ac580f
commit 1d7d9969cd
No known key found for this signature in database
GPG key ID: FDFE3669426707A7
2 changed files with 5 additions and 153 deletions

View file

@ -52,75 +52,8 @@ static unsigned KEYBOARD_HEIGHT, KEYBOARD_WIDTH, TOP_SKIP, SIDE_SKIP, BOTTOM_SKI
DISPLAY_OFFSET_X, DISPLAY_OFFSET_Y, DISP_FRAME, KEYBOARD_OFFSET_X, KEYBOARD_OFFSET_Y, KBD_UPLINE;
static unsigned int ARGBColors[ NB_COLORS ];
static sdl_surfaces_on_off_struct_t sdl_buttons[ NB_KEYS ] = {
{.surfaceon = 0, .surfaceoff = 0},
{.surfaceon = 0, .surfaceoff = 0},
{.surfaceon = 0, .surfaceoff = 0},
{.surfaceon = 0, .surfaceoff = 0},
{.surfaceon = 0, .surfaceoff = 0},
{.surfaceon = 0, .surfaceoff = 0},
{.surfaceon = 0, .surfaceoff = 0},
{.surfaceon = 0, .surfaceoff = 0},
{.surfaceon = 0, .surfaceoff = 0},
{.surfaceon = 0, .surfaceoff = 0},
{.surfaceon = 0, .surfaceoff = 0},
{.surfaceon = 0, .surfaceoff = 0},
{.surfaceon = 0, .surfaceoff = 0},
{.surfaceon = 0, .surfaceoff = 0},
{.surfaceon = 0, .surfaceoff = 0},
{.surfaceon = 0, .surfaceoff = 0},
{.surfaceon = 0, .surfaceoff = 0},
{.surfaceon = 0, .surfaceoff = 0},
{.surfaceon = 0, .surfaceoff = 0},
{.surfaceon = 0, .surfaceoff = 0},
{.surfaceon = 0, .surfaceoff = 0},
{.surfaceon = 0, .surfaceoff = 0},
{.surfaceon = 0, .surfaceoff = 0},
{.surfaceon = 0, .surfaceoff = 0},
{.surfaceon = 0, .surfaceoff = 0},
{.surfaceon = 0, .surfaceoff = 0},
{.surfaceon = 0, .surfaceoff = 0},
{.surfaceon = 0, .surfaceoff = 0},
{.surfaceon = 0, .surfaceoff = 0},
{.surfaceon = 0, .surfaceoff = 0},
{.surfaceon = 0, .surfaceoff = 0},
{.surfaceon = 0, .surfaceoff = 0},
{.surfaceon = 0, .surfaceoff = 0},
{.surfaceon = 0, .surfaceoff = 0},
{.surfaceon = 0, .surfaceoff = 0},
{.surfaceon = 0, .surfaceoff = 0},
{.surfaceon = 0, .surfaceoff = 0},
{.surfaceon = 0, .surfaceoff = 0},
{.surfaceon = 0, .surfaceoff = 0},
{.surfaceon = 0, .surfaceoff = 0},
{.surfaceon = 0, .surfaceoff = 0},
{.surfaceon = 0, .surfaceoff = 0},
{.surfaceon = 0, .surfaceoff = 0},
{.surfaceon = 0, .surfaceoff = 0},
{.surfaceon = 0, .surfaceoff = 0},
{.surfaceon = 0, .surfaceoff = 0},
{.surfaceon = 0, .surfaceoff = 0},
{.surfaceon = 0, .surfaceoff = 0},
{.surfaceon = 0, .surfaceoff = 0},
};
static sdl_surfaces_on_off_struct_t sdl_ann_tbl[] = {
{.surfaceon = 0, .surfaceoff = 0},
{.surfaceon = 0, .surfaceoff = 0},
{.surfaceon = 0, .surfaceoff = 0},
{.surfaceon = 0, .surfaceoff = 0},
{.surfaceon = 0, .surfaceoff = 0},
{.surfaceon = 0, .surfaceoff = 0},
};
static sdl_surfaces_on_off_struct_t sdl_buttons[ NB_KEYS ];
static sdl_surfaces_on_off_struct_t sdl_ann_tbl[ NB_ANNUNCIATORS ];
// State to displayed zoomed last pressed key
static SDL_Surface* showkeylastsurf = 0;

View file

@ -220,28 +220,7 @@ static bool mapped;
static x11_keypad_t keypad;
static XColor x11_colors[ NB_COLORS ] = {
{0, 0, 0, 0, DoRed | DoGreen | DoBlue, 0},
{0, 0, 0, 0, DoRed | DoGreen | DoBlue, 0},
{0, 0, 0, 0, DoRed | DoGreen | DoBlue, 0},
{0, 0, 0, 0, DoRed | DoGreen | DoBlue, 0},
{0, 0, 0, 0, DoRed | DoGreen | DoBlue, 0},
{0, 0, 0, 0, DoRed | DoGreen | DoBlue, 0},
{0, 0, 0, 0, DoRed | DoGreen | DoBlue, 0},
{0, 0, 0, 0, DoRed | DoGreen | DoBlue, 0},
{0, 0, 0, 0, DoRed | DoGreen | DoBlue, 0},
{0, 0, 0, 0, DoRed | DoGreen | DoBlue, 0},
{0, 0, 0, 0, DoRed | DoGreen | DoBlue, 0},
{0, 0, 0, 0, DoRed | DoGreen | DoBlue, 0},
{0, 0, 0, 0, DoRed | DoGreen | DoBlue, 0},
{0, 0, 0, 0, DoRed | DoGreen | DoBlue, 0},
{0, 0, 0, 0, DoRed | DoGreen | DoBlue, 0},
{0, 0, 0, 0, DoRed | DoGreen | DoBlue, 0},
{0, 0, 0, 0, DoRed | DoGreen | DoBlue, 0},
{0, 0, 0, 0, DoRed | DoGreen | DoBlue, 0},
{0, 0, 0, 0, DoRed | DoGreen | DoBlue, 0},
{0, 0, 0, 0, DoRed | DoGreen | DoBlue, 0},
};
static XColor x11_colors[ NB_COLORS ];
static int CompletionType = -1;
@ -276,65 +255,7 @@ static int icon_color_mode;
static char* res_name;
static char* res_class;
static x11_button_t x11_buttons[ NB_KEYS ] = {
{.map = 0, .down = 0, .xwin = 0},
{.map = 0, .down = 0, .xwin = 0},
{.map = 0, .down = 0, .xwin = 0},
{.map = 0, .down = 0, .xwin = 0},
{.map = 0, .down = 0, .xwin = 0},
{.map = 0, .down = 0, .xwin = 0},
{.map = 0, .down = 0, .xwin = 0},
{.map = 0, .down = 0, .xwin = 0},
{.map = 0, .down = 0, .xwin = 0},
{.map = 0, .down = 0, .xwin = 0},
{.map = 0, .down = 0, .xwin = 0},
{.map = 0, .down = 0, .xwin = 0},
{.map = 0, .down = 0, .xwin = 0},
{.map = 0, .down = 0, .xwin = 0},
{.map = 0, .down = 0, .xwin = 0},
{.map = 0, .down = 0, .xwin = 0},
{.map = 0, .down = 0, .xwin = 0},
{.map = 0, .down = 0, .xwin = 0},
{.map = 0, .down = 0, .xwin = 0},
{.map = 0, .down = 0, .xwin = 0},
{.map = 0, .down = 0, .xwin = 0},
{.map = 0, .down = 0, .xwin = 0},
{.map = 0, .down = 0, .xwin = 0},
{.map = 0, .down = 0, .xwin = 0},
{.map = 0, .down = 0, .xwin = 0},
{.map = 0, .down = 0, .xwin = 0},
{.map = 0, .down = 0, .xwin = 0},
{.map = 0, .down = 0, .xwin = 0},
{.map = 0, .down = 0, .xwin = 0},
{.map = 0, .down = 0, .xwin = 0},
{.map = 0, .down = 0, .xwin = 0},
{.map = 0, .down = 0, .xwin = 0},
{.map = 0, .down = 0, .xwin = 0},
{.map = 0, .down = 0, .xwin = 0},
{.map = 0, .down = 0, .xwin = 0},
{.map = 0, .down = 0, .xwin = 0},
{.map = 0, .down = 0, .xwin = 0},
{.map = 0, .down = 0, .xwin = 0},
{.map = 0, .down = 0, .xwin = 0},
{.map = 0, .down = 0, .xwin = 0},
{.map = 0, .down = 0, .xwin = 0},
{.map = 0, .down = 0, .xwin = 0},
{.map = 0, .down = 0, .xwin = 0},
{.map = 0, .down = 0, .xwin = 0},
{.map = 0, .down = 0, .xwin = 0},
{.map = 0, .down = 0, .xwin = 0},
{.map = 0, .down = 0, .xwin = 0},
{.map = 0, .down = 0, .xwin = 0},
{.map = 0, .down = 0, .xwin = 0},
};
static x11_button_t x11_buttons[ NB_KEYS ];
#define MAX_PASTE 128
static int paste[ MAX_PASTE * 3 ];
@ -377,9 +298,7 @@ static unsigned char nibbles[ 16 ][ 2 ] = {
static unsigned char nibble_bitmap[ 16 ];
static Pixmap x11_ann_pixmaps[ NB_ANNUNCIATORS ] = {
0, 0, 0, 0, 0, 0,
};
static Pixmap x11_ann_pixmaps[ NB_ANNUNCIATORS ];
static icon_map_t icon_maps_sx[] = {
{.w = hp48_icon_width, .h = hp48_icon_height, .c = BLACK, .bits = hp48_icon_bitmap },