summaryrefslogtreecommitdiff
path: root/apps (follow)
Commit message (Collapse)AuthorAge
...
* Fix dangerous castsAmaury Pouly2017-02-04
| | | | | | | | | On Windows 64-bit, the size of long is 32-bit, thus any pointer to long cast is not valid. In any case, one should use intptr_t and ptrdiff_t when casting to integers. This commit attempts to fix all instances reported by GCC. When relevant, I replaced code by the macros PTR_ADD, ALIGN_UP from system.h Change-Id: I2273b0e8465d3c4689824717ed5afa5ed238a2dc
* Implement speaker enable/disable on jack (un)plugAmaury Pouly2017-02-04
| | | | | | | | | | | | | | | | | | | | | The implementation is not very complicated but there are a few things worth noting. There was a previous "speaker enable" setting but it was a boolean. I decided to replace it with a choice setting that has 2 options (on, off) if headphones cannot be detect on this target, or 3 options (on, off, auto) if we can detect headphones. This will break the old setting on target that cannot detect jack but it makes the code more uniform and avoid maintaining two settings with more #ifdef. The third option (auto) uses the LANG_AUTO text, which I think is clear enough (disable speaker on jack plug). In order to avoid code duplication (both in apps and firmware), I decided to keep the audiohw_enable_speaker function as-is: it takes a boolean and doesn't care about the speaker policy. I introduced a new audio_enable_speaker that takes directly the mode (which follows the setting encoding): 0=off, 1=on and 2=auto. This way one calls audio_enable_speaker and it changes the speaker once to reflect the request mode. The apps code then uses this function in the places where it makes sense: on setting load, setting change and jack (un)plug event. Change-Id: I027873f698eb4bc365d7c02b515297806355d9e2
* Fix for Chessbox bug FS#10363William Wilgus2017-02-01
| | | | | | | | | | | | | | | | Chessbox was overflowing GameList[240] causing the board to flip + crash GameCnt changed to unsigned char which allows the array to roll over to 0 after 255 define MAX_GAME_CNT 256 and GameList[MAX_GAME_CNT] along with 1 byte GameCnt should fix this issue dbg save routine left in for now to help identify any other problems Added bounds checking to prevent second bug found when loading .pgn files Change-Id: I2b615c8ecbed4368724412f80ce07346f3cf30a7
* Remove Whitespaces from chessboxWilliam Wilgus2017-01-31
| | | | | | Remove 1616 Whitespaces from chessbox Change-Id: I84c0dbd4a177eba50b9f7427f5695ae4b266aa5e
* AMS: Return ascodec to interrupt-based I2C2 driverMichael Sevakis2017-01-25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 1. Slightly revised and regularized internal interface. Callback is used for read and write to provide completion signal instead of having two mechanisms. 2. Lower overhead for asynchronous or alterate completion callbacks. We now only init what is required by the transfer. A couple unneeded structure members were also nixed. 3. Fixes a bug that would neglect a semaphore wait if pumping the I2C interrupts in a loop when not in thread state or interrupts are masked. 4. Corrects broken initialization order by defining KDEV_INIT, which makes kernel_init() call kernel_device_init() to initialize additional devices _after_ the kernel, threading and synchronization objects are safe to use. 5. Locking set_cpu_frequency has to be done at the highest level in system.c to ensure the boost counter and the frequency are both set in agreement. Reconcile the locking inteface between PP and AMS (the only two currently using locking there) to keep it clean. Now works fine with voltages in GIT HEAD on my Fuze v2, type 0. Previously, everything crashed and died instantly. action.c calling set_cpu_frequency from a tick was part of it. The rest may have been related to 3. and 4. Honestly, I'm not certain! Testing by Mihail Zenkov indicates it solves our problems. This will get the developer builds running again after the kernel assert code push. Change-Id: Ie245994fb3e318dd5ef48e383ce61fdd977224d4
* action.c must desist in calling set_cpu_frequency from a tickMichael Sevakis2017-01-21
| | | | | | | | | | | | | The function is neither reentrant nor ISR callable. Instead of using a ticked-based timeout, have the button driver provide the unboost after a delay when waiting for a button. HAVE_GUI_BOOST gets immediate boost after dequeuing any message, otherwise the queue has to have at least three messages waiting for it to trigger a boost-- essentially the behavior that existed but now combined in one place. Change-Id: I1d924702840f56a1a65abe41fa92b4e753c4e75a
* Selective Backlight Softlock Fix misleading indentation.William Wilgus2017-01-17
| | | | Change-Id: Iffbdd3c5bd8d2d23f4f7e3af42e16ab0c1dc312b
* Selective Backlight/Advanced Softlock - Selective actions based on contextWilliam Wilgus2017-01-17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Selective backlight allows the user to choose actions that will not enable the backlight when pressed. Advanced softlock allows user to choose actions that will not be blocked by screenlock on devices without a hold button. Both only occur in FM and WPS Contexts. Update: Back from the dead -Cleaned up code, removed unnecessary calls, re-arranged last filter action timeout conditional to work in case last_filtered_action_tick was never set -Added entries to the manual -Fixed back button on some menus not activating backlight -Made menus more intuitive, no actions selected now changes menu item to off. -Added talk fuctionality. -Added option to disable selective backlight while on external power. -Rewrote backlight and softlock handling code to fix issue with scrollwheels -Menu changed to have toggle(yes/no) and settings -Optimized selective actions lookup -Added option to disable notification of 'buttons locked' while softlocked -Removed uneeded code, consolidated action lookup to single function -Fixed incorrect name on selective softlock menu -Added option to disable touch on touchscreen devices -Fixed backlight on original screenlock without selective screenlock active -Added text selection in mask_select for when show_icons is off -Fixed voice in mask_select to speak if voice is defined instead of spelling -Added more lang defines (play skip seek) -Added option to disable unknown keys turning on backlight -Fixed Conditional argument In wrong place causing players without backlight to fail to build -Fixed Disable Unknown blocking detection of context change -Fixed canceling menu didn't update new settings -Added Autolock on backlight off -Removed backlight_on_force from backlight.c, Now sets ignore next to false and uses backlight_on -Cleaned up autolock code added strings to lang file -Fixed issue where rapid presses would bypass softlock -Removed old softlock code, Cleaned selective actions code -Changed menu to match existing RB menus -Fixed Backlight_on_Hold blocked by backlight_ignore_next -Fixed ignore_next for ipod -Fixed bug allowing context with softlock to bypass selective backlight -Changed mask_select to no longer prompt for changes to be saved -Changed menu names -Added ignore timeout to allow ipod scroll wheel to work properly and other players to still work properly, removed some previous code including ignore_event -Increased ignore timeout to prevent sd card accesses from interrupting action code and turning on backlight -Changed Unknown action to unmapped action in menu, changed handling code -Removed unneeded logic and variables for handling unfiltered actions -Reverted unmapped action code to previous functionality -Added manual entries (thanks JohnB) -Removed elusive unhandled unicode character from manual, changed formatting slightly Actions: Volume,Play,Seek,Skip Extras: Disable unmapped actions Disable selective backlight on external power Disable touch during softlock on touchscreen devices Disable softlock notifications (power button still notifies) Autolock on backlight off Method: Adds a function to ignore backlight on next call If selected action occurs backlight is forced on, Filter_first_keypress stays intact. Selective softlock allows selected actions through, bypasses the normal softlock routine. ToDo: DONE previous commit (#1) has attribution for folder_select.c which mask_select is based from. Change-Id: I08132ddcfd64c81751ef23b720f3ec6d68695fe4
* Reenable database ramcache and playlist dircacheMichael Sevakis2017-01-17
| | | | | | | | | | | | | | Playlist dircache references should be back in working order. Reenabling dircache references in the database ramcache is not yet done as it requires quite a bit of rework. Otherwise, the database in RAM is functional again. Some buffer compatibility changes have been made for database commit because the dircache buffer can no longer be stolen, only freed by an API call. Change-Id: Ib57c3e98cb23e798d4439e9da7ebd73826e733a4
* puzzles: more accurate sin() and cos()Franklin Wei2017-01-16
| | | | | | - now uses fp_sincos() Change-Id: I20c8224cac98fc677097161737d25dd9038bede2
* puzzles: change default optimization to -O2Franklin Wei2017-01-16
| | | | Change-Id: I606df468f92f8d550827c122a9cfd5248866afdb
* puzzles: fix copyright yearFranklin Wei2017-01-16
| | | | Change-Id: Iaa02e7a1fe4c17be7c4decbd5eb71206469710e9
* puzzles: fix overlay loader (monolithic builds only)Franklin Wei2017-01-16
| | | | Change-Id: I7f27e96036b5d22e946cc72146cd0f5a791deaf7
* puzzles: disable unplayable puzzles (Solo and Loopy)Franklin Wei2017-01-16
| | | | | | - accidentally enabled in c200v2 fix Change-Id: I252191fc47da9fe1a664a260cb53f6a5a1eea437
* Renamed defines UNALIGNED to ROCKBOX_UNALIGNED - UNALIGNED is alreadyMatthias Mohr2017-01-15
| | | | | | | | | | defined in mingw environments. Renamed defines of UNALIGNED to ROCKBOX_UNALIGNED so that they don't conflict with definitions in mingw32 cross-compiling environments (defined in _mingw.h). Change-Id: I369848c0f507e6bf5ff9ab4a60663bbbda6edc52
* fix whitespaceFranklin Wei2017-01-15
| | | | Change-Id: I9b0659c218f92051a4de99ec03b97a2b1d067e29
* puzzles: fix building on c200v2Franklin Wei2017-01-15
| | | | | | - disables Solo and Loopy Change-Id: I3de15c0ad001683a4303950972af2f5988d438d0
* puzzles: antialiased line drawing via Wu's algorithm and optional ↵Franklin Wei2017-01-15
| | | | | | | | | "shortcuts" for undo/redo - line drawing should eventually be moved to xlcd, but for now it's very unportable code - also fixes a minor issue with the configuration screens Change-Id: I897f01b7210cbbec32665c2bc67920c965ea0bec
* Fix compilation of puzzles on WindowsAmaury Pouly2017-01-15
| | | | | | mingw exports vsscanf and that clashes with rbwrappers' definition. Change-Id: I87481ff4e93547059b2e1fa8083bedcf8633343a
* Revert "puzzles: antialiased line drawing and optional "shortcuts" for ↵Franklin Wei2017-01-13
| | | | | | | | undo/redo" This reverts commit 8e4429853d1ac024ac2b8069636cc210cf5bab1b. Change-Id: Id622d58ad4b3b9dd3313811c8a2f83202d21f5ee
* puzzles: fix configuration menu (again!)Franklin Wei2017-01-13
| | | | Change-Id: I440f3cea1bbeb3e7bda4aebefaaece3e8f3d44fd
* puzzles: antialiased line drawing and optional "shortcuts" for undo/redoFranklin Wei2017-01-13
| | | | | | | - line drawing should eventually be moved to xlcd, but for now it's very nonportable code - fixes a minor issue with the configuration screens Change-Id: I897f01b7210cbbec32665c2bc67920c965ea0bec
* puzzles: enable fallback to audiobuf when smalloc() failsFranklin Wei2017-01-13
| | | | | | | | - upon a failed smalloc(), the audio buffer will be used for further allocations - should fix things on low-memory targets (c100 and c200v2), but breaks playback - playback should still be intact on other targets Change-Id: Ic239f1316efadc957050afacf5c614dbbca3f805
* Fix track formatting problems in playlist.cMichael Sevakis2017-01-07
| | | | | | | | | | | | | | | | | | | | | | | | | Some changes in behavior were made with filesystem code commit for the sake of compatibility that changed expected behavior. * Restore substitution of drive spec in fully-qualified DOS paths with the playlists's volume spec (or root on univolume targets). Drive-relative paths of the form "c:foo" (no separator after ':') will be treated as purely relative. * Restore old behavior of preserving leading whitespace in the source path and trimming only trailing tabs and spaces. * Multivolume: Volume substition on fully-qualified UNIX/RB paths has NOT been reintroduced (and perhaps wasn't intended in the first place). They will not be modified because there is no ambiguity to resolve. Doing so would prevent a playlist on external storage from referencing a file on main storage without qualifying it with "/<0>...". * Plain relative paths are and always have been interpreted as relative to the location of the playlist. Change-Id: Ic0800cea79c59563b7bac20f8b08abb5051906c7
* puzzles: add cursor interface to untangleFranklin Wei2017-01-07
| | | | | | | - makes it playable - submitted to upstream Change-Id: Ib672ee374d500a994bc8e78eb01fea529ec5132f
* Midiplay: only boost cpu in sensible code partsSebastian Leonhardt2017-01-06
| | | | Change-Id: I9aaf7f2844e9f90030dbf0a63ebec80db4851e18
* Midi Player: fix premature stopping of audio buffer playbackSebastian Leonhardt2017-01-06
| | | | Change-Id: I3794e8d8837722442b25e2b48db1b5b3c3c2dc51
* Midi Player: fix playback of buffer remains when seekingSebastian Leonhardt2017-01-06
| | | | Change-Id: Iccf4444b9c8ae421b9e44332791a789a767ae411
* Fix red (midi plugin: action rename)Sebastian Leonhardt2017-01-06
| | | | Change-Id: Ie21711cbf98aad1fbfc24924c9281caf39f22af5
* Midi Player: give button actions meaningful namesSebastian Leonhardt2017-01-06
| | | | Change-Id: I53183e024c202f6c35903fc9a74db7e49d4bdc20
* midi: Recalculate (and rename) the note frequency table.Frank Gevaerts2017-01-06
| | | | | | | | | | | | gustable[] contained plain note frequencies in milliHertz, but was named and documented to appear like a table of magic numbers. The values also seemed to be slightly inaccurate (up to about 0.01Hz, so probably irrelevant). This changes the name to freqtable to make the purpose clearer, and uses slightly better values. Change-Id: I6b568d834c8c2c92161bed5290572a29733e28dc
* Fix previous errors for targets with no crossfade.Michael Sevakis2017-01-05
| | | | Change-Id: I1c10f5588f3fe06c7071f3f07b68e3d552c44f05
* Playback: Fix problems with crossfade on short tracks.Michael Sevakis2017-01-05
| | | | | | | | | Addresses issues brought up in this thread: http://forums.rockbox.org/index.php/topic,51605.0.html While we're at it, improve the quality with a sample-level fader. Change-Id: I73dde60d6858a1c9042812e26d490739e3906a1e
* puzzles: fix a minor bug in the configuration screenFranklin Wei2017-01-04
| | | | | | | - when an invalid string setting was entered, the string value would continue to be used after being freed Change-Id: I3a9da016f6f32eac8636b9f55e4e09006bc6059e
* puzzles: minor polishing touches on the user interfaceFranklin Wei2017-01-04
| | | | | | | | - the debug menu has been neatly hidden away in the classic Android style ;) - playback control option added to the pause menu when possible - also fixes a minor redraw issue Change-Id: I00d0186986a8e659991948336b26b4f2e2a0ce66
* puzzles: fix a few thingsFranklin Wei2017-01-04
| | | | | | | | - old acos() function was broken, replaced with a call to atan2(); this fixes "Cube!" - Makefile extended to support building "unfinished games", but not enabled - a backdrop issue fixed in rockbox.c Change-Id: I9393e958d43de32f4ccf18e1cb409f75c2e1ed3c
* puzzles: rename bcopy() to bcopy_wrapper() and make staticFranklin Wei2017-01-03
| | | | | | - fixes a name collision on linux Change-Id: I9f162b5c8a1f319fa6495ff9343fb6007cc20edf
* Fixes and re-sync for puzzlesFranklin Wei2017-01-01
| | | | | | | | - Updates to latest upstream (7cae89fb4b22c305b3fd98b4e1be065ad527a9f7). - Also fixes a bug relating to updating parts of the display. - Adds some docs. Change-Id: Idfcce66e0cf3c59e467bab42eafc161df2e495bb
* work around little bugs in puzzlesFranklin Wei2016-12-18
| | | | Change-Id: I80d72a6bb0189eb842385aa622506d5efe319053
* Add circle drawing/filling to xlcdFranklin Wei2016-12-18
| | | | Change-Id: I5d28ade42145d9d82babcf62c0db7948927cafec
* add missing file to puzzlesFranklin Wei2016-12-18
| | | | Change-Id: I63b80718f48eede54c3312d9e66c77bfd2472a79
* Port of Simon Tatham's Puzzle CollectionFranklin Wei2016-12-18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Original revision: 5123b1bf68777ffa86e651f178046b26a87cf2d9 MIT Licensed. Some games still crash and others are unplayable due to issues with controls. Still need a "real" polygon filling algorithm. Currently builds one plugin per puzzle (about 40 in total, around 100K each on ARM), but can easily be made to build a single monolithic overlay (800K or so on ARM). The following games are at least partially broken for various reasons, and have been disabled on this commit: Cube: failed assertion with "Icosahedron" setting Keen: input issues Mines: weird stuff happens on target Palisade: input issues Solo: input issues, occasional crash on target Towers: input issues Undead: input issues Unequal: input and drawing issues (concave polys) Untangle: input issues Features left to do: - In-game help system - Figure out the weird bugs Change-Id: I7c69b6860ab115f973c8d76799502e9bb3d52368
* Add tentative new element names, IUPAC approval expected around NovemberFranklin Wei2016-12-04
| | | | Change-Id: I40adb1adb27894b15d3bc3a2388bd2059e75636e
* remove debug macroFranklin Wei2016-11-19
| | | | Change-Id: I1bf6ecc5bb5275fd4addd3fdb62a89df441afe81
* XWorld: some fixesFranklin Wei2016-11-19
| | | | | | | | | | | Fixes sound on most platforms, original root cause was bad menu code as well as DMA callbacks taking too long. Worked around with smaller chunk sizes. Permanent fix would include moving mixing out of the callback. Rewrites input with code from rockboy/doom. Cherry-picks a change from Gregory Montoir's `rawgl' to patch the code wheel screen. Finally, adds a motion blur filter on select targets. Change-Id: I8df549c923c5075800c6625c36c8202e53de1d27
* pdbox: fix bug shown by new gcc warningFrank Gevaerts2016-10-12
| | | | Change-Id: Ife308a3090f9bc62f2e98d2d979fdf393c22054d
* Rockboy: revert FS#11745 patchSebastian Leonhardt2016-10-03
| | | | | | | | | | | | | | | | | | | | | | William Shipley sent this patch via mailing list. Original Message: "There was a patch to rockboy in 2010 that fixed a problem where the bottom tile row would be rendered at the top. Here's the relevant issue from that time: http://www.rockbox.org/tracker/11745 Note that Stummi openly admits it was a hack, not a true fix. Sometime in the 6 years since, the root cause was fixed. Currently, rockboy on the Clip+ and other 64px models shows the top of the gb screen along the bottom of the display. I confirmed that reversing this patch fixes the issue on my own Clip+" I don't have any of the mentioned targets, so someone else has to test. Change-Id: Id29b78c4ece0af53ba1280029c18b76808a21da2
* zenxfi3: fix recording keymap and simulator keymapAmaury Pouly2016-09-21
| | | | Change-Id: I246834b5244d4e0f672633d2960db45278e12ec4
* iAP: fix USB storage mount after using an iAP accessoryCástor Muñoz2016-08-26
| | | | Change-Id: Ieb10da5850e9a2fa751142c2cf29447dccec0a17
* Samsung YP-R0: Fix settings keymap (apply FS#13073 by lebellium)Sebastian Leonhardt2016-08-24
| | | | Change-Id: Id251900c510bddb15cdf7fe9a43cf7df46645923