Commit graph

507 commits

Author SHA1 Message Date
Aidan MacDonald
dcac2c616f Add setting for numeric list sort order
The sort order of numeric lists can now be changed with the
new "List Order" setting. It defaults to ascending for most
scrollwheel targets and descending for all others, matching
the old hardcoded behavior.

Change-Id: I4866f04ec5995158edf9e40badf7f661b3ddea81
2021-12-11 01:13:22 +00:00
Christian Soffke
7e0e4fe888 Add setting to hide shutdown message
Also keeps display from lighting up before shutdown,
which reduces distractions, especially at night and
when the sleep timer is used by allowing the
screen to remain dark.

Change-Id: I1c2d1966f6fb9766532adf01e8828876a871857f
2021-12-08 22:26:38 -05:00
Aidan MacDonald
e3ee1908dd powermgmt: Small cleanups to battery capacity code
- Don't include the 'battery capacity' setting unless the
  target allows changing it.
- Clean up the preprocessor conditionals used to check for
  variable battery capacity support.
- Don't use a variable for battery capacity unless it is
  actually needed.

Change-Id: I3d8a338f107014f2c5098bc0a44ef0cfb4df9356
2021-12-05 13:37:25 -05:00
Christian Soffke
fbf83dc4ce Add setting for disabling wrap-around lists
Allows user to decide whether scrolling lists will wrap around
to the opposite end after the first or last item has been reached.

Change-Id: I22156812cf4c857ddc4b6c48c1cef013b1985260
2021-11-11 17:31:10 -05:00
William Wilgus
30a23fdd6d folder_select.c move to plugin as db_folder_select
handles the folder selection for autoresume paths and database paths

folder_select uses the pluginbuf to build the directory tree
hopefully having it as a plugin will make it stop corrupting
TSR plugins like battery_bench and announce_status

I left the original include and source in the gui directory for now
there are currently no other users..

Change-Id: If40ccb5a2bec4286a0616c10dfa7e1479a592808
2021-11-11 00:28:59 -05:00
Moshe Piekarski
13ac485625 Add single playback mode
(FS#482)

Change-Id: I8b4c3e4ffb6975122153e82f2b9848c382195163
2021-11-05 09:20:04 -04:00
William Wilgus
d72a0ed65d Use USB events for storing plugin_menu state
use usb connected callback to cancel menu reentry after USB plug/unplug

Change-Id: I8267deed6e8ada94ca527392f56f50ef22def1d7
2021-10-31 12:42:24 -04:00
William Wilgus
dc24a18cef PLUGINBROWSER make resumable
make the plugin browser remember the last item between invocations

this has bugged me for the longest time dealing with the plugin_menu

Fix a very old bug fix for reloading lang strings in the lang menu
FS#8117, sending multiple ENTER_MENU_ITEM callbacks from different
areas of the code makes it hard to keep track of where your callback
is originating

Change-Id: Ib0a61558c11ee4c772134378a7020ac0e10fc4ee
2021-10-29 03:07:42 -04:00
Aidan MacDonald
6322e66219 Remove long-deprecated old style EQ settings
These were deprecated by 1eb17dc9f4 back in 2013 just prior to the
3.13 release. We've had 3.14 and 3.15 since then and I guess nobody
will complain if we finally remove them (fingers crossed...)

Also fix a line which got missed when converting hardcoded numbers
to EQ_NUM_BANDS in that commit.

Change-Id: I79dd71f1f2810bf19bc135999868fafc5fee6e04
2021-08-28 13:23:34 +00:00
Aidan MacDonald
30e96a3732 quickscreen: fix EQ enable not working in quickscreen
The EQ enabled setting needs to call into the DSP core when it's
changed but this was only hooked into the EQ menu. The quickscreen
uses option_select_next_val() so those DSP hooks were not getting
called because the setting did not have any callback defined.

It seems this bug was introduced by 362f7a3220 removing the blanket
call to settings_apply(). Other settings might be affected too.

Change-Id: Idcce5809c525fa619e6bdf1be50c98a5df103fec
2021-08-26 19:34:18 +00:00
Aidan MacDonald
2008b7d1b0 Fix yellow from d541a72a
Change-Id: I9c539035544d285da1941d2c1954cf2aa4d00087
2021-08-06 19:59:33 +01:00
Aidan MacDonald
d541a72a0e Bugfixes in eq_menu.c
Change-Id: Ibf754554f685d13ac00a49694fcecee459ff838f
2021-08-06 18:23:57 +00:00
Solomon Peachy
68294da574 Document an intentional fallthrough in the volume limit menu code
Change-Id: I51d331ff788b73aa84fece63bfdca9c3e08c0384
2021-07-22 23:55:03 +00:00
Dana Conrad
14f7a958af Softlock Improvements
Add a check to see if the keys are currently locked and allow
them to be unlocked to ensure we don't get stuck when the current
playlist ends while the WPS is locked.
(Original by Aidan MacDonald)

Adding initialization for unlock_combo and to arm the autolock
(if enabled) without the user needing to press the lock button
at least once every boot (which is the prior behavior).

Removing screen_has_lock check from is_keys_locked()

Change-Id: I0fbf9b9746b011a7086ec8505a7ecc4b84f2d332
2021-06-04 00:00:57 +00:00
Dana Conrad
4f83e66cd4 FS#13287 - Load a newly saved playlist and resume where it was
Works from any playlist saving operation accessed from the
While Playing Screen, all other playlist saving operations
are unchanged.

Now a user-selectable setting! Located in
General Settings -> Playlists -> Current Playlist ->
Reload After Saving (Yes/No)

Change-Id: I5085c3f4c56c518a812d5ee015d15cc4dca19a28
2021-05-03 20:10:27 +00:00
Aidan MacDonald
f6d3680cb8 Make sure battery menu is shown if it contains settings
The #if statement didn't reflect all menu items in the battery
menu, so if the USB charging enable setting was the only one
present, the entire menu would be hidden.

Change-Id: I17a4ed626debf1f61ca140d67d477bdbd52ca180
2021-04-21 18:28:09 +00:00
Solomon Peachy
bc416ff590 misc: Only include rbpaths.h and string-extra.h in places that need it
(Don't include rbpaths.h in settings.h, or string-extra.h in rbpaths.h)

Build-tested on rocker, erosq, mini2g, nano2g,
                xduoox3, clipzip, dx50, and uisim

Change-Id: If32e9c9910f5c8247a655cb64522b84d6d7ccbb5
2021-04-10 12:08:12 -04:00
Solomon Peachy
213d372c92 FS#13272: Fix up volume_limit to respect decimilaztion.
Change-Id: Ib0e5ddcd660115f156ddb545e45bbe7da42f9709
2021-04-07 14:38:54 -04:00
Dana Conrad
1aed109fa8 Add ability to always have autolock on
Tested on ErosQ

Added a setting in the Advanced Softlock menu to always
have autolock on, rather than having to "arm" it with the
softlock button. Lock/Unlock still works the same with
this on, but when the screen turns off, the device always
ends up in the locked state. Requires Autolock On to be
set as well, and the normal Autolock functionality is
unchanged with this off.

Caveat: the power/softlock button must be pressed
at least once after powering on the device or enabling the
feature. After that, it should consistently always "arm"
the autolock.

Added feature to manual in
manual/configure_rockbox/system_options.tex. Also updated
some labels I had changed in the Advanced Key Lock menu
and added information for Disable All Lock Notifications
in a previous commit. Shared items also updated in
manual/configure_rockbox/display_options.tex for selective
backlight.

Change-Id: I09dc6814bee803e40c7088157e1fe9d01d5f3474
2021-04-05 11:09:32 +00:00
Dana Conrad
1c54c5227b Add disable setting for all softlock notifications
Tested on erosq

Added ability to disable all softlock notifications. Setting is
"Disable All Lock Notifications" under Advanced Key Lock
Settings.

Tested to make sure it doesn't interfere with backlight
exemptions, keylock exemptions, or first press enables backlight
only. When enabled, this overrules the existing Disable Notify
setting, which only disables the reminders when a button is
pressed while the device is already locked.

Also changed phrases in the Advanced Key Lock settings menu
to make it more obvious what the options do. Changed
LANG_ACTION_PLAY, LANG_ACTION_SEEK, and LANG_ACTION_SKIP from
"[button]" to "Exempt [button]". These language changes will
also affect the Backlight Exemptions list, but the wording
should be appropriate there as well.

Added LANG_SOFTLOCK_DISABLE_ALL_NOTIFY and LANG_ACTION_VOLUME,
changed LANG_VOLUME to LANG_ACTION_VOLUME in display_menu.c
for consistency.

Change-Id: I914fe154ba5d508a842165aea7c7755e4e6b9c57
2021-03-23 02:05:20 +00:00
Aidan MacDonald
bf9fdb13c4 Remove some HAVE_FUNCTIONAL_MODE bits
This was dead code introduced by 0662793c, and got missed
by 08ab3aea which should've removed it.

Change-Id: I87d02eab11479133c66524e58efc504ff093dfbd
2021-03-22 13:22:13 +00:00
Aidan MacDonald
55805e13a4 Add new audiohw capability: POWER_MODE_CAP
This allows the user to make use of the DAC's power-saving abilities.
The two modes are "high performance" and "battery saver". This feature
is supported by the AK4376 DAC in the upcoming FiiO M3K port.

The setting is only a manual toggle right now, but in the future it
could be hooked up to the battery level (via another setting) so it
can be toggled automatically when the battery gets too low.

Change-Id: I482af6e2f969fcbdeb3411bd3ff91f866b12d027
2021-03-22 13:00:11 +00:00
Christian Soffke
2d8e0f7c90 Customizable Current Playlist Submenu
Options to add shuffled tracks and to queue tracks in the
Current Playlist Submenu can now be hidden, or the latter
can also be put into its own submenu.
Users can customize this in Settings  by going to
"General Settings - Playlists -> Current Playlist" and
choosing from "Show Shuffled Adding Options"  (No / Yes)
or "Show Queue Options" (No / Yes / In Submenu).

Allows for the paring down of the set of choices to
a minimum of the 4 more common ones for adding tracks
to a dynamic playlist (coming from the current total
of 11).

Defaults have been set so that users have to actively
modify their settings to notice any difference, which
makes it unlikely that anybody's workflow would be
negatively affected by this change.

Change-Id: Ibe48fc4da2c79f54cd7272df8e1e3ba9955203e5
2021-03-14 23:36:03 +00:00
Christian Soffke
5c3bbc6a9c Reset filetype colors when resetting theme colors
Even though filetype colors can't currently be changed by going to Settings->Theme Settings->Colors, a user likely wishes to still reset them when selecting 'Reset Colors' after a .colours file may have been applied by a theme.

Change-Id: I4494c83a502666900f6d9d2cc3fb1825af5e45f6
2021-03-09 11:18:47 +00:00
Solomon Peachy
c9e8d96e77 ibasso: Fix the dx50/dx90 build (and usb_mode selection)
(The usb_mode selection setting was actually broken even though
 it had been previously compiling...)

Change-Id: I0cac31d24c0ef684b934e40ab14f683cc4a31738
2021-03-07 19:42:54 -05:00
Solomon Peachy
7c58b6f0db usb_mode: Missed a #define that led to some sim build failures.
Change-Id: Ie872c5684a200bf99ee7083bb35700a663ef9788
2021-03-07 23:31:36 +00:00
Solomon Peachy
bbd85cf0c1 settings: Fix inconsistent #ifdefs wrapping the usb_mode stuff
It should be:

 #if defined(HAVE_USB_POWER) && !defined(USB_NONE) && !defined(SIMULATOR)

Change-Id: I49355d56834de3893a9a244793b39f662c27f136
2021-03-07 23:12:41 +00:00
Solomon Peachy
207514fb25 voice: Allow voice prompt volume to be configurable
It defaults to 100%, allow it to be dialed back

Change-Id: If997fb7d3057472a7fac0be4ae7d1e8fce654c49
2021-03-07 12:51:36 +00:00
Solomon Peachy
03cd773051 ibasso: Hopefully hack usb into building again.
Change-Id: I6f369d60319704ab4d2c18b80ba6e78902630790
2020-11-13 20:04:04 -05:00
Solomon Peachy
60f581e8f5 usb: Add ability to prompt user about what to do upon usb insertion
v3: Add in config option
 v4: Bugfixes
 v5: Force a redraw upon exiting
 v6: keypress-in-chargeonly mode enables mass storage (and vice versa)
 v7: Fix bootloader builds
 v8: Update manual, and have bootloader respect keypresses
 v9: Change default to mass storage (ie no change in behavior)

 todo:
  * test-build dx50/dx90
  * Switch from yes/no to proper menu?
  * prevent WPS progress bar from drawing over us

Change-Id: I82e0ccb08497b7a5aa756ce77f1332ee963703a7

...

Change-Id: I7946cf240b18a4fa8ace5e25e1eb6e97b8b12d7c
2020-11-13 16:44:01 -05:00
William Wilgus
3237ae4a4f LCD core move buf ptr and address look up function viewport struct
I'm currently running up against the limitations of the lcd_draw functions
I want these functions to be able to be used on any size buffer not
just buffers with a stride matching the underlying device

[DONE] allow the framebuffer to be decoupled from the device framebuffer
[DONE need examples] allow for some simple blit like transformations
[DONE] remove the device framebuffer from the plugin api
[DONE}ditto remote framebuffer
[DONE] remove _viewport_get_framebuffer you can call struct *vp = lcd_set_viewport(NULL) and vp->buffer->fb_ptr

while remote lcds may compile (and work in the sim) its not been tested on targets

[FIXED] backdrops need work to be screen agnostic

[FIXED] screen statusbar is not being combined into the main viewport correctly yet

[FIXED] screen elements are displayed incorrectly  after switch to void*

[FIXED] core didn't restore proper viewport on splash etc.

[NEEDS TESTING] remote lcd garbled data

[FIXED] osd lib garbled screen on bmp_part

[FIXED] grey_set_vp needs to return old viewport like lcd_set_viewport

[FIXED] Viewport update now handles viewports with differing buffers/strides by copying to the main buffer

[FIXED] splash on top of WPS leaves old framebuffer data (doesn't redraw)
[UPDATE] refined this a bit more to have clear_viewport set the clean bit and have skin_render do its own screen clear
scrolling viewports no longer trigger wps refresh
also fixed a bug where guisyncyesno was displaying and then disappearing

[ADDED!] New LCD macros that allow you to create properly size frame buffers in you desired size without wasting bytes
(LCD_ and LCD_REMOTE_)
LCD_STRIDE(w, h) same as STRIDE_MAIN
LCD_FBSTRIDE(w, h) returns target specific stride for a buffer W x H
LCD_NBELEMS(w, h) returns the number of fb_data sized elemenst needed for a buffer W x H
LCD_NATIVE_STRIDE(s) conversion between rockbox native vertical and lcd native stride (2bitH)
test_viewports.c has an example of usage

[FIXED!!] 2bit targets don't respect non-native strides
[FIXED] Few define snags

Change-Id: I0d04c3834e464eca84a5a715743a297a0cefd0af
2020-10-26 12:28:48 -04:00
William Wilgus
3550283442 Add open_plugin to core
open_plugin allows arbitrary plugins to be called
in hotkey and start screen

replaces PictureFlow Integration
shortcuts menu plays plugins now too

rather than store paths and parameters in the settings
that reside in memory instead entries in a file are searched by hash.
after all, the plugin has to be loaded from disk anyways

----------------------------------------------------------------------------
shortcut_viewer.rock--  can now call plugins rather than taking you to them
in the browser
-----------------------------------------------------------------------------
Added a new option to menus:
 F_CB_ON_SELECT_ONLY
 instead of option callback every time a item is accessed
 F_CB_ON_SELECT_ONLY fires callback only when item is selected
-----------------------------------------------------------------------------
Added manual entries
-----------------------------------------------------------------------------

Change-Id: I078b57b1d2b4dd633c89212c1082fcbc1b516e6a
2020-08-17 10:15:14 -04:00
Solomon Peachy
658026e626 [4/4] Remove HAVE_LCD_BITMAP, as it's now the only choice.
Note:  I left behind lcd_bitmap in features.txt, because removing it
would require considerable work in the manual and the translations.

Change-Id: Ia8ca7761f610d9332a0d22a7d189775fb15ec88a
2020-07-24 21:20:13 +00:00
Solomon Peachy
8cb555460f [3/4] Completely remove HWCODEC support
'swcodec' is now always set (and recording_swcodec for recording-capable
units) in feature.txt so the manual and language strings don't need to
all be fixed up.

Change-Id: Ib2c9d5d157af8d33653e2d4b4a12881b9aa6ddb0
2020-07-24 21:20:13 +00:00
Solomon Peachy
0c4f89370d [2/4] get rid of HAVE_LCD_CHARCELLS
HAVE_LCD_BITMAP is now redundant.

lcd_bitmap is always-on in features.txt so manual and lang strings
don't have to change

Change-Id: I08eeb20de48099ffc2dc23782711af368c2ec794
2020-07-24 21:20:13 +00:00
Solomon Peachy
092c340a20 [1/4] Remove SH support and all archos targets
This removes all code specific to SH targets

Change-Id: I7980523785d2596e65c06430f4638eec74a06061
2020-07-24 21:20:13 +00:00
William Wilgus
cb94b3ae2e keyboard add ability to specify temporary custom layouts
rb core allows you to load custom keyboard layouts

this patch adds the ability to load a keyboard layout in a buffer
the custom layout is temporary and does not overwrite the current layout

use like so:

    unsigned short kbd[64];
    unsigned short *kbd_p = kbd;
    if (!kbd_create_layout("ABCD1234\n", kbd, sizeof(kbd)))
        kbd_p = NULL;

    rb->kbd_input(buf,sizeof(buf), kbd_p);

Change-Id: I7be2bd4a1b4797a147fa70228a9749dc56ac052a
2020-07-22 06:48:28 -04:00
Solomon Peachy
c84f9252d7 Fix the yellow in the player build from c39f95465
Change-Id: Iae3a8f4eccd3708b41d43da6e12a3199b1d657c6
2020-07-19 23:37:43 +00:00
Solomon Peachy
6bb704c9d0 Fix more of the red from c39f95465
Change-Id: I8c9510774803f7164f7a003575711f3dd980223c
2020-07-19 22:55:09 +00:00
Solomon Peachy
11274e3d26 menus: Fix some of the red from c39f95465
Change-Id: Ic22123a83bf119605c8ddf686b6a8e21f9555c6a
2020-07-19 22:32:36 +00:00
William Wilgus
c39f95465b do_menu pass internal synclist reference to callback
keep running into the rigid nature of do_menu
it isn't too bad when you don't need voice but once
you do the fun awaits

do_menu likes to talk on menu enter which is in a loop when you use do_menu
I would like to move the processing to the callback
TOO BAD you only get an action and the menu_item_ex struct
you sent it when calling the function

Change-Id: Iaefd0cc133435d675b7dd27a558c504d6ccb327a
2020-07-19 22:10:26 +00:00
William Wilgus
70aeac4666 Fix red dynamic menus
missed one.

Change-Id: Ifa986b0a3397fed8ef28931ecbcdd2910d203ea3
2019-09-20 03:57:38 -05:00
William Wilgus
10e5e56f3c Bug fix dynamic menus
Dynamic menus had a buffer_len variable in the parent function but it
was discarded before passing to the callbacks

Why!!?? No clue but everything that used it was assuming MAXPATH
Wouldn't be surprised to see some bugs pop out from this one..

init_menu_lists() was assuming MENU_HAS_DESC and setting the
menu title + icon based on such even though it could be invalid
didn't see anywhere in the code that was currently using MENU_DYNAMIC_DESC
in relation to a top level menu but considering it caused all kinds
of corruption to the menu when I tried its probably been tried
and abandoned before...

Change-Id: I8d961d748918bfa8ea6adb5ad60491af4d739d6e
2019-09-20 03:07:29 -05:00
William Wilgus
8b7ae89b43 Playlist rework
consolidate some of the playlist create functions
remove extensions from playlist naming (you can still add it if you desire)
switch to strlcpy, strlcpy functions

Change-Id: Ibd62912da4d1f68ed5366baa887d92d4c6b1f933
2019-08-18 10:18:31 -05:00
William Wilgus
fd19a2caa2 Playlist Fix failure to append default file name
FS#12992 - Can't create playlist with all tracks on device (regression)
references this issue

empty_playlist() only sets filename[0] = '\0'
the code was checking filename[1]..
bug ensued

strip extra leading '/' from default path

Change-Id: Ibd8973666ee45583b9e11e3ba317c0e247f085c1
2019-08-17 06:34:52 -05:00
Solomon Peachy
0544d974f9 Fix rockbox info screen on non-MULTIVOLUME targets
Regression introduced in c3a775c05b

Change-Id: Idd069d6325e3403b4de445856184758d3f8230a5
2019-08-05 21:15:40 -04:00
Solomon Peachy
e73ef014cd Correct speech feedback for volume limit setting
Patch by Igor Poretsky

Change-Id: I514785b22701395ea1505cde2606ea59898ea6df
2019-08-03 23:24:10 +02:00
Solomon Peachy
c3a775c05b Make info screen properly multi-volume aware.
It will now display a line for every volume that's backed by a real drive.

Change-Id: I8fec9018729fc1b0d4f4322cd4421ce7fa945e75
2019-08-01 15:17:40 +02:00
Solomon Peachy
c2139db6c5 Ninety-nine bugs on the wall, Fix one bug, pass it around, 101 bugs on the wall..
Properly fixes bug introduced in 4beafe1 (and incorrectly fixed in 51fe1b6)

Change-Id: I053bb110746afdc3d9588b1b502a4cb333468a2b
2019-07-28 10:07:27 -04:00
Solomon Peachy
51fe1b6705 volume_ismounted is gated by HAVE_DIRCACHE rather than HAVE_MULTIVOLUME
Should fix the various sim builds.

Change-Id: I1dc5e8228698afb32c84ada2aa916e52e19f49d7
2019-07-28 15:27:04 +02:00