File tree Expand file tree Collapse file tree 3 files changed +18
-17
lines changed Expand file tree Collapse file tree 3 files changed +18
-17
lines changed Original file line number Diff line number Diff line change @@ -1252,9 +1252,9 @@ static int currentBootstrapPhoto = 0;
1252
1252
void loadPhoto (const std::string &path, const bool bufferOnly);
1253
1253
void loadBootstrapScreenshot (FILE *file, const bool bufferOnly);
1254
1254
1255
- void loadPhotoList () {
1255
+ bool loadPhotoList () {
1256
1256
if (!tex ().photoBuffer ()) {
1257
- return ;
1257
+ return false ;
1258
1258
}
1259
1259
1260
1260
DIR *dir;
@@ -1284,7 +1284,7 @@ void loadPhotoList() {
1284
1284
currentPhotoPath = photoList[rand () / ((RAND_MAX + 1u ) / photoList.size ())];
1285
1285
loadPhoto (currentPhotoPath, false );
1286
1286
currentPhotoIsBootstrap = false ;
1287
- return ;
1287
+ return true ;
1288
1288
}
1289
1289
}
1290
1290
@@ -1307,7 +1307,7 @@ void loadPhotoList() {
1307
1307
fseek (file, 0x200 + 0x18400 * currentBootstrapPhoto, SEEK_SET);
1308
1308
loadBootstrapScreenshot (file, false );
1309
1309
currentPhotoIsBootstrap = true ;
1310
- return ;
1310
+ return true ;
1311
1311
}
1312
1312
}
1313
1313
@@ -1317,6 +1317,7 @@ void loadPhotoList() {
1317
1317
currentPhotoPath = path;
1318
1318
loadPhoto (path, false );
1319
1319
currentPhotoIsBootstrap = false ;
1320
+ return true ;
1320
1321
}
1321
1322
1322
1323
void reloadPhoto () {
Original file line number Diff line number Diff line change @@ -29,7 +29,7 @@ void SetBrightness(u8 screen, s8 bright);
29
29
void drawCurrentDate ();
30
30
void drawCurrentTime ();
31
31
32
- void loadPhotoList ();
32
+ bool loadPhotoList ();
33
33
void reloadPhoto ();
34
34
void clearBoxArt ();
35
35
void graphicsInit ();
Original file line number Diff line number Diff line change @@ -907,18 +907,18 @@ void customSleep() {
907
907
powerOn (PM_BACKLIGHT_BOTTOM);
908
908
if (!ms ().macroMode && ms ().showPhoto && tc ().renderPhoto ()) {
909
909
srand (time (NULL ));
910
- loadPhotoList ();
911
-
912
- extern bool boxArtLoaded ;
913
- extern bool showLshoulder ;
914
- extern bool showRshoulder ;
915
- extern int file_count;
916
-
917
- boxArtLoaded = false ;
918
- showLshoulder = (PAGENUM != 0 );
919
- showRshoulder = (file_count > 40 + PAGENUM * 40 );
920
- if ( ms (). theme != TWLSettings::EThemeHBL) {
921
- tex (). drawShoulders (showLshoulder, showRshoulder);
910
+ if ( loadPhotoList ()) {
911
+ extern bool boxArtLoaded;
912
+ extern bool showLshoulder ;
913
+ extern bool showRshoulder ;
914
+ extern int file_count ;
915
+
916
+ boxArtLoaded = false ;
917
+ showLshoulder = (PAGENUM != 0 ) ;
918
+ showRshoulder = (file_count > 40 + PAGENUM * 40 );
919
+ if ( ms (). theme != TWLSettings::EThemeHBL) {
920
+ tex (). drawShoulders (showLshoulder, showRshoulder);
921
+ }
922
922
}
923
923
}
924
924
fadeType = true ;
You can’t perform that action at this time.
0 commit comments