option to install nro from fs, swap LR display, load translations locally, fix scrolling sound, add file name to rename swkdb

- reduce nxlink svcsleep to reduce latency between polling.
- translations can now be loaded from /config/sphaira/i18n/name.json, this is to help aid those creating translations.
- swap LR position in display. the fix is a hack, but it'll do for now.
- sound effects are now consistent throught the app.
- renaming a file will now show the current file name in swkbd, makes it easier to rename from config.ini.template -> config.ini
- removed some dead code that was unused.
- add credits to the readme.
- speed up playlog ini parsing by browsing the ini rather that doing a query for each entry.
This commit is contained in:
ITotalJustice
2024-12-17 16:03:05 +00:00
parent c11990e1bd
commit 9966e57e12
20 changed files with 120 additions and 201 deletions

View File

@@ -10,7 +10,7 @@ struct Config {
bool numpad{};
};
Result ShowInternal(Config& cfg, const char* guide, s64 len_min, s64 len_max) {
Result ShowInternal(Config& cfg, const char* guide, const char* initial, s64 len_min, s64 len_max) {
SwkbdConfig c;
R_TRY(swkbdCreate(&c, 0));
swkbdConfigMakePresetDefault(&c);
@@ -24,6 +24,10 @@ Result ShowInternal(Config& cfg, const char* guide, s64 len_min, s64 len_max) {
swkbdConfigSetGuideText(&c, guide);
}
if (initial) {
swkbdConfigSetInitialText(&c, initial);
}
if (len_min >= 0) {
swkbdConfigSetStringLenMin(&c, len_min);
}
@@ -37,16 +41,16 @@ Result ShowInternal(Config& cfg, const char* guide, s64 len_min, s64 len_max) {
} // namespace
Result ShowText(std::string& out, const char* guide, s64 len_min, s64 len_max) {
Result ShowText(std::string& out, const char* guide, const char* initial, s64 len_min, s64 len_max) {
Config cfg;
R_TRY(ShowInternal(cfg, guide, len_min, len_max));
R_TRY(ShowInternal(cfg, guide, initial, len_min, len_max));
out = cfg.out_text;
R_SUCCEED();
}
Result ShowNumPad(s64& out, const char* guide, s64 len_min, s64 len_max) {
Result ShowNumPad(s64& out, const char* guide, const char* initial, s64 len_min, s64 len_max) {
Config cfg;
R_TRY(ShowInternal(cfg, guide, len_min, len_max));
R_TRY(ShowInternal(cfg, guide, initial, len_min, len_max));
out = std::atoll(cfg.out_text);
R_SUCCEED();
}