mirror of
https://github.com/astronautlevel2/Anemone3DS.git
synced 2026-10-27 00:33:24 -04:00
Compare commits
5 Commits
newui
...
a0118a0dd0
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
a0118a0dd0 | ||
|
|
b930df77d6 | ||
|
|
2ea21c45ea | ||
|
|
5f94a6fc63 | ||
|
|
4d223a1754 |
2
.gitignore
vendored
2
.gitignore
vendored
@@ -58,7 +58,7 @@ dkms.conf
|
||||
# Build files
|
||||
build/
|
||||
out/
|
||||
romfs/
|
||||
romfs/gfx/
|
||||
|
||||
# Sublime stuff
|
||||
.clang_complete
|
||||
|
||||
BIN
romfs/anemone_set.png
Normal file
BIN
romfs/anemone_set.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 14 KiB |
BIN
romfs/hb_set.png
Normal file
BIN
romfs/hb_set.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 6.1 KiB |
BIN
romfs/tp_set.png
Normal file
BIN
romfs/tp_set.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 3.1 KiB |
@@ -247,7 +247,7 @@ int start_play(audio_s *audio) {
|
||||
ndspChnWaveBufClear(audio->channel[i]);
|
||||
|
||||
static float mix[16];
|
||||
ndspChnSetFormat(audio->channel[i], NDSP_FORMAT_ADPCM | NDSP_3D_SURROUND_PREPROCESSED);
|
||||
ndspChnSetFormat(audio->channel[i], NDSP_FORMAT_ADPCM);
|
||||
ndspChnSetRate(audio->channel[i], audio->sample_rate);
|
||||
|
||||
if (audio->channel_count == 1)
|
||||
|
||||
@@ -1009,12 +1009,12 @@ static size_t curl_parse_header(char *buffer, size_t size, size_t nitems, void *
|
||||
}
|
||||
}
|
||||
|
||||
if (!strncmp(buffer, "Content-Type: ", 14))
|
||||
if (!strncasecmp(buffer, "Content-Type: ", 14))
|
||||
{
|
||||
header->mime_type = malloc(strlen(buffer) - 13);
|
||||
strncpy(header->mime_type, buffer + 14, strlen(buffer) - 14);
|
||||
header->mime_type[strlen(buffer) - 14] = '\0';
|
||||
} else if (!strncmp(buffer, "Content-Disposition: ", 21))
|
||||
} else if (!strncasecmp(buffer, "Content-Disposition: ", 21))
|
||||
{
|
||||
header->filename = malloc(strlen(buffer) - 20);
|
||||
memcpy(header->filename, buffer + 21, strlen(buffer) - 21);
|
||||
@@ -1098,29 +1098,32 @@ static int64_t curl_http_get(const char * url, char ** out_filename, char ** buf
|
||||
}
|
||||
|
||||
DEBUG("Content-Disposition: %s\n", header.filename);
|
||||
if (header.filename)
|
||||
if (out_filename)
|
||||
{
|
||||
char *filename = strstr(header.filename, "filename=");
|
||||
if (filename)
|
||||
if (header.filename)
|
||||
{
|
||||
filename = strpbrk(filename, "=") + 1;
|
||||
char *end = strpbrk(filename, ";");
|
||||
if (end)
|
||||
*end = '\0';
|
||||
|
||||
if (filename[0] == '"')
|
||||
char *filename = strstr(header.filename, "filename=");
|
||||
if (filename)
|
||||
{
|
||||
filename[strlen(filename) - 1] = '\0';
|
||||
filename++;
|
||||
}
|
||||
filename = strpbrk(filename, "=") + 1;
|
||||
char *end = strpbrk(filename, ";");
|
||||
if (end)
|
||||
*end = '\0';
|
||||
|
||||
*out_filename = malloc(0x100);
|
||||
strcpy(*out_filename, filename);
|
||||
if (filename[0] == '"')
|
||||
{
|
||||
filename[strlen(filename) - 1] = '\0';
|
||||
filename++;
|
||||
}
|
||||
|
||||
*out_filename = malloc(0x100);
|
||||
strcpy(*out_filename, filename);
|
||||
} else {
|
||||
*out_filename = NULL;
|
||||
}
|
||||
} else {
|
||||
*out_filename = NULL;
|
||||
}
|
||||
} else {
|
||||
*out_filename = NULL;
|
||||
}
|
||||
|
||||
*buf = data.result_buf;
|
||||
|
||||
Reference in New Issue
Block a user