Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
matt
MegaGRRL
Commits
9bfa08f4
Commit
9bfa08f4
authored
Jan 30, 2020
by
natalie
💜
Browse files
update player again...
parent
c00b0281
Changes
1
Hide whitespace changes
Inline
Side-by-side
firmware/main/player.c
View file @
9bfa08f4
...
...
@@ -286,10 +286,10 @@ bool Player_StartTrack(char *FilePath) {
ESP_LOGI
(
TAG
,
"Checking file type of %s"
,
FilePath
);
FILE
*
test
=
fopen
(
FilePath
,
"r"
);
if
(
!
test
)
{
if
(
*
(
FilePath
+
(
strlen
(
FilePath
)
-
1
))
==
'z'
)
{
ESP_LOGW
(
TAG
,
"vgz doesn't exist, let's try vgm"
)
*
(
FilePath
+
(
strlen
(
FilePath
)
-
1
))
=
'm'
;
FILE
*
test
=
fopen
(
FilePath
,
"r"
);
if
(
*
(
FilePath
+
(
strlen
(
FilePath
)
-
1
))
==
'z'
||
*
(
FilePath
+
(
strlen
(
FilePath
)
-
1
))
==
'Z'
)
{
ESP_LOGW
(
TAG
,
"vgz doesn't exist, let's try vgm"
)
;
*
(
FilePath
+
(
strlen
(
FilePath
)
-
1
))
-
=
0x0d
;
test
=
fopen
(
FilePath
,
"r"
);
if
(
!
test
)
{
ESP_LOGE
(
TAG
,
"vgm doesn't exist either"
);
return
false
;
...
...
@@ -307,14 +307,15 @@ bool Player_StartTrack(char *FilePath) {
ESP_LOGI
(
TAG
,
"Compressed"
);
Ui_StatusBar_SetExtract
(
true
);
Player_Unvgz
(
FilePath
,
false
);
strcpy
(
FilePath
,
"/sd/.mega/unvgz.tmp"
);
Ui_StatusBar_SetExtract
(
false
);
}
else
if
(
magic
==
0x
56
67
)
{
}
else
if
(
magic
==
0x67
56
)
{
ESP_LOGI
(
TAG
,
"Uncompressed"
);
}
else
{
ESP_LOGI
(
TAG
,
"Unknown"
);
return
false
;
}
ESP_LOGI
(
TAG
,
"parsing header"
)
ESP_LOGI
(
TAG
,
"parsing header"
)
;
Player_VgmFile
=
fopen
(
FilePath
,
"r"
);
Player_PcmFile
=
fopen
(
FilePath
,
"r"
);
Player_DsFindFile
=
fopen
(
FilePath
,
"r"
);
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment