Skip to content

Commit 27e6d56

Browse files
committed
app: Fix complie errors with sceRtcGetCurrentClockLocalTime
1 parent 8ca3de8 commit 27e6d56

3 files changed

Lines changed: 6 additions & 6 deletions

File tree

app/source/ftppsp.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -266,7 +266,7 @@ static int gen_list_format(char *out, int n, int dir, const SceIoStat *stat, con
266266
};
267267

268268
char yt[13] = {0};
269-
pspTime cdt;
269+
ScePspDateTime cdt;
270270
sceRtcGetCurrentClockLocalTime(&cdt);
271271

272272
if (cdt.year == stat->sce_st_mtime.year)
@@ -283,7 +283,7 @@ static void send_LIST(ftppsp_client_info_t *client, const char *path) {
283283
char buffer[512] = {0};
284284
SceUID dir;
285285
SceIoDirent dirent;
286-
SceIoStat stat;
286+
SceIoStat stat = {0};
287287
char *devname;
288288
int send_devices = 0;
289289

app/source/gui.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,11 +29,11 @@ namespace GUI {
2929
}
3030

3131
void DisplayStatusBar(void) {
32-
pspTime time;
32+
ScePspDateTime time;
3333
static char time_string[30];
3434

3535
if (R_SUCCEEDED(sceRtcGetCurrentClockLocalTime(&time)))
36-
std::snprintf(time_string, 30, "%2i:%02i %s", ((time.hour % 12) == 0)? 12 : time.hour % 12, time.minutes, (time.hour / 12)? "PM" : "AM");
36+
std::snprintf(time_string, 30, "%2i:%02i %s", ((time.hour % 12) == 0)? 12 : time.hour % 12, time.minute, (time.hour / 12)? "PM" : "AM");
3737

3838
G2D::FontSetStyle(1.f, WHITE, INTRAFONT_ALIGN_LEFT);
3939
G2D::DrawText(5, 14, time_string);

app/source/screenshot.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ namespace Screenshot {
9797

9898
int Capture(void) {
9999
int ret = 0;
100-
pspTime time;
100+
ScePspDateTime time;
101101

102102
if (R_FAILED(ret = sceRtcGetCurrentClockLocalTime(&time)))
103103
return ret;
@@ -107,7 +107,7 @@ namespace Screenshot {
107107

108108
static char path[128];
109109
std::snprintf(path, 128, Utils::IsInternalStorage()? "ef0:/PSP/PHOTO/CMFileManager/screenshot_%02d%02d%02d-%i.bmp" :
110-
"ms0:/PSP/PHOTO/CMFileManager/screenshot_%02d%02d%02d-%02d%02d%02d.png", time.year, time.month, time.day, time.hour, time.minutes, time.seconds);
110+
"ms0:/PSP/PHOTO/CMFileManager/screenshot_%02d%02d%02d-%02d%02d%02d.png", time.year, time.month, time.day, time.hour, time.minute, time.second);
111111

112112
Screenshot::Save(path);
113113
return 0;

0 commit comments

Comments
 (0)