Skip to content

Commit

Permalink
Merge pull request #92 from Alann-Mints/master
Browse files Browse the repository at this point in the history
Fixed freezing with music player in file manager
  • Loading branch information
aldostools authored Feb 20, 2023
2 parents e08a6ad + 114f0a5 commit efbc0e2
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions source/file_manager.c
Original file line number Diff line number Diff line change
Expand Up @@ -411,7 +411,7 @@ void test_audio_file(bool stop_audio)
{
while(sel1<nentries1)
{
sel1++; if(sel1>=nentries1) {sel1=0; if(exit_loop) break; else exit_loop=true;}
sel1++; if(sel1>=nentries1) {sel1=0; if(exit_loop) return; else exit_loop=true;}
sprintf(audio_file, "%s/%s", path1, entries1[sel1].d_name);
if(strcasestr(entries1[sel1].d_name, ".mp3") || strcasestr(entries1[sel1].d_name, ".ogg")) break;
}
Expand All @@ -420,7 +420,7 @@ void test_audio_file(bool stop_audio)
{
while(sel2<nentries2)
{
sel2++; if(sel2>=nentries2) {sel2=0; if(exit_loop) break; else exit_loop=true;}
sel2++; if(sel2>=nentries2) {sel2=0; if(exit_loop) return; else exit_loop=true;}
sprintf(audio_file, "%s/%s", path2, entries2[sel2].d_name);
if(strcasestr(entries2[sel2].d_name, ".mp3") || strcasestr(entries2[sel2].d_name, ".ogg")) break;
}
Expand Down Expand Up @@ -1106,7 +1106,7 @@ int exec_item(char *path, char *path2, char *filename, u32 d_type, s64 entry_siz
{
char *ext = get_extension(filename);

if((use_mamba || use_cobra) && !(d_type & IS_MARKED) &&
if(/*(use_mamba || use_cobra) &&*/ !(d_type & IS_MARKED) &&
(strcasestr(".mp3|.ogg", ext) != NULL))
{
sprintf(TEMP_PATH, "%s/%s", path, filename);
Expand All @@ -1117,7 +1117,7 @@ int exec_item(char *path, char *path2, char *filename, u32 d_type, s64 entry_siz
}
else
{
audio_pane = 1;
audio_pane = fm_pane + 1;

sprintf(audio_file, "%s", TEMP_PATH);
if(PlayAudio(audio_file, 0, AUDIO_ONE_TIME) == 0) snd_inited|= INITED_AUDIOPLAYER;
Expand Down Expand Up @@ -2818,4 +2818,4 @@ int file_manager(char *pathw1, char *pathw2)

return exitcode;
}
#endif
#endif

0 comments on commit efbc0e2

Please sign in to comment.