Citro2d switch (#175)
* Switch from pp2d to citro2d * Fix various bugs by updating libarchive * Begin work on translation infrastructure * Switch to libpng for various improvements * Fixed race condition in icon scrolling * Use spritesheets to load sprites marginally faster and use less memory * Various Readme fixes * Huge improvements to QR reader speed and screen tearing * Don't try to preview themes/splashes when there are none * Prevent playing audio when ndspInit() fails * Don't wait for audio to load before displaying preview * Fix bug when shuffle themes didn't have BGM * Fix bug caused by files not being zeroed out when created
This commit is contained in:
@@ -125,7 +125,7 @@ static Result install_theme_internal(Entry_List_s themes, int installmode)
|
||||
FSUSER_OpenFile(&bgm_cache_handle, ArchiveThemeExt, fsMakePath(PATH_ASCII, bgm_cache_path), FS_OPEN_WRITE, 0);
|
||||
|
||||
padded = calloc(BGM_MAX_SIZE, sizeof(char));
|
||||
if(!current_theme->no_bgm_shuffle)
|
||||
if(!current_theme->no_bgm_shuffle && music_size)
|
||||
{
|
||||
memcpy(padded, music, music_size);
|
||||
free(music);
|
||||
@@ -191,6 +191,7 @@ static Result install_theme_internal(Entry_List_s themes, int installmode)
|
||||
return MAKERESULT(RL_PERMANENT, RS_CANCELED, RM_APPLICATION, RD_TOO_LARGE);
|
||||
}
|
||||
|
||||
remake_file(fsMakePath(PATH_ASCII, "/BgmCache.bin"), ArchiveThemeExt, BGM_MAX_SIZE);
|
||||
res = buf_to_file(music_size, fsMakePath(PATH_ASCII, "/BgmCache.bin"), ArchiveThemeExt, music);
|
||||
free(music);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user