Skip to content

Commit

Permalink
remove unused code
Browse files Browse the repository at this point in the history
  • Loading branch information
petrkucerak committed Apr 30, 2021
1 parent 72cfbbc commit 530f847
Showing 1 changed file with 4 additions and 12 deletions.
16 changes: 4 additions & 12 deletions menu_utilities.c
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,8 @@ game_init_data_t run_init_game_menu(fb_data *frame_buff, unsigned char *lcd_mem_
char read = ' ';
while (read != 's')
{
// anulate
pthread_mutex_lock(&mtx);
read_thread_data.last_read = ' ';
// scan input
pthread_mutex_lock(&mtx);
pthread_cond_wait(&character_has_been_read, &mtx);
read = read_thread_data.last_read;
pthread_mutex_unlock(&mtx);
Expand Down Expand Up @@ -101,10 +99,8 @@ game_init_data_t sub_menu_lives(fb_data *frame_buff, unsigned char *lcd_mem_base
draw_text_center(frame_buff, "POTVRDIT: [s]", frame_buff->width / 2, HEIGHT_M - HEIGHT_M / 10, 2, font, 0xffff);
// update display
lcd_from_fb(frame_buff, lcd_mem_base);
// anulate
pthread_mutex_lock(&mtx);
read_thread_data.last_read = ' ';
// scan input
pthread_mutex_lock(&mtx);
pthread_cond_wait(&character_has_been_read, &mtx);
c = read_thread_data.last_read;
pthread_mutex_unlock(&mtx);
Expand Down Expand Up @@ -144,10 +140,8 @@ game_init_data_t sub_menu_map(fb_data *frame_buff, unsigned char *lcd_mem_base,
draw_text_center(frame_buff, "POTVRDIT: [s]", frame_buff->width / 2, HEIGHT_M - HEIGHT_M / 10, 2, font, 0xffff);
// update display
lcd_from_fb(frame_buff, lcd_mem_base);
// anulate
pthread_mutex_lock(&mtx);
read_thread_data.last_read = ' ';
// scan input
pthread_mutex_lock(&mtx);
pthread_cond_wait(&character_has_been_read, &mtx);
c = read_thread_data.last_read;
pthread_mutex_unlock(&mtx);
Expand Down Expand Up @@ -187,10 +181,8 @@ game_init_data_t sub_menu_ghosts(fb_data *frame_buff, unsigned char *lcd_mem_bas
draw_text_center(frame_buff, "POTVRDIT: [s]", frame_buff->width / 2, HEIGHT_M - HEIGHT_M / 10, 2, font, 0xffff);
// update display
lcd_from_fb(frame_buff, lcd_mem_base);
// anulate
pthread_mutex_lock(&mtx);
read_thread_data.last_read = ' ';
// scan input
pthread_mutex_lock(&mtx);
pthread_cond_wait(&character_has_been_read, &mtx);
c = read_thread_data.last_read;
pthread_mutex_unlock(&mtx);
Expand Down

0 comments on commit 530f847

Please sign in to comment.