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;
12521252void loadPhoto (const std::string &path, const bool bufferOnly);
12531253void loadBootstrapScreenshot (FILE *file, const bool bufferOnly);
12541254
1255- void loadPhotoList () {
1255+ bool loadPhotoList () {
12561256 if (!tex ().photoBuffer ()) {
1257- return ;
1257+ return false ;
12581258 }
12591259
12601260 DIR *dir;
@@ -1284,7 +1284,7 @@ void loadPhotoList() {
12841284 currentPhotoPath = photoList[rand () / ((RAND_MAX + 1u ) / photoList.size ())];
12851285 loadPhoto (currentPhotoPath, false );
12861286 currentPhotoIsBootstrap = false ;
1287- return ;
1287+ return true ;
12881288 }
12891289 }
12901290
@@ -1307,7 +1307,7 @@ void loadPhotoList() {
13071307 fseek (file, 0x200 + 0x18400 * currentBootstrapPhoto, SEEK_SET);
13081308 loadBootstrapScreenshot (file, false );
13091309 currentPhotoIsBootstrap = true ;
1310- return ;
1310+ return true ;
13111311 }
13121312 }
13131313
@@ -1317,6 +1317,7 @@ void loadPhotoList() {
13171317 currentPhotoPath = path;
13181318 loadPhoto (path, false );
13191319 currentPhotoIsBootstrap = false ;
1320+ return true ;
13201321}
13211322
13221323void reloadPhoto () {
Original file line number Diff line number Diff line change @@ -29,7 +29,7 @@ void SetBrightness(u8 screen, s8 bright);
2929void drawCurrentDate ();
3030void drawCurrentTime ();
3131
32- void loadPhotoList ();
32+ bool loadPhotoList ();
3333void reloadPhoto ();
3434void clearBoxArt ();
3535void graphicsInit ();
Original file line number Diff line number Diff line change @@ -907,18 +907,18 @@ void customSleep() {
907907 powerOn (PM_BACKLIGHT_BOTTOM);
908908 if (!ms ().macroMode && ms ().showPhoto && tc ().renderPhoto ()) {
909909 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+ }
922922 }
923923 }
924924 fadeType = true ;
You can’t perform that action at this time.
0 commit comments