summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2015-01-03Fix up some DEBUGF statementsThomas Jarosch
The last big filesystem code refactoring broke a lot of debug statements. firmware/test/fat/ doesn't build anymore, but that's more or less unrelated. Change-Id: I4c9e1289eeabe1b59d436b176f1d35a02176614f
2015-01-03Multiple variables for 'my' need to be in parenthesisThomas Jarosch
perl -wc reported: Parentheses missing around "my" list at sims.pl line 9. Useless use of a variable in void context at sims.pl line 9. Useless use of a variable in void context at sims.pl line 9. Useless use of a variable in void context at sims.pl line 9. Useless use of a variable in void context at sims.pl line 9. Name "main::doonly" used only once: possible typo at sims.pl line 9. -> now it's happy. Change-Id: I3b3685d6918ddb77e47c58bade931897075c6e04
2015-01-03Don't build sims twiceThomas Jarosch
Some of those builds are already in the 'builds' list. Change-Id: I6985702d50ff00e166463384d78f823f6fad9873
2015-01-03Fix syntax error (missing semicolon)Thomas Jarosch
Reported by TheSeven on IRC. Change-Id: Ie4bb331f9db050a90d99732e46c23f6402c7c320
2015-01-02buflib: Switch from term "cookie" to "metadata"Thomas Jarosch
The documentation of buflib first mentions metadata and then changes to "cookie" without explaining it. Fix it by sticking to metadata. Change-Id: I0b36b18f4f2590132901c10326481975f8b9b9da
2015-01-02Improve core_alloc() / buflib_alloc() documentationThomas Jarosch
Document the fact that buffers are movable by default. Care must be taken to not pass them to functions that yield(). Also clarify other things: - Passing NULL as "ops" to buflib_alloc_ex() causes buffers to be movable by default (but not shrinkable). - If you want shrinkable buffers during compaction, you have to provide a shrink callback. - To disable buffer movement, you have to pass NULL for the move_callback inside the callback structure. - The concept of default callbacks was removed long ago, remove the only reference of it. Change-Id: I3bf0ea6b08b507d80a19f3c2c835aca32b3f7800
2015-01-02Shortcuts: Add move callback for buflib allocationsThomas Jarosch
If we don't provide a callback to buflib_alloc(), the buffer is always movable (to reduce fragmentation). We were passing around buffers to multiple functions that call yield() and might trigger buflib compaction. -> add locking while we are working on the buffers. Also added source code comments that explain why we added the locking in that particular section. Change-Id: Ie32867b0b735ddb2905fd4bd51342f61035f836f
2015-01-01PictureFlow: Add move callback for buflib allocationsThomas Jarosch
If we don't provide a callback to buflib_alloc(), the buffer is always movable (to reduce fragmentation). Since we pass our buffer to functions that call yield(), this could lead to memory corruption on buflib compaction. Change-Id: Id1fad1822479d692551c55cb8bc87cea7b78f759
2015-01-01XWorld: fix some typos in keymaps.hFranklin Wei
Happy New Year! Change-Id: I228e4b9af9561eb70f75ebb57e333c78065873df Reviewed-on: http://gerrit.rockbox.org/1093 Reviewed-by: Thomas Jarosch <tomj@simonv.com> Tested: Thomas Jarosch <tomj@simonv.com>
2015-01-01Limit "struct dircache_runinfo" to file scopeThomas Jarosch
Change-Id: Ib3edef9a4568605a36bdacde174dfa6bca2d26fa
2014-12-30Add missing newline in debug outputThomas Jarosch
Change-Id: Ifd67dbcc80db328391464ec93316c48f914bc590
2014-12-29Document 'union buflib_data'Thomas Jarosch
Change-Id: Ia98fa8e7887338d6c0b7a5795a0ae5c7a13014ba
2014-12-28XWorld: cleanupFranklin Wei
- Comment keymaps.h - Tie XWORLD_DEBUG into ROCKBOX_HAS_LOGF to ease debugging - Fix up the manual a little bit Change-Id: I12cfb58001199036cd67dbaa27f164e6790a199d Reviewed-on: http://gerrit.rockbox.org/1084 Reviewed-by: Michael Giacomelli <giac2000@hotmail.com>
2014-12-27More standard conforming codec_realloc()Thomas Jarosch
- Leave original ptr untouched if allocation fails (bail out early) - Behave like malloc() in case ptr is NULL Change-Id: Ib854ca19bd0e069999b7780d2d9a533ece705add
2014-12-27Two more typo fixesThomas Jarosch
Change-Id: Id3ec7c1da356cb7c617a1d9ad57c9e0ae9fa6611
2014-12-27Fix typos in documentationThomas Jarosch
Change-Id: I3c7e204bcf67bf0004314fe4b2aec98cae145273
2014-12-24Fix for DX50 xworld keymaps.hBenjamin Brown
Change-Id: I6bf564cf009d935ebb1d7fb77ccb2eab8c87d2c7 Reviewed-on: http://gerrit.rockbox.org/1083 Reviewed-by: Amaury Pouly <amaury.pouly@gmail.com>
2014-12-24Fixes more red for xworlds keymapsBenjamin Brown
A temporary fix for keymaps.h, the logic needs rewritten Change-Id: Ic8c81a5f01620ffc409cf6220b2916c0ec428dbe Reviewed-on: http://gerrit.rockbox.org/1082 Reviewed-by: Amaury Pouly <amaury.pouly@gmail.com>
2014-12-24Xworld - Fixes warnings for cowond2, hifimanhm60x, ibassodx50, andBenjamin Brown
ondavx747. Also fixes errors for ondavx777. Change-Id: I1a5daa844759316df4dec7b869425ea9a174814b Reviewed-on: http://gerrit.rockbox.org/1081 Reviewed-by: Marcin Bukat <marcin.bukat@gmail.com>
2014-12-24Fixes xworld keymaps for ondavx747, hifimanhm60x, and cowond2Benjamin Brown
Change-Id: I62d7702d2e6541777f5553e27e166470004cd06d Reviewed-on: http://gerrit.rockbox.org/1080 Reviewed-by: Michael Giacomelli <giac2000@hotmail.com>
2014-12-24fix xworld building with 24-bit lcdFranklin Wei
also fix a couple unused vars Change-Id: Ib05d2e22dd7477bc9bd193232bd3de8a0816beb2 Reviewed-on: http://gerrit.rockbox.org/1079 Reviewed-by: Michael Giacomelli <giac2000@hotmail.com>
2014-12-24Fix compilation error.Michael Giacomelli
Change-Id: Ic565444bf1df955703dfe91adaf3094e8ab9b990
2014-12-23Xworld - Another World interpreter for RockboxFranklin Wei
Co-conspirators: Franklin Wei, Benjamin Brown -------------------------------------------------------------------- This work is based on: - Fabien Sanglard's "Fabother World" based on - Piotr Padkowski's newRaw interpreter which was based on - Gregory Montoir's reverse engineering of - Eric Chahi's assembly code -------------------------------------------------------------------- Progress: * The plugin runs pretty nicely (with sound!) on most color targets * Keymaps for color LCD targets are complete * The manual entry is finished * Grayscale/monochrome support is NOT PLANNED - the game looks horrible in grayscale! :p -------------------------------------------------------------------- Notes: * The original game strings were built-in to the executable, and were copyrighted and could not be used. * This port ships with an alternate set of strings by default, but can load the "official" strings from a file at runtime. -------------------------------------------------------------------- To be done (in descending order of importance): * vertical stride compatibility <30% done> * optimization <10% done> Change-Id: I3155b0d97c2ac470cb8a2040f40d4139ddcebfa5 Reviewed-on: http://gerrit.rockbox.org/1077 Reviewed-by: Michael Giacomelli <giac2000@hotmail.com>
2014-12-22mikmod plugin: Remove bogus doubled return statementThomas Jarosch
Stick to the safer version of those two. Tested mikmod still works with some nice Necros .s3m files. Change-Id: I6774cdf3345a4c89b2f9cf3bb8d832963ca30c38
2014-12-22zxbox: Add missing break; statementThomas Jarosch
No harm done, same values are assigned in the "default" case. cppcheck reported: [rockbox/apps/plugins/zxbox/tapefile.c:674] -> [rockbox/apps/plugins/zxbox/tapefile.c:681]: (warning) Buffer 'seg_desc' is being written before its old content has been used. 'break;' missing? Change-Id: I2bf044db9022c848c304f1ad88c012bd85ee61df
2014-12-22Fix red (pass pointer of 'item')Thomas Jarosch
Change-Id: I2d04251519623b2531948615c35e61203f9a9940
2014-12-22Always initialize "item"Thomas Jarosch
Otherwise item.cfg_name and item.default_val will contain garbage. It doesn't seem to have an effect right now, but who knows what a future refactoring might do. cppcheck reported: [rockbox/apps/settings.c:1268]: (error) Uninitialized variable: item Change-Id: Ic4d0c302929613de8f291cd2d69cd39db8711107
2014-12-21wavrecord plugin: Add harmless sanity checkThomas Jarosch
cppcheck reported: [rockbox/apps/plugins/wavrecord.c:3672]: (error) Array 'sampr[9][2]' index sampr[9][1] out of bounds. Change-Id: Ib1e9c25842aa275b15d8d817018cc523269b1f42
2014-12-20Remove useless assignment of 'len'Thomas Jarosch
The variable 'len' is not used after this statement. Probably a copy'n'paste leftover from the similar looking block above. cppcheck reported: [rockbox/utils/zenutils/source/shared/cenc.cpp:212]: (style) Same expression on both sides of '-'. Change-Id: Ia8357187ed39d3fab10d97df75a1146c4f733790
2014-12-20sb1: fix buggy comparisonAmaury Pouly
cppcheck reported: [rockbox/utils/imxtools/sbtools/sb1.c:440]: (warning) Comparison of a boolean expression with an integer other than 0 or 1. Thanks to Thomas Jarosch Change-Id: I0078232706d4014a1f2acea310a7a0d0edf7788b
2014-12-20mkzenboot: Fix double close of bootfd on errorThomas Jarosch
cppcheck reported: [rockbox/tools/mkzenboot.c:1176]: (error) Used file that is not opened. Change-Id: Ibbf7ab2910c7f43b547fef25c62e0b4d19ff9551
2014-12-20DX 50: Fix file descriptor leak on errorThomas Jarosch
Unimportant change, still good style. cppcheck reported: [rockbox/firmware/target/hosted/android/dx50/button-dx50.c:92]: (error) Resource leak: fd [rockbox/firmware/target/hosted/android/dx50/button-dx50.c:98]: (error) Resource leak: fd Change-Id: Ic1831382219c44e7bef71cb2391646c9910d2369
2014-12-20mini2440: Fix bogus buffer access in LCD backlight driverThomas Jarosch
The backlight driver always writes a bogus value from memory into the LCD brightness register. Fix it up by adding bounds checks and use a more sane default value. While looking at the code, I noticed that BACKLIGHT_CONTROL_SET probably ignores the desired brightness level, too. Note: Please test on real hardware, I don't own it. cppcheck reported: [rockbox/firmware/target/arm/s3c2440/mini2440/backlight-mini2440.c:53]: (error) Array 'log_brightness[13]' accessed at index 255, which is out of bounds. Change-Id: Iaafa929a8adaa97b93ebcb66e1f6bd3bf0dad84e
2014-12-20vibe 500: Fix ide_powered() always returning falseThomas Jarosch
While the right GPIO location is accessed, the result of the logical AND was tested wrong. I don't have this hardware, but I can imagine that bug caused ide_power_enable() to be called more times than it needed to be. cppcheck reported: [rockbox/firmware/target/arm/pbell/vibe500/power-vibe500.c:101]: (style) Expression '(X & 0x8) == 0x1' is always false. Change-Id: I98498f79d383c6f29869e170bfc94ba9a0d2ba7e
2014-12-20Add missing va_end() call when the log is fullThomas Jarosch
No need to go out of memory, too ;) cppcheck reported: [rockbox/firmware/logf.c:338]: (error) va_list 'ap' was opened but not closed by va_end(). Change-Id: I00e4c04d7e3d5d1415aa5066487ce1d9209e53aa
2014-12-20Prevent theoretical out-of-bounds access in STM_Load()Thomas Jarosch
We should be safe since STM_Load() should never be called if STM_Test() fails. Still it's better safe than sorry. cppcheck reported: [rockbox/apps/plugins/mikmod/load_stm.c:302]: (error) Array 'STM_Version[3]' accessed at index 3, which is out of bounds. Change-Id: I914935fd108c492d013de24d17dcb9c227af6cd8
2014-12-20m3u playlist parser: Check size limit before using bufferThomas Jarosch
This should only be a problem if the last line is not terminated by \r or \n though. cppcheck reported: [rockbox/apps/playlist.c:234]: (style) Array index 'i' is used before limits check. Change-Id: I8182b66272ba9c024984c81588bd2a6dbb8255b8
2014-12-20text_viewer plugin: Fix two out-of-bounds buffer accessesThomas Jarosch
Test code: -------------- int main(void) { static unsigned short extra_spaces[] = { 0, 0x3000 }; return sizeof(extra_spaces); } -------------- -> returns four instead of two. cppcheck reported: [rockbox/apps/plugins/text_viewer/tv_text_processor.c:180]: (error) Array 'break_chars[27]' acces sed at index 53, which is out of bounds. [rockbox/apps/plugins/text_viewer/tv_text_processor.c:195]: (error) Array 'extra_spaces[2]' acces sed at index 3, which is out of bounds. Change-Id: I66c305cc5c99e59e7c8e0aa9c86cecbe293ff037
2014-12-20Fix broken buflib_handle check in backdrop settings loaderThomas Jarosch
The logic was messed up and always evaluated to true if buflib_handle is non-zero. Thanks to JdGordon for verifying the change. cppcheck reported: [rockbox/apps/gui/skin_engine/skin_backdrops.c:262]: (warning) Comparison of a boolean expression with an integer other than 0 or 1. Change-Id: Ib52a73e0a6a2017a631e2dec19b638a2974dab83
2014-12-20maemo port: Fix startup crash exposed by audio thread refactoringThomas Jarosch
The refactoring of the audio thread in this commit ----------------------------------------------- commit 5857c44017a1641fce7f00da7f16c143daacbaf6 Author: Michael Sevakis <jethead71@rockbox.org> Date: Fri May 31 02:41:02 2013 -0400 Refactor audio thread to run both recording and playback. ----------------------------------------------- moved pcm_init() next to dsp_init() in apps/main.c:init(). Before that pcm_init() was called by audio_init(). Unfortunately the maemo init code didn't properly wait until the maemo thread was fully initialized, leading to dangling pointers when the code called by pcm_init() tried to access maemo's variables. Fix it by refactoring the "very fast shutdown" semaphore to wait until maemo is initialized in any case. This should also fix very rare rockbox crashes on startup that I got once a year or so. The new code has been tested by a script that starts and kills rockbox after one second. Change-Id: I464efce5f2b71ca869c72a5bc578555b8022e459
2014-12-17Add newlines at the end of the fileThomas Jarosch
Quiet maemo's gcc 4.2.1 compiler warning. Change-Id: I35dfb2c0cb269b05edd62adf71fe0308a4b9ba5b
2014-12-17Fix up maemo port after byte swap header refactoringThomas Jarosch
Turns out maemo's old gcc 4.2.1 doesn't include any arch optimized swapXX() functions, just plain C implementations. Before we pull in lots of linux kernel headers for the C implementation, just stick to rockbox's own version. Change-Id: Ic28b41b52fe47f814c7f3897ce15334a42b6c5e2
2014-12-15regtools/qeditor: use the new model, drop unused codeAmaury Pouly
Change-Id: Ic4e2e201f6d055c85d52b7fe15d25980386df5b8 Reviewed-on: http://gerrit.rockbox.org/1023 Reviewed-by: Amaury Pouly <amaury.pouly@gmail.com>
2014-12-15regtools/qeditor: introduce custom table model for reg fieldsAmaury Pouly
This one is much more efficient than using a generic table widget. Change-Id: I3578964eead746e656f6b0a8dcec0f8442deb13d Reviewed-on: http://gerrit.rockbox.org/1022 Reviewed-by: Amaury Pouly <amaury.pouly@gmail.com>
2014-12-15regtoosl/qeditor: remove unused codeAmaury Pouly
Change-Id: I79ad3151d6a500903786b3467c271b43741f8fee Reviewed-on: http://gerrit.rockbox.org/1021 Reviewed-by: Amaury Pouly <amaury.pouly@gmail.com>
2014-12-15regtools/qeditor: fix field editor not updating the validator on changeAmaury Pouly
Change-Id: Ib8df47c8b7cfe0beb486e45542e3fcc9187bcc54 Reviewed-on: http://gerrit.rockbox.org/1020 Reviewed-by: Amaury Pouly <amaury.pouly@gmail.com>
2014-12-15regtools/qeditor: fix backend dump bug, be more correct on readAmaury Pouly
Change-Id: I581c033435f553f092b61144c4b68b05ab931dd8 Reviewed-on: http://gerrit.rockbox.org/1019 Reviewed-by: Amaury Pouly <amaury.pouly@gmail.com>
2014-12-15regtools/socdesc: update library with a field useful functionsAmaury Pouly
Change-Id: Ib2891fe36b0594e8554bb354a29bc8b3485de20d Reviewed-on: http://gerrit.rockbox.org/1018 Reviewed-by: Amaury Pouly <amaury.pouly@gmail.com>
2014-12-15qeditor: message widget now supports IDs, useful to clear messagesAmaury Pouly
Change-Id: Ibe0a8909128469a71a25415761860e06fc9f1e67 Reviewed-on: http://gerrit.rockbox.org/1006 Reviewed-by: Amaury Pouly <amaury.pouly@gmail.com>
2014-12-15qeditor: change setting names, they were inconsistentAmaury Pouly
Change-Id: I47c94520749d0cef1e602c7c62c685a8a3703258 Reviewed-on: http://gerrit.rockbox.org/1000 Reviewed-by: Amaury Pouly <amaury.pouly@gmail.com>