Commit Graph

299 Commits

Author SHA1 Message Date
Dylan G
0500b24431 Merge pull request #260 from LiquidFenrir/patch-1
Make BUF_TO_READ larger to fix audio in some cases
2022-02-26 15:47:30 +00:00
Dylan G
83071d3734 Merge pull request #250 from LiquidFenrir/shuffle-fix
make shuffle work on consoles that never used it
2022-02-26 15:47:11 +00:00
Théo B
0da2594251 Make BUF_TO_READ larger to fix audio in some cases
If the preview .ogg has a samplerate > the BUF_TO_READ constant, there was an out of bounds write to the audio buffers which resulted in crackling.
Thus, upped it to 48000 (0x80-aligned, and pretty much the highest rate anything consumer goes). a bit big, but safe.
2021-09-26 12:10:25 +02:00
Dylan G
c5dc7448e4 Merge pull request #259 from LiquidFenrir/patch-1
Update CONTRIBUTORS.md
2021-08-08 19:05:37 +01:00
Théo B
999b764c26 Update CONTRIBUTORS.md
Might as well add my name there, since it's on the account as well now.
2021-08-08 19:27:36 +02:00
Dylan G
18cb5c616f Correctly handle cases where files already exist on the filesystem.
Also: patched a bug wherein the filename filter was acting up, transforming `file.zip` to `file-zip.zip`, for example.
2021-06-17 01:43:50 +01:00
Dylan G
3f2e4c03f3 Constness 2021-06-17 01:37:33 +01:00
Dylan G
163e12d38a Add issue templates (#249)
* Add issue templates

We've needed this for a while, due to bug reports that don't really mean anything.

* response to feedback
2021-06-14 13:04:33 -04:00
02c3e617ae Handle when content-disposition header is not present 2021-06-14 13:03:57 -04:00
LiquidFenrir
6161874d07 fix a shuffle weirdness (10 - N official ones)
from anemone, when setting a N theme shuffle, then a single theme you could only set 10 - N official themes on shuffle afterwards (and even then, it would fail and reset the theme stuff, leaving you able to set however many official themes on shuffle you wanted)
this skips the failing step
2021-04-03 21:55:52 +02:00
LiquidFenrir
cea9b8655a make shuffle work on consoles that never used it 2021-03-31 15:27:58 +02:00
Dylan G
7745530764 Fixed 4720a499 (TP returns 303 currently, not 404) => handle 303 well(?); pushed some code around 2021-03-11 13:47:24 +00:00
Dylan G
0bab0f6700 Patched httpc error message to actually be readable on console; also provides Result code 2021-03-11 12:34:03 +00:00
Dylan G
38ab370cf1 Merge pull request #247 from KennLDN/patch-1
Fix broken link in CONTRIBUTORS.md
2021-02-08 13:40:16 +00:00
kenn
5cea6c8df4 Fix broken link in CONTRIBUTORS.md 2021-02-08 13:38:32 +00:00
Alex Taber
e4e0118c1a Prevent out of bounds scrolling in the browser 2021-01-01 23:51:51 -05:00
Dylan G
accdaaed2a Reduced code duplication 2020-12-31 21:28:10 +00:00
Alex Taber
3fb90e8197 Remove unused variables 2020-12-24 19:03:47 -05:00
Dylan G
aba2cd5f18 Finally update copyright; Flask meta files removed 2020-12-24 23:38:58 +00:00
Dylan G
e5ea18e81a Cleared TODO 2020-12-24 23:34:17 +00:00
Dylan G
4720a49923 QoL: alert the user if they attempt to download a theme that has not been approved.
Stopgap solution; TP does not want to expose approval status in headers for security reasons.
2020-12-24 23:34:17 +00:00
Dylan G
7871225999 Fix potential null dereference 2020-12-24 23:34:17 +00:00
Dylan G
1e5d09e85a Major refactor to networking, including a fix for an incorrect error message on cancelling the swkbd for downloads 2020-12-24 23:34:17 +00:00
Alex Taber
a647494306 Fix another null dereference 2020-12-24 18:27:48 -05:00
Alex Taber
c801e28523 Prevent free(NULL) in free_icons 2020-12-24 17:13:06 -05:00
Alex Taber
c9e1420a00 re-add s upport for themes without an SMDH
Also change theme dump random color algo
2020-12-24 16:58:06 -05:00
Dylan G
bc2f4ec581 Finished up software keyboard input for filenames in http_get.
Closes #220.
Worth noting that the callback may be shared between this whatever @astronautlevel2 is working on (theme dumping, I think).
2020-12-24 20:01:38 +00:00
Alex Taber
9592d76c2c Fix color generation 2020-12-24 14:52:08 -05:00
Alex Taber
a266203a92 Add theme dump functionality 2020-12-24 14:34:56 -05:00
Alex Taber
17afdbaae2 Fix regression in c40696e982
Extra menu works again
2020-12-23 19:59:18 -05:00
Alex Taber
f6d7446eba Update themeplaza url 2020-12-23 18:46:03 -05:00
Alex Taber
c49129d408 Remove trello link
We don't use trello for feature tracking, link is very outdated
2020-12-23 17:37:29 -05:00
Alex Taber
f9a2ae5190 Fix RGB previews having inverted colors
Closes #227
2020-12-23 17:30:55 -05:00
Alex Taber
573b7d35e6 Fix potential hang in QR reader 2020-12-23 16:51:57 -05:00
a2b6eb94e4 Fix regressions introduced in 1c2e562dd6 2020-12-23 16:20:49 -05:00
Théo B
95ff2dd3ba Memory leak fix and camera multithreading safety improvement (#239)
* memory leak fix and attempt at optimizing space

* camera rework

try to use better locking algorithm (MRSW lock on wikipedia)

* add time print (toggleable) and stuff

remove old mixed qr thingss from main

* remove the dumb 3 bytes saving

* remove useless time measure code

* forgot to close the stop event handle

* fix memory leak when loading icon from smdh

* fix entry path on folders

optimization using memcpy cause it to have the "/info.smdh" when the entry is a folder. simply remove that with a memset to 0.

Co-authored-by: Alex Taber <astronautlevel2@users.noreply.github.com>
2020-12-21 22:31:38 -05:00
Dylan G
1c2e562dd6 Networking rework (#240)
* Began refactoring http_get. Still a few cases to handle, but it works.

* Introduced error enum; handle error 406; handle a misbehaving server; redirect_url leaked memory (L888)

* Allowed calls to http_get to pass NULL as acceptable_mime_types

* Removed status_code from header struct; eventually planning to move most of parse_header's logic back to http_get, so this makes sense

* Moved some more logic back into http_get
Note: currently behaves weirdly with some QR codes, including but probably not limited to ones pointing to TinyURL.

* Handle redirects correctly; other rearrangements

* Formatting

* Handle HTTP 303 See Other correctly

* Removed "Download failed" error in camera.c due to all related failures being handled in http_get

* Fixed missing loading bar; started working on unchunked download

* Added unchunked download

* Reintroduced the download progress bar, rolled back to always doing chunked download

* URL length caps at 2083 chars

* Slightly more efficient

* Correctly handle incorrect filesize header
TODO: reorder clauses to remove the goto?

* Fixed illegal characters, removed unnecessary logic (technically a regression, as we always have to realloc now)

* Finally finished up status code handling. Fixed a memory leak when the server fails conneg.
2020-12-21 21:11:11 -05:00
Dylan G
9cb13f6be1 Fix #326
Typo in button string.
2020-11-18 19:37:46 +00:00
6a51b4eae5 Fix misc. QR code bugs
Close data->started properly, don't double close data->cancel
Should fix the QR code hang
2020-06-22 12:27:14 -04:00
14d9e99b7d Properly set body_size
Fix regression in 36e8104dbb
2020-06-17 14:09:23 -04:00
36e8104dbb Automatically set BGM flag to enabled when doing a BGM install 2020-06-16 18:45:59 -04:00
6bafa6a22e Add lz decompression code
Also add byte search code
2020-06-15 23:10:30 -04:00
Dylan G
408b2903f2 Finally void-out textlen in the callbacks (no more compiler warnings) 2020-06-15 23:11:28 +01:00
fbca873f52 Reset cursor on page load (Closes #206) 2020-06-13 15:29:57 -04:00
d1a821edf5 Merge branch 'master' of github.com:astronautlevel2/Anemone3DS 2020-06-12 12:03:34 -04:00
a4532b0f3d Various fixes
Stop loading themes missing smdh files - this was causing scroll crashes due to how the icon loading code was working. In the future we will include a message about how themes are skipped due to lacking smdh files. Invalid zips also caused the same issue and are also now being properly ignored

Fix memory leak in the zip file loading code
2020-06-12 12:02:13 -04:00
Dylan G
f819f9d452 No longer assume that a QR filename contains a quote (Fixes #204) 2020-06-12 16:27:40 +01:00
2c2c7f4b33 Fix double free 2020-06-11 21:24:01 -04:00
b75d1acb21 Fix crash caused by quirc overflowing the 3ds stack in some instances 2020-06-11 20:41:17 -04:00
e8d0a2eb27 Fix similar (but unrelated to the previous) race condition 2020-06-11 14:34:14 -04:00