Skip to content
9 changes: 7 additions & 2 deletions sysmodules/rosalina/source/menu.c
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
*/

#include <3ds.h>
#include <3ds/types.h>
#include "menu.h"
#include "draw.h"
#include "fmt.h"
Expand Down Expand Up @@ -475,9 +476,13 @@ static void menuDraw(Menu *menu, u32 selected)
int n = sprintf(ipBuffer, "%hhu.%hhu.%hhu.%hhu", addr[0], addr[1], addr[2], addr[3]);
Draw_DrawString(SCREEN_BOT_WIDTH - 10 - SPACING_X * n, 10, COLOR_WHITE, ipBuffer);

This comment was marked as duplicate.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See below

}

else
Draw_DrawFormattedString(SCREEN_BOT_WIDTH - 10 - SPACING_X * 15, 10, COLOR_WHITE, "%15s", "");
{
char buf[32];
u64 timeNow = osGetTime();
int n = dateTimeToString(buf, timeNow, false);
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Rather than using the ISO format used for screenshots, could you use this format: Wed, 31 Dec 2025 23:59. It is more readable and match what I'm using in a side project I'll soon integrate into Luma3DS.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I changed the dateTimeToString function to accept an enum parameter dateTimeFormat to select the format, including the human readable format (and thus adjusted the calls to the function in other places)

I could move the human readable formatter to another function if necessary.

Draw_DrawString(SCREEN_BOT_WIDTH - 10 - SPACING_X * n, 10, COLOR_WHITE, buf);

This comment was marked as duplicate.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you ensure both the date string and the IP string are the same length, padding them with spaces as necessary? They aren't always cleared automatically.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I added space padding using a "%23s" format, if this is what you had in mind. Unless you meant manually drawing spaces ?

}

if(mcuInfoRes == 0)
{
Expand Down
Loading