Commit graph

16508 commits

Author SHA1 Message Date
William Wilgus
c04a944c98 lib/argparse scale decimals to int for return to user
scales the fractional portion of the parsed number
by ARGPARSE_FRAC_DEC_MULTIPLIER

   Example ARGPARSE_FRAC_DEC_MULTIPLIER = 10 000
   meaning .0009 returns 9   , 9    / 10000 = .0009
           .009  returns 90
           .099  returns 990
           .09   returns 900
           .9    returns 9000
           .9999 returns 9999

Change-Id: I38573dbc1877760b0d52df8686a6647894d76196
2021-08-31 21:05:36 +00:00
Dana Conrad
d929444a41 iPod: Fix Yes/No Keymap
Add fallback to CONTEXT_STD and add explicit Play button cancel -
Play button is not present in standard context, so it won't do
anything if unknown actions are ignored.

tested on ipod simulator

Change-Id: Ic259fa97b6195ebbc66fcfae31265cc7aeefa421
2021-08-31 18:59:42 +00:00
Aidan MacDonald
c11ed99cb4 bugfix: redraw yes/no screen after a full skin update
This fixes a bug reported on IRC:

1. Set 'bookmark on stop' to 'ask'
2. Play a track from the file browser
3. Stop playback, yes/no screen briefly flashes then disappears.

The screen still handles input correctly but the prompt will not
be displayed on the LCD. Long story short, get_action() can cause
the skin engine to do a full redraw which cleared the screen and
erased the prompt.

There is a special event, GUI_EVENT_NEED_UI_UPDATE, which the list
code uses to avoid precisely this problem.

Hooking up a handler for this event and redrawing the yes/no prompt
fixes the bug.

Change-Id: If3c26655540c13b488b3a11bd46e1d60d4111469
2021-08-29 21:15:34 +01: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
William Wilgus
965572705b plugin lib/arg_helper parse 'command line' args
add a helper function to allow plugins to parse the parameter string
passed into plugins
support included for bool, char, string and numbers+decimals

Change-Id: I39f35c8bd3c21b83097a538c19f46d362c468fa4
2021-08-27 05:19:28 +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
William Wilgus
987d195134 Plugin Api add core bitmaps Fix Yellow
Change-Id: I4cded8733f8ae4d26b013a944ee5e884ed1363d9
2021-08-26 09:37:31 -04:00
William Wilgus
b56372bbcb Plugin Api add core bitmaps
share all the core icons with plugins
these are all small mono icons like usb plug icon or
play, fast forward, rewind icons

--include the icon_helper function

Change-Id: I385028815a4dd368515f491a9e19dee3d500252d
2021-08-26 12:55:34 +00:00
Aidan MacDonald
cbf1970b56 Shanling Q1: minor update to keymap
- Enable repeat for prev/next keys
- Provide a way to access the context menu using buttons
- Update the manual

Change-Id: I53a7474cc64f915851175aea0695229c581fd8a6
2021-08-25 23:28:59 +01:00
Aidan MacDonald
d1653bc4d8 touchscreen: fix smooth scrolling in lists
This fixes those annoying jumps that happen when you hit the end of
a list while scrolling.

Change-Id: I2e41111f9415dce1692b52a2600e7ce77c8f0291
2021-08-22 14:57:54 +00:00
Aidan MacDonald
569b165cff touchscreen: handle scrollbar properly when UI viewport is used
Change-Id: I3b55233f4d50f5b8ae38f9f337ebdee6f93ad44e
2021-08-22 14:45:26 +00:00
Aidan MacDonald
a59a629514 filetypes: handle missing or empty viewers.config
We want to load builtin filetypes and other config files even if
there is a problem loading viewers.config. A lot of menus expect
the builtin types to be there and don't work if they're missing.

Change-Id: Ie39c8b9ef184fe0d638bacbe18e5f2d22900bd81
2021-08-22 15:24:51 +01:00
Ulrich Hecht
c302c157d5 peakmeter: re-enable on hosted platforms
Has been disabled since HW codec support was dropped, but works fine. Tested
on Surfans F20.

Change-Id: I97f06a009048e8135ca21118467c491e7077fa4f
2021-08-19 18:09:48 +00:00
William Wilgus
0679faf65d lib/helper add talk_val()
talk_value_decimal() replaced talk_value()

Change-Id: Ibb7c738d6f3b399fab2e771d8ab85967e3af96d1
2021-08-18 21:30:13 -04:00
William Wilgus
24e8fa317e plugins trade talk_value for talk_value_decimal
talk_value is just talk_value_decimal with 0 decimals

lets add the extended function instead

static inline int talk_val(long n, int unit, bool enqueue)
{
    #define NODECIMALS 0
    return rb->talk_value_decimal(n, unit, NODECIMALS, enqueue);
}

Change-Id: Iaba3d2f95785f2e1855e294ccf099a977bb6cb20
2021-08-19 01:17:29 +00:00
William Wilgus
3e37013218 misc.c strip_extension() cleanup
optimize +
add some error checking of inputO

Change-Id: I88c476f5fa66847adc0b361df1a0dd4818dbfdc6
2021-08-17 08:28:23 -04:00
Aidan MacDonald
5a4cc8da3f Drop HAVE_RTC_RAM
Only Archos players ever used this feature and it isn't implemented
on any current targets.

Change-Id: I39c8455480a3fe33cd25b667e8d4d6ff3a092d3e
2021-08-15 20:41:58 +01:00
William Wilgus
eafdba87f8 icon.c bug fix handle read errors
read errors are negative buf_sz was a unsignbed int

Change-Id: I45ba67e09ce54ff09411248340ba2c9c62c57583
2021-08-15 11:27:30 +00:00
William Wilgus
2ce7c716c3 apps/open_plugins cast menu id to (void*)
Change-Id: I14ece34e5ad0ffe00bbb4f7de37b1dadad3b92b4
2021-08-14 23:27:44 +00:00
Solomon Peachy
04fe77a465 Remove the (very) incomplete port for the Tatung TPJ-1102
It was barely even a stub, and hasn't seen any development since 2009

Change-Id: I0aa15d9a7b90ae8c771924d9f401380d4cc0fab9
2021-08-14 16:29:39 -04:00
Aidan MacDonald
786d06742a Remove Samsung YP-Z5 port
It has only a couple GB of onboard flash storage with no storage
driver in Rockbox. It hasn't seen any meaningful development since
its initial commit, it's not on the build farm, and the bootloader
build is broken by other refactoring.

Change-Id: Idd9e3c46fac9b96f416ce444182f97a50770e747
2021-08-14 14:13:54 +01:00
Aidan MacDonald
62260aa705 touchscreen: Fix softlock handling
Expands upon c067b344e8. The bug mentioned in that commit affects
touchscreens as well as touchpads, plus touchscreens were subject
to a few other issues because 'last->tick' was not always set.

Change-Id: I27eaa045ebf09555259fddbdf3a79828a55ae31f
2021-08-14 09:42:04 +00:00
William Wilgus
8c36d8b131 lua Fix a few potential bugs
Change-Id: I0293371c58f1ca2d148b3b1e1f780cf76f312ef9
2021-08-13 22:44:45 -04:00
William Wilgus
aad15d5cd7 code cleanup encase ;; in brackets {;;}
Change-Id: I253e19695709b4184ceb4a0748300f7c68437c1c
2021-08-13 11:51:21 +00:00
William Wilgus
da97524252 lua strftime fix out of scope buffer
sbuf goes out of scope of the case statement

Change-Id: Ice0553b496bfbfa5bc243dddf5bad90f3baaba51
2021-08-13 07:28:39 -04:00
William Wilgus
d8bec3da63 enc_config.c don't overrun mp3_enc_bitr[] array
Change-Id: I1e2acceb707d85481eace3203b1d3d3ec8beb7d1
2021-08-11 11:00:03 -04:00
William Wilgus
1dd531ff03 codec_thread.c don't overrun audio_formats[] array
Change-Id: I58941cea061f41478d7677beb9ff42e28b2455a6
2021-08-11 10:56:14 -04:00
Aidan MacDonald
cdd1f90131 touchscreen: Respect list item selection size
Some lists have tall items that span more than one line of text,
eg. the bookmark menu or ID3 tag menu. The touchscreen code didn't
handle these menus correctly and touching on the lower part of a
list item could select "between" two items, leading to incorrect
rendering and behavior due to callers relying on the selected item
being properly aligned to the selection size. Fix this by ensuring
the touch code only generates properly aligned selections.

Change-Id: I73945bb0947590517a005754bd447639e22812e2
2021-08-10 23:33:00 +01:00
Aidan MacDonald
b103b07503 touchscreen: Fix annoying bug when switching touchscreen modes
Changing the touchscreen mode in the settings menu required a reboot
to fully apply because this code was trying to reapply old settings.
This is a hack. IMHO to fix it properly the behavior of touchscreen
mode needs to be changed so code that needs a specific mode doesn't
need to twiddle global state, but that's a bigger undertaking.

Change-Id: I55a46dbed721273ad78cb9df81fe60940665962b
2021-08-10 22:48:26 +01:00
Aidan MacDonald
69420e796c touchscreen: Use pointing mode in the yes/no screen
Seems to fix the unintuitive / inaccurate behavior of this screen.
Rejigger the generic touchscreen keymap because the 3x3 buttons are
no longer used. Also map physical keys for yes/no on the Q1.

Change-Id: I2ed633896b87030fa654d47d9d02929b849495da
2021-08-10 22:48:26 +01:00
Aidan MacDonald
a8063054f9 skin engine: handle bitmap read errors appropriately
Change-Id: Ifab0e607cb71afbe26b9e508fe1db3a8730bad4b
2021-08-10 21:47:04 +00:00
William Wilgus
614b189f7a lua rockaux.c filetol fix invalid conditional
Change-Id: Id31d3d8b571540394373a61ed213380c95a0eee2
2021-08-10 15:00:42 -04:00
William Wilgus
ee6b737b65 pcm_record.c iAudioM5 FixRed
Share a bit of code in order to free up iRam for the iAudio M5

Change-Id: Ief05d2614a203df17821ed32b04f5c75a53ca08b
2021-08-10 07:56:33 -04:00
William Wilgus
4fb5aeb096 recorder/pcm_record.c cleanup copy function
re: coverity
write_write_order: In long(*s++) + *s++,
s is written in *s++ and written in long(*s++)
but the order in which the side effects take place is undefined because
there is no intervening sequence point.

Change-Id: I2911c240f3e85fcfbf77297e8579e02e217c5af5
2021-08-10 11:22:13 +00:00
Solomon Peachy
2f0fd66e44 re-synchronize english-us "translation"
Change-Id: I21035cda0617e74283e4b30557783d297d8dfcd0
2021-08-09 22:18:43 +00:00
Aidan MacDonald
5311ff0173 tagcache: Don't treat tag_virt_basename as a numeric tag
Change-Id: I88fe17466b606a1f60a4c823214edd9766deb260
2021-08-07 16:03:21 +00:00
Aidan MacDonald
cf3fa437fc Remove unhelpful unsigned casting trick
Change-Id: Ice86f060974c51bbaf051ed8c5a369ce80ecfe15
2021-08-07 15:52:18 +00:00
Aidan MacDonald
eeb0aaf36f fiiom3k: Add bookmark screen keymapping
Forgot to commit this back around the time I did the manual

Change-Id: I8fafeec5105b4bee3380779f4cc86d3e73459cf2
2021-08-07 15:04:23 +00:00
Aidan MacDonald
2008b7d1b0 Fix yellow from d541a72a
Change-Id: I9c539035544d285da1941d2c1954cf2aa4d00087
2021-08-06 19:59:33 +01:00
Aidan MacDonald
257ba1d2e0 Fix possible negative fd in playlist.c
Change-Id: I59d88609ec3f20ec9f482a777396cd72be23a35b
2021-08-06 19:38:06 +01:00
Aidan MacDonald
02b940396b Be sure to wipe id3 tag after failed parse in playback.c
Change-Id: I000c78e913ab80afa9b82cae937afb5255831b79
2021-08-06 18:34:04 +00:00
Aidan MacDonald
d541a72a0e Bugfixes in eq_menu.c
Change-Id: Ibf754554f685d13ac00a49694fcecee459ff838f
2021-08-06 18:23:57 +00:00
Solomon Peachy
a20755e9ef test_disk: Minor fix in an error path
...Log the variable containing the actual error

Change-Id: If22e6b684f2e213bc45c8ca95295936ba8e09895
2021-08-05 14:22:53 +00:00
Solomon Peachy
566d836ac6 mikmod: Uninitialized variable used in a control flow decision
Change-Id: I6df903399361f1df7ca0f766fff4062a984e2ba8
2021-08-05 13:44:33 +00:00
William Wilgus
d57900ae12 misc.c format_sound_value guard division by zero
Change-Id: I7085cb34d2258aa5fc7e04fc0e73d6f733810038
2021-08-05 11:00:47 +00:00
Aidan MacDonald
03a6eb63f1 Simplify clamp_component
Surprise surprise: the compiler generates shorter, branch-free code
if we don't try to be clever with signed/unsigned casting tricks.

Change-Id: I93d2020b6127e7d43feee394b06a52aaeddf3b79
2021-08-05 10:26:50 +00:00
Aidan MacDonald
429a7e2c0a Avoid buffer overflow when generating bookmark file name
Change-Id: I14f3d83a8089d33f4e900a1d5f965e67082a07ea
2021-08-04 19:04:48 +00:00
Aidan MacDonald
bdd9c8dfc8 plugins: Fix issues in 2048
One of these was an unintentional fallthrough -- if you said no to
'quit without saving' it would save and quit.

Change-Id: I33828b58962a05adab65ac5f71dd0e2b1e07001b
2021-08-04 19:04:37 +00:00
Aidan MacDonald
005c414e5f Document intentional fallthroughs + fix harmless unintended ones
Change-Id: I1ca5b1027ec30cbf61093bab35b980196ed14e6b
2021-08-04 18:59:46 +00:00
Solomon Peachy
c522917644 plugins/resistor: Fix incorrect check for a valid 4th band value
Change-Id: I499bcd6d2d6fd5dd92c184cc1ec014e62f0441fa
2021-08-04 14:56:20 +00:00