Skip to content

Commit

Permalink
Improve component_editdatetime_draw
Browse files Browse the repository at this point in the history
it is no longer a static function
  • Loading branch information
networkfusion committed Nov 7, 2024
1 parent dff7ac9 commit dbbac6e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/menu/views/rtc.c
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ void adjust_rtc_time( struct tm *t, int incr ) {
*t = *gmtime( &timestamp );
}

static void component_editdatetime_draw ( struct tm t ) {
void component_editdatetime_draw ( struct tm t, rtc_field_t selected_field ) {
// FIXME: move this to components.c once improved.
/* Format RTC date/time as strings */
char full_dt[30];
Expand All @@ -88,7 +88,7 @@ static void component_editdatetime_draw ( struct tm t ) {
DAYS_OF_WEEK[t.tm_wday]
);

switch(editing_field_type)
switch(selected_field)
{
case RTC_EDIT_YEAR:
snprintf( current_selection_chars, sizeof(current_selection_chars), "*^^^^^^^^********************");
Expand Down Expand Up @@ -203,7 +203,7 @@ static void draw (menu_t *menu, surface_t *d) {
}

if (is_editing_mode) {
component_editdatetime_draw(rtc_tm);
component_editdatetime_draw(rtc_tm, editing_field_type);
}

rdpq_detach_show();
Expand Down

0 comments on commit dbbac6e

Please sign in to comment.