Commit graph

36546 commits

Author SHA1 Message Date
Aidan MacDonald
a980d5f869 x1000: Enable support for INIT_ATTR
Enable INIT_ATTR support in config.h. Load init code to the
codec buffer, following the convention used by other targets
that support INIT_ATTR.

Change-Id: I8935fbaa100f0013bb328d71c4a49ec2ffafd003
2022-12-31 08:10:41 -05:00
William Wilgus
ea7b80dab0 keyremap allow remaps to work when player is locked
keyremap doesn't have a notion of locked contexts
add CONTEXT_LOCKED after keyremap so users don't have to specify
multiple context flags to get Advanced keylock working with keyremaps

Change-Id: I17b3f5b2ac9bf23277543fb04d66d6d90d16557f
2022-12-31 07:21:53 -05:00
William Wilgus
855540e1f5 [BugFix] keyremap browse missing root, entry count off by 1
browse_context was missing its root causing a NULL deref

Export User Keys was looking for at least 4 entries when it only needed 3

Change-Id: If92ecccb36bd54e1b850ac2a969fe262b5d7fd14
2022-12-31 07:04:18 -05:00
Christian Soffke
1773e56447 tagtree: Discard item history when selection changes in both directions
A changed selection only caused the item
history for deeper levels to be discarded
in tagtree_enter, when you were descending,
but not in tagtree_exit when you were ascending
the menu hierarchy again.

Change-Id: Ia40fa47980a05c2569e8af04e928b06130aa1f33
2022-12-30 21:57:55 -05:00
roman.artiukhin
178560f495 Treat cue file as folder for next/prev folder action
Do not get stuck if it's the only cue file in folder

Change-Id: Ibb1a406ff030f945e4234fbd1ece747d1e5a0c44
2022-12-30 19:56:44 -05:00
Christian Soffke
b321a719d3 option_select & time_menu : Fix unbalanced push/pop activity
Change-Id: Icabbabb16b2f173168a441af474ee8403b908dd4
2022-12-30 10:35:50 -05:00
William Wilgus
e180e45e01 events.c clean-up
check for invalid userdata by assigning the address of 'invalid_userdata'
this cleans up the functions a bit and removes some extra conditionals

Change-Id: Ic5e13147796e629010a1436eb60042f6550a959c
2022-12-30 07:23:29 -05:00
Christian Soffke
d59e135b04 plugins: Xobox: Fix highscore table on 2bit grayscale displays
After finishing a game of Xobox, background and
foreground were both the same color, making the
high score table invisible..

Change-Id: Iab4bad0e7d3f247a4b600ff9ec8e57207bc3832f
2022-12-29 11:26:57 +01:00
Christian Soffke
66bed14f17 plugins: SpaceRocks: iPod keymap, use Menu button for Menu
Missing from faa2cb9

- Thrust is now Right instead of Menu
- Teleport is Left instead of Play/Pause
- Pause is Play/Pause

Change-Id: Idd9758a68250bcfb2adec14589dffbe1a091511c
2022-12-29 08:10:01 +01:00
Christian Soffke
faa2cb9942 plugins: Improve usability of iPod keymaps
- Reduce need to press multiple buttons at
the same time to quit a plugin

- Have "Menu" be default way to quit plugins or
to access plugin menu

- Fall back to (Long) "Select" or Long "Menu"
in cases where Menu button isn't available
(e.g. in ImageViewer and many games)

out of scope:
boomshine, lua_scripts, Rockpaint,
Doom, Duke3D, Pacbox, Quake,
Sgt-Puzzles, Wolf3D, XWorld,
Minesweeper, Pixel Painter, Spacerocks

Change-Id: I6d4dc7174695fe4b8ee9cbaccb21bdbfe6af5c48
2022-12-29 04:39:22 +01:00
Christian Soffke
52f59f637d plugins: VU Meter: Ignore backlight timeout
Change-Id: Ic61cbd61dab18afe951b00a84b9ebeb15a8ee5f0
2022-12-27 09:43:34 -05:00
Aidan MacDonald
5f2ca6718d Revert "buflib.c strip path from alloc name"
The font code expects the full path to be stored in the
buflib alloc so this breaks eg. saving the glyph cache.

This reverts commit 2b4a4070c9.

Change-Id: I53844c39b34b14f7c8e5999825c1d012fa3f74dc
2022-12-23 19:59:06 +00:00
Aidan MacDonald
ba010851fa Remove lib/x1000-installer
Carrying this library is somewhat of a maintenance burden because
some Rockbox APIs are mocked or duplicated in the test suite and
thus need to be fixed up when refactoring.

It's also unused & incomplete, so there's no good reason to keep
it in tree any more.

Change-Id: If39c62744b4edc0d81b1b6608ee5df69430e6581
2022-12-23 19:54:18 +00:00
Aidan MacDonald
6e794c9a2d rbcodec dsp: Refactor DSP init routines, restore INIT_ATTR
Refactor DSP init routines so there is a dedicated init function
for the stages that need it. Remove the DSP_INIT configure message.
This allows the init code to be safely marked INIT_ATTR, saving a
bit of code size, and allowing the linker to verify that there are
no unsafe references to the init routines.

Change-Id: I1702f0f579bbb300a6fe7d0e67b13aa2e9dd7f8a
2022-12-23 12:47:10 -05:00
Aidan MacDonald
34a092a997 rbcodec dsp: Replace enum dsp_ids arguments with unsigned int
Because casting to and from "enum dsp_id" just adds noise,
change everything to unsigned int.

Change-Id: I52a7ae55f406e673d5b811b29657fcdc4b62ab10
2022-12-22 18:00:37 -05:00
Aidan MacDonald
b96b7640de rbcodec dsp: Move dsp_sample_io_configure() to its own file
Makes dsp_sample_input.c a bit less messy, and dependencies
are more explicit. There's possibly a minor loss of inlining
but it isn't a big deal.

Change-Id: I30f923a0ca758f2b113d32852d1f65586dff0cd1
2022-12-22 17:20:14 -05:00
Solomon Peachy
646d5f92ef ata: Prevent powering-off ATA hardwre if it reports as mSATA or m.2
As those form factors are typically not runtime removable and as such
expect to always being powered up.

This is an experimental change, and we might revert it if it doens't help

Change-Id: I61187f297866f64589a546352828a0ff8169fa30
2022-12-20 20:38:43 -05:00
William Wilgus
1387d6480e [Fix Red] consolidate bmp_read function between icons and skin_parser
Change-Id: I642ec2272ac94233127d8670f6adee938e53bce0
2022-12-20 19:32:32 -05:00
William Wilgus
88f6628423 consolidate bmp_read function between icons and skin_parser
uses fd now rather than opening file twice

Change-Id: If35418cbc77adacf5e96fb6aa0fc8ffef2fffcbd
2022-12-20 19:07:46 -05:00
William Wilgus
2b4a4070c9 buflib.c strip path from alloc name
Change-Id: I6a0f1cc9037fcbe0245d94b4c77ba4ec08378434
2022-12-20 18:10:44 -05:00
William Wilgus
18ec1a2aa6 [Bug Fix] Credits Plugin don't set the back/foreground on greyscale displays
Change-Id: I2e5a37111dd055932b84962b70ff6c3eace945c7
2022-12-20 02:40:14 -05:00
Solomon Peachy
83bb89d0b8 jx47xx: Rename crt0 'init' sections to 'startup'
Mirrors the change made to the x1000 target

Change-Id: I69663245b1d05c001500240af33164f222e70e90
2022-12-19 23:09:54 -05:00
William Wilgus
1930ca8d66 remove rockboxlogo after boot INIT_ATTR
nets about 5k on clipzip  (less on mono, more on others)
to move rockboxlogo to .initdata section

Remove show_logo completely and move to main.c
remove plugin stub
give credits plugin its own copy
credit fallback is now show_info()

Change-Id: Id9ed787e605ed29e7ab1e7a74d3821cd0f840ed4
2022-12-19 18:59:59 -05:00
William Wilgus
f37ebe5ed2 [BugFix] root redirect failed to match the peoper drive when internal drive is missing
HAVE_MULTIVOLUME is a subset of HAVE_MULTIDRIVE
in normal circumstances they are interchangable
but when the internal drive is not found the assumption falls apart

at the moment most of the bootloader are less selective about what drives/volumes
they will mount therefore the volume might not match between what the bootloader
returns for multiboot and what the firmware sees

updating bootloaders will fix this but it should probably be made more robust
at the same time

Change-Id: I93acd4a539894f093211b74b030df3b2c6a0aa11
2022-12-18 23:32:13 -05:00
Aidan MacDonald
992455dc58 Fix red in 8165a6c245
Change-Id: I939b40492902525c911c063c66b28529b7d0842f
2022-12-18 23:55:36 +00:00
Aidan MacDonald
8165a6c245 rbcodec dsp: Remove INIT_ATTR from the DSP library
All of these are technically unsafe cross-section references but
most aren't reported by the linker, probably due to inlining. In
practice there was no problem because the affected code was only
run at init time anyway.

For now, remove INIT_ATTR until the init code can be refactored
to avoid the problematic references. This should also save code
size by moving more code to the init section.

dsp_init() gets to keep its attribute because it's already OK.

Change-Id: Idc9ac0e02cb07f31d186686e0382275c02a85dbb
2022-12-18 22:23:52 +00:00
Aidan MacDonald
b650e774a1 kernel: Fix unsafe cross-section reference in init_tick()
This is a small wrapper function which calls other init code
and is only called from init code; mark it INIT_ATTR to fix
the unsafe reference.

Change-Id: I5525461e9fd63955c6396d3151d209c457b3d798
2022-12-18 22:23:52 +00:00
Aidan MacDonald
e8ad52be94 x1000: Rename crt0 .init sections to .startup
Avoid startup code clashing with the .init section, which is
by convention used for INIT_ATTR code that can be discarded
after app initialization.

Change-Id: Id59b7618ef41e65c33fc0f133644e07555a913eb
2022-12-18 22:14:22 +00:00
Aidan MacDonald
68af18a56f x1000: Simplify app linker script
Get the linker to automatically assign load addresses for
the .iram and .tcsm sections. Taken from the i.MX31 linker
script.

Change-Id: Ic03d577d8690c777726daf373a3289316639bfb9
2022-12-18 22:14:22 +00:00
Aidan MacDonald
d6744c92b1 x1000: Add missing LCD activation event on LCD enable
This event is needed to trigger a GUI redraw when the backlight
turns on.

Change-Id: Ib2300dfd1aaeacd84c6df8151072292409357212
2022-12-18 21:01:04 +00:00
Aidan MacDonald
6c52fa139c Remove browse_context_init()
Prefer to use designated initializers to avoid having to specify
unneeded parameters. Non-initialized members are zero-initialized
by the compiler.

Change-Id: Ia6a03c45cb3ef0b30f458d7d0ae1604a350c737c
2022-12-17 13:36:38 +00:00
Aidan MacDonald
701e262d3d settings: Remove setting ID return from find_setting()
Now that all users have replaced setting IDs with direct pointers,
find_setting() and friends don't need to return an ID value.

Change-Id: I8c5c31bb68d3bca5350d43538335265a55fd5517
2022-12-17 13:36:38 +00:00
Aidan MacDonald
767ddef550 quickscreen: Settings ID to pointer conversion
Saves a good deal of code...

Change-Id: Ibaf4138ddffd5d8f7cca560cc52645dbce44149c
2022-12-17 13:36:38 +00:00
William Wilgus
c85a4f1fa4 menus remove reserved 'param' parameter
-- missed the plugin menu --

Change-Id: Iac2c9b0b8212ab5f3ac2ef90e1ac2723d212f86c
2022-12-17 04:24:37 -05:00
William Wilgus
ccf1aaa5be menus move functions with parameters to their own type
left the union with function(void) and function_w_param(param)
as a few areas might still need to use both (onplay.c)

there might be a few I missed yet..

Change-Id: I593a6875301923e19ba04ad1b0f3173dc9ebdf1f
2022-12-17 02:51:43 -05:00
William Wilgus
6f54bb63fc open_plugin.c access open_plugin_entry through a function
just a few updates to open_plugin save a bit of space by granting access through a getter function

Change-Id: I2c0eaa1ade867510798b213006064ee1c00aa016
2022-12-16 09:05:06 -05:00
William Wilgus
626be18da0 [Bug Fix] haas surround use delay_ms instead of index surround_strength
this appears to be an old bug

rather than using an index use delay_ms directly

Change-Id: Ia4d0bf8eb8030d6ded08354abc31cc7ddefdda99
2022-12-16 08:30:54 -05:00
William Wilgus
5903cd4bc8 [Bug Fix] setting.c fail to check F_TABLE_SETTING w/o arbitrary values
table settings have a list of valid values when
they do not have F_ALLOW_ARBITRARY_VALS flag

they were not being treated as such

Change-Id: Ib02643a65ee4fc2abb1be8563a1849076de2f708
2022-12-16 08:30:54 -05:00
Christian Soffke
222ff0cb14 Plugin return: only skip SBS refresh if WPS was previous activity
1) the plugin return value isn't necessarily respected.
2) the screen will be updated regardless, before
the WPS is displayed, which means the skin may
appear in an "incorrect" state for a moment.

It is therefore better to simplify this to a single
condition.

Change-Id: I723e6fe4862172075b9a4814080f612c2b2fb490
2022-12-16 13:04:56 +01:00
Christian Soffke
a6bafe51a6 WPS hotkeys: Don't enable SBS for pitch screen or bookmarking
Change-Id: I5d5f4f1c402500abd15fcbb8b62013c97f4f931c
2022-12-16 08:25:20 +01:00
Christian Soffke
79e6139f56 Playlist Viewer: Fix delayed appearance of backdrop on return from plugin
Change-Id: I84ff9b581d185fecbe3c7405d3e1887715d55d17
2022-12-16 02:05:33 -05:00
William Wilgus
28f768cb84 onplay hotkey add flags
idea here as discussed with chris_s is to allow flags
in the hotkey_assignment struct to change how items are displayed

Change-Id: Id4cf1d79fbe3ff8f5590b9a863fccf00ddd457f9
2022-12-16 01:44:05 -05:00
William Wilgus
31759c9e53 [Bug Fix] quickscreen clashed with WPS Hotkey browser
chris_s noted:
When you set the WPS hotkey as a QuickScreen item and shuffle through the options,
it eventually gets to the "Open Plugin" option and will show the File Browser,
clashing with the Viewports of the QuickScreen

Change-Id: I3addbbbac5842f89c000c155484d7cb934dc500e
2022-12-14 23:45:58 -05:00
William Wilgus
99839960a2 abrepeat add dummy functions and remove some of the ifdefs
Change-Id: Icae7e334e87bb1974712a7a76296cf69bbdbffba
2022-12-14 23:37:14 -05:00
William Wilgus
6b87bfadff wps.c cleanup gui_show_wps
remove some old cruft move a few things around clean-up flow

Change-Id: I138c6cd9e2d58ef526eb686333da413819df725d
2022-12-14 22:35:33 -05:00
William Wilgus
eaf717744d [Bug Fix] open_plugin.c update checksum check for spinning disks
Lang_id keys take LANG_LAST_INDEX_IN_ARRAY for the checksum
spinning disks did not have the code to do so

Change-Id: I617e1a5462d8d6c4830a9b59171bdd7167d5e7a1
2022-12-13 23:37:26 -05:00
William Wilgus
c6c1d62489 [Bug Fix] filetypes.c move voice data out of INIT_ATTR
tree_get_filetype_voiceclip is called after init it shouldn't be marked as INIT_ATTR

add _init to the functions & data that are used at init only to be a bit more clear

Change-Id: I8eb1914560b782c2c0fdd7649e761f94e382d5cb
2022-12-13 22:35:24 -05:00
Christian Soffke
8ff2c81bde Improve transition between plugin and WPS
Eliminate flashing when plugins are launched
from WPS, by not enabling the SBS, and by
deferring other lcd updates.

Also prevents flashing root menu activity when
returning from plugins.

Change-Id: I7d761867027f2275c4ab8e16ada3107c7ba0be6e
2022-12-13 21:10:16 -05:00
Christian Soffke
0e2e9df991 Plugins: Eliminate 'Loading' splash unless disk is inactive
My impression is that the waiting time for plugins
is only ever significant if a disk needs to spin up.

In other cases, the experience seems nicer
without a 'Loading' splash, especially for
often-used plugins, such as 'Properties',
when it is launched from the Database or
from the File Browser.

Change-Id: I018ccb13466fa618ef089b6dc7714db38cffd9b6
2022-12-13 20:52:09 -05:00
roman.artiukhin
d520dcbfbb Exit Pitchscreen on BUTTON_HOME for Sansa Clip
ToggleMode is remapped to BUTTON_SELECT
Reset is remapped to Long BUTTON_HOME or Long BUTTON_SELECT (avoids accidental reset by pressing BUTTON_SELECT)

Change-Id: I6fc4050c66db2d7db7ec899f9c83b70754fef9df
2022-12-13 20:24:37 -05:00