mirror of
https://github.com/RetroDECK/ES-DE.git
synced 2025-01-29 19:55:37 +00:00
fix 'DateTimeEditComponent' output formatting.
If the display mode is `DISP_DATE`, ignore the `mTime` field when calculating the output. This fixes the size calculation of the component. Fixes https://github.com/RetroPie/EmulationStation/issues/385.
This commit is contained in:
parent
d62758c7cf
commit
c48c2ce56f
|
@ -200,6 +200,8 @@ std::string DateTimeEditComponent::getDisplayString(DisplayMode mode) const
|
|||
fmt = "%m/%d/%Y";
|
||||
break;
|
||||
case DISP_DATE_TIME:
|
||||
if(mTime.getTime() == 0)
|
||||
return "unknown";
|
||||
fmt = "%m/%d/%Y %H:%M:%S";
|
||||
break;
|
||||
case DISP_RELATIVE_TO_NOW:
|
||||
|
@ -227,9 +229,6 @@ std::string DateTimeEditComponent::getDisplayString(DisplayMode mode) const
|
|||
break;
|
||||
}
|
||||
|
||||
if(mTime.getTime() == 0)
|
||||
return "unknown";
|
||||
|
||||
return Utils::Time::timeToString(mTime, fmt);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue