diff --git a/Marlin/src/lcd/e3v2/proui/dwin.cpp b/Marlin/src/lcd/e3v2/proui/dwin.cpp index fa3d912987ff..cbcf5ebf4f88 100644 --- a/Marlin/src/lcd/e3v2/proui/dwin.cpp +++ b/Marlin/src/lcd/e3v2/proui/dwin.cpp @@ -1726,11 +1726,11 @@ void DWIN_SetDataDefaults() { #endif } -void DWIN_StoreSettings(char *buff) { - memcpy(buff, &HMI_data, _MIN(sizeof(HMI_data), eeprom_data_size)); +void DWIN_CopySettingsTo(char * const buff) { + memcpy(buff, &HMI_data, eeprom_data_size); } -void DWIN_LoadSettings(const char *buff) { +void DWIN_CopySettingsFrom(const char * const buff) { memcpy(&HMI_data, buff, sizeof(HMI_data_t)); if (HMI_data.Text_Color == HMI_data.Background_Color) DWIN_SetColorDefaults(); DWINUI::SetColors(HMI_data.Text_Color, HMI_data.Background_Color, HMI_data.StatusBg_Color); diff --git a/Marlin/src/lcd/e3v2/proui/dwin.h b/Marlin/src/lcd/e3v2/proui/dwin.h index 0f6366489b09..87830542ac23 100644 --- a/Marlin/src/lcd/e3v2/proui/dwin.h +++ b/Marlin/src/lcd/e3v2/proui/dwin.h @@ -197,8 +197,8 @@ void DWIN_M73(); void DWIN_Print_Header(const char *text); void DWIN_SetColorDefaults(); void DWIN_ApplyColor(); -void DWIN_StoreSettings(char *buff); -void DWIN_LoadSettings(const char *buff); +void DWIN_CopySettingsTo(char * const buff); +void DWIN_CopySettingsFrom(const char * const buff); void DWIN_SetDataDefaults(); void DWIN_RebootScreen(); diff --git a/Marlin/src/module/settings.cpp b/Marlin/src/module/settings.cpp index b669acfef769..61f14f359785 100644 --- a/Marlin/src/module/settings.cpp +++ b/Marlin/src/module/settings.cpp @@ -1517,7 +1517,7 @@ void MarlinSettings::postprocess() { { _FIELD_TEST(dwin_data); char dwin_data[eeprom_data_size] = { 0 }; - DWIN_StoreSettings(dwin_data); + DWIN_CopySettingsTo(dwin_data); EEPROM_WRITE(dwin_data); } #endif @@ -2493,7 +2493,7 @@ void MarlinSettings::postprocess() { const char dwin_data[eeprom_data_size] = { 0 }; _FIELD_TEST(dwin_data); EEPROM_READ(dwin_data); - if (!validating) DWIN_LoadSettings(dwin_data); + if (!validating) DWIN_CopySettingsFrom(dwin_data); } #elif ENABLED(DWIN_CREALITY_LCD_JYERSUI) {