Commit Graph

117 Commits

Author SHA1 Message Date
c2edc50750 Backup badge extdata before installing badges 2024-06-04 22:38:19 -04:00
8e876d027b Remove most compiler warnings 2024-06-04 17:43:27 -04:00
e09c33f0e8 BCSTM Player 2024-06-04 17:17:16 -04:00
9860dec103 Ask on invalid zip if zip is badge file 2024-06-03 10:23:18 -04:00
1a01ba502f Add install badges from zip file 2024-06-03 00:58:07 -04:00
30833995d1 Add spanish translation
Also some minor badge changes

Co-authored-by: Tristanabs <76444200+Tristanabs@users.noreply.github.com>
2024-06-01 22:19:53 -04:00
b0db54e71a TP Badge Browser. Incomplete - see notes
TODO:

- Load icons for browser

- Fix previews (max tex size 512x512 and preview image 512x1024?
2024-05-31 12:05:18 -04:00
4d9cde01c4 Initial badges work
Additional cleanup probably necessary, some more feature work still in progress (zip files)
2024-05-30 15:45:57 -04:00
e498b3f24a Add libcurl for non-TP downloads 2024-05-20 21:31:24 -04:00
20f3c503ad Update browser to not use combos 2024-05-12 21:51:13 -04:00
9b098f6935 Add missing string, fix preview bug in browser 2024-05-12 17:46:55 -04:00
Alex Taber
a43cbcca74 UX Overhaul (#305)
* Fix bgm checking bug

* Converted install and menu options into button menus rather than combos

* Fix sort order

* Various touch screen changes so that most functions can be done via touch

 * Dim theme list when navigating menus

* Translation framework implemented

* bug when no themes loaded fixed

* Fix theme preview regression introduced in d037691
2024-05-12 14:24:43 -04:00
Théo B
546d459696 Performance Improvements
Pass theme list & its entries around by reference rather than copying them.
Fix bug in async icon loading that caused icons to be loaded multiple times.

Original PR by @LiquidFenrir
2024-05-10 17:43:47 -04:00
c6b6f560be Require PIN for browser if browser access restricted 2024-05-07 21:25:45 -04:00
ecf9dc63ce Disable home button on theme install 2024-04-24 23:25:20 -04:00
Jan
d037691418 assemble a splash preview if none was found (#277) 2024-04-24 14:32:54 -04:00
Zemogiter
3fa73ee291 Update fs.h 2024-02-20 17:04:51 -05:00
LiquidFenrir
4a56a883fa make audio safer
- centralized stop function
- freeing the struct not from the thread while waiting on handle in it
- thread not detached
- maybe fixes hang on exit from HM in ndsp status check loop
2022-06-14 13:02:15 +02:00
Dylan G
a1e7ed9924 Added header-only URL encoding/decoding 2022-05-30 12:03:11 +01:00
Dylan G
b81a9aaa4c Dropped HTTPS for the browser as ThemePlaza is retiring TLSv1.1 2022-05-22 15:23:36 +01:00
Dylan G
6ba1ef111e Merge pull request #262 from LiquidFenrir/better-dump
add ability to dump all your official themes
2022-02-26 16:02:55 +00:00
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
LiquidFenrir
4e2bea53c1 add ability to dump all your official themes
icon and name get extracted from the dlc data
requires libctru from commit 5f13628dac75206f0c97d29a7427ce8284d910f1 or older (added the am commands necessary to find the dlc data)
Makefile changed to reflect the macro change in unreleased libctru
2021-12-22 00:00:42 +01: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
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
LiquidFenrir
cea9b8655a make shuffle work on consoles that never used it 2021-03-31 15:27:58 +02:00
Dylan G
aba2cd5f18 Finally update copyright; Flask meta files removed 2020-12-24 23:38:58 +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
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
Alex Taber
a266203a92 Add theme dump functionality 2020-12-24 14:34:56 -05:00
Alex Taber
f6d7446eba Update themeplaza url 2020-12-23 18:46:03 -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
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
f819f9d452 No longer assume that a QR filename contains a quote (Fixes #204) 2020-06-12 16:27:40 +01:00
f4217888ce Fix bug caused by race between theme thread & QR reader UI thread 2020-06-11 13:48:34 -04:00
Dylan G
ef774ce0b4 Now compiles under GCC 10 (GCC 10 now defaults to -fno-common) 2020-05-31 17:45:05 +01:00
d3e1b746cd Various improvements to QR scanner
* Improve QR scanner initialization time
* Fix race condition with QR scanner and button spamming
* Don't show black screen before QR scanner has loaded
* Show loading message for QR scanner
2018-07-26 22:02:54 +03:00
Alex Taber
c40696e982 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
2018-07-22 21:22:23 +03:00
1c3e8809f6 Fix UB caused by using a free'd struct (actually fix QR code reader) 2018-05-11 18:01:35 -04:00
LiquidFenrir
403453c3fc add a loading bar (#159)
- when loading icons
- when downloading via QR
- when loading list in the browser
- when loading preview/BGM in the browser
- when downloading from the browser
2018-05-11 09:53:38 -04:00
8189264908 Fix race condition in QR reader - slightly broken (doesn't run more than once) 2018-05-10 22:08:24 -04:00
cb6f90adc7 Fix preview bug 2018-05-10 15:43:07 -04:00
LiquidFenrir
8e43bb1a74 Shuffle without bgm (#157)
* add ability to shuffle without bgm
press B twice

* add license thingy for icons8, and thanks for their amazing icons
2018-05-10 12:52:14 -04:00
LiquidFenrir
8022ed1682 add bgm preview to the themeplaza browser
and prevent some errors
2018-05-10 13:53:51 +02:00
5520ec2b2f Move load_audio into loading.c for consistency 2018-05-10 07:40:28 -04:00
f2aa7420df Add support for zip BGM preview 2018-05-10 06:49:03 -04:00