summaryrefslogtreecommitdiff
path: root/apps/misc.h
AgeCommit message (Collapse)Author
2009-02-21replace USB_IPODSTYLE by USB_HANDLED_BY_OF as that's what it actually means. ↵Frank Gevaerts
Fix various configs to use it correctly. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@20078 a1c6a512-1295-4272-9138-f99709370657
2009-02-10Move screendump from apps to firmware, solving two nasty firmware-to-apps ↵Jens Arnold
calls. This required to move the filename creation functions as well. * Fix bug in the BMP header of Clip screendumps. * Add remote screendump for targets with an LCD remote. * Simplify some ifdefs and rename a macro in the sim. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19967 a1c6a512-1295-4272-9138-f99709370657
2009-02-09Put the display colours for monochrome and greyscale targets into the target ↵Jens Arnold
config files, and use them both for the simulator UI and screendumps. The Clip now shows the split display properly in screendumps and simulator. A side effect is that screendumps of ordinary monochrome targets are now 4-bit BMP files (saves an alternate code path, and might be more compatible with some gfx programs). * Simplify the simulation of split display, and also simplify greylib simulation. The simulator now always calculates 129 shades (2*128 for a Clip sim), and just uses 2 (or 4) of those for native display simulation. * Centralised the simulator LCD dimension definition. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19950 a1c6a512-1295-4272-9138-f99709370657
2009-02-08Small code reuse improvementNils Wallménius
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19943 a1c6a512-1295-4272-9138-f99709370657
2009-01-29Fix yellowMaurus Cuelenaere
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19881 a1c6a512-1295-4272-9138-f99709370657
2008-08-28Get checkwps compiling again: Move the definitions of BOM and BOM_SIZE to ↵Dave Chapman
misc.c (they are not used outside misc.c, so don't need to be in the .h), plus always include misc.h in misc.c (not needed to fix checkwps, but good practice), and add unistd.h when __PCTOOL_ is defined. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@18358 a1c6a512-1295-4272-9138-f99709370657
2008-08-02Unify opening of utf-8 files (FS#6203). This also adds ignoring the BOM in ↵Dominik Riebeling
several places it has been missing (as FS#6071). git-svn-id: svn://svn.rockbox.org/rockbox/trunk@18185 a1c6a512-1295-4272-9138-f99709370657
2008-06-28Updated our source code header to explicitly mention that we are GPL v2 orDaniel Stenberg
later. We still need to hunt down snippets used that are not. 1324 modified files... http://www.rockbox.org/mail/archive/rockbox-dev-archive-2008-06/0060.shtml git-svn-id: svn://svn.rockbox.org/rockbox/trunk@17847 a1c6a512-1295-4272-9138-f99709370657
2008-06-07fix red and pointer screwupJonathan Gordon
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@17701 a1c6a512-1295-4272-9138-f99709370657
2008-06-07oops, missed to failed hunks in the patchJonathan Gordon
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@17699 a1c6a512-1295-4272-9138-f99709370657
2008-06-07Accept FS#9075 and rename valid_vals to set_valsJonathan Gordon
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@17698 a1c6a512-1295-4272-9138-f99709370657
2008-06-05make %V a little simpler. only the x and y values have to be specified now ↵Jonathan Gordon
(i.e %V|0|0|||||| ) default values are as follows: width - lcd width - the x value height - lcd height - y value font - user font fg colour - the themes fg colour on 16bit targets, black on greyscale targets bg colour - the themes bg colour on 16bit targets, white on greyscale targets git-svn-id: svn://svn.rockbox.org/rockbox/trunk@17690 a1c6a512-1295-4272-9138-f99709370657
2008-05-01Introduce a small helper function that asks the user if the dynamic playlist ↵Nils Wallménius
should be erased to increase code re-use git-svn-id: svn://svn.rockbox.org/rockbox/trunk@17295 a1c6a512-1295-4272-9138-f99709370657
2008-03-21Add a general-purpose parse_list function to parse a string containing a ↵Dave Chapman
delimited list of items and adapt the parse_image_load() function in the WPS parser to use it. This function will also be used to parse the upcoming WPS %V viewport tag, but I'm committing it separately as these changes are unrelated to the viewport implementation itself. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@16728 a1c6a512-1295-4272-9138-f99709370657
2008-02-06Prevent possible buffer overflow when locating album art.Magnus Holmgren
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@16231 a1c6a512-1295-4272-9138-f99709370657
2008-01-18Accept FS#8469 by Bryan Childs with a few adjustments: Remove duplicate ↵Nicolas Pennequin
strip_extension() function from albumart.c. The other one is moved from tree.c to misc.c. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@16103 a1c6a512-1295-4272-9138-f99709370657
2007-11-21consolidate the 3 file_exists() functions into one; use the version that ↵Robert Kukla
explicitly uses dircache; give dir_exists() the same treatment for consistency git-svn-id: svn://svn.rockbox.org/rockbox/trunk@15742 a1c6a512-1295-4272-9138-f99709370657
2007-11-18Use the strrsplt function in one more placeNils Wallménius
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@15662 a1c6a512-1295-4272-9138-f99709370657
2007-08-01Fix some places for USB_NONE. Still some more complex cases left though.Jens Arnold
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@14122 a1c6a512-1295-4272-9138-f99709370657
2007-06-22Prevent initial spinup when starting first file when in a stopped state on ↵Michael Sevakis
non-RTC targets. Fix some states that are dangerous on SWCODEC and could result in data loss. Had to make plugin API incopatible since specified numbered filename creation is enabled now on all non-RTC targets with recording; increase version and sort the items that looked like they had a place to go. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@13683 a1c6a512-1295-4272-9138-f99709370657
2007-06-17Give color targets the ability to display each LCD line a different color ↵Brandon Low
and use this newfangled ability to provide themable colored file types. See the comments on read_color_theme_file and the sample.colors file provided for how to use this. .colors files go in themes directory for now. This separate line color function should be trivial to add to menus and wpss. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@13656 a1c6a512-1295-4272-9138-f99709370657
2007-05-30Move the setvol wrapper function to misc.c and use it in more places instead ↵Nils Wallménius
of doing the same checks everywhere git-svn-id: svn://svn.rockbox.org/rockbox/trunk@13524 a1c6a512-1295-4272-9138-f99709370657
2007-04-09Stop/shutdown logic rework in browsers and menus. Recorder V1: Double-Off ↵Jens Arnold
shutdown is now possible from menus and sub-browsers as well. Player, other targets which are always powered during charging: Attempted shutdown from menu with charger plugged now displays the charging splash. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@13079 a1c6a512-1295-4272-9138-f99709370657
2007-03-30Don't check for bootfile changes on devices that use OF for USB (and thus ↵Peter D'Hoye
reboot) git-svn-id: svn://svn.rockbox.org/rockbox/trunk@12974 a1c6a512-1295-4272-9138-f99709370657
2007-03-30Check if a new version got installed after usb disconnect and ask if user ↵Peter D'Hoye
wants to reboot. Causes disk spinup before showing the usb logo. Also fixes do_menu() not returning to root_menu after usb disconnect. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@12972 a1c6a512-1295-4272-9138-f99709370657
2007-03-16Set CONFIG_RTC to 0 for non-RTC targets, and check with #if to profit from ↵Jens Arnold
-Wundef. No code change. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@12811 a1c6a512-1295-4272-9138-f99709370657
2007-02-17A few more bookmark code tweaks. Also improves how the bookmark selection ↵Magnus Holmgren
screen is displayed on Archos players. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@12350 a1c6a512-1295-4272-9138-f99709370657
2006-11-15Make the updated %rg tag match playback behaviour (fall back to track gain ↵Magnus Holmgren
if album gain requested but not available). Share the mode decision logic with playback code and simplify the %rg tag handling. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@11532 a1c6a512-1295-4272-9138-f99709370657
2006-11-06Big Patch adds primarily: Samplerate and format selection to recording for ↵Michael Sevakis
SWCODEC. Supprort for samplerates changing in playback (just goes with the recording part inseparably). Samplerates to all encoders. Encoders can be configured individually on a menu specific to the encoder in the recording menu. File creation is delayed until flush time to reduce spinups when splitting. Misc: statusbar icons for numbers are individual digits to display any number. Audio buffer was rearranged to maximize memory available to recording and properly reinitialized when trashed. ColdFire PCM stuff moved to target tree to avoid a complicated mess when adding samplerate switching. Some needed API changes and to neaten up growing gap between hardware and software codecs. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@11452 a1c6a512-1295-4272-9138-f99709370657
2006-10-21Implement fast_readline as a function and use it for tagtree also.Miika Pekkarinen
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@11301 a1c6a512-1295-4272-9138-f99709370657
2005-12-04Replace references to HAVE_RTC with CONFIG_RTC and remove the HAVE_RTC ↵Dave Chapman
defines from config-*.h git-svn-id: svn://svn.rockbox.org/rockbox/trunk@8147 a1c6a512-1295-4272-9138-f99709370657
2005-10-01Core: A graphics framework can now register a hook function to extend the ↵Jens Arnold
core screendump routine. * Grayscale library: (1) Changed the screendump routine into a hook, and implemented it for H1x0. (2) The planar pixel setting routines now use one register less. Fixes build problem with developer builds (frame pointers enabled) on coldfire. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@7574 a1c6a512-1295-4272-9138-f99709370657
2005-09-02Patch #1272052 by Henrik Backe - Move credits to a pluginLinus Nielsen Feltzing
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@7450 a1c6a512-1295-4272-9138-f99709370657
2005-09-02Added universal functions for creation of numbered filenames and date+time ↵Jens Arnold
filenames (units with RTC only). Some size optimisations within code using these new functions. Everything should behave as before, except config saving will always find the highest file number + 1 even if the sequence is non-contiguous. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@7449 a1c6a512-1295-4272-9138-f99709370657
2005-08-18The shutdown message is now displayed before saving the database, giving ↵Linus Nielsen Feltzing
better user feedback when whutting off the player git-svn-id: svn://svn.rockbox.org/rockbox/trunk@7351 a1c6a512-1295-4272-9138-f99709370657
2005-04-06Moved the car adapter mode handling to apps/, now every thread gets ↵Linus Nielsen Feltzing
SYS_CHARGER_CONNECTED and SYS_CHARGER_DISCONNECTED events git-svn-id: svn://svn.rockbox.org/rockbox/trunk@6255 a1c6a512-1295-4272-9138-f99709370657
2005-02-07oops again, incomplete long policyJean-Philippe Bernardy
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@5843 a1c6a512-1295-4272-9138-f99709370657
2005-01-31New function for formatting large-range values for output, both printed and ↵Jens Arnold
voiced. This replaces num2max5(). It is currently used for the total/free space display in the info menu, for the recorded number of bytes (recorders) and the MMC debug info (Ondios). git-svn-id: svn://svn.rockbox.org/rockbox/trunk@5721 a1c6a512-1295-4272-9138-f99709370657
2004-10-12Extended default_event_handler() that calls a callback function prior to ↵Jens Arnold
actually handling the event. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@5263 a1c6a512-1295-4272-9138-f99709370657
2004-07-26Cosmetic changesLinus Nielsen Feltzing
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@4954 a1c6a512-1295-4272-9138-f99709370657
2004-07-26First step in revamping the USB event handling, paving the way for the ↵Linus Nielsen Feltzing
upcoming SYS_POWER_OFF event git-svn-id: svn://svn.rockbox.org/rockbox/trunk@4951 a1c6a512-1295-4272-9138-f99709370657
2004-07-24New feature: clean shutdown if you press OFF twice in the file browser, or ↵Linus Nielsen Feltzing
select "Shut off" in the main menu. Players only have the menu option, due to lack of keys. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@4940 a1c6a512-1295-4272-9138-f99709370657
2004-07-05Moved settings_parseline() to misc.cLinus Nielsen Feltzing
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@4824 a1c6a512-1295-4272-9138-f99709370657
2004-06-30New screen dump feature for recordersLinus Nielsen Feltzing
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@4817 a1c6a512-1295-4272-9138-f99709370657
2003-05-04Moved read_line() to misc.cLinus Nielsen Feltzing
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@3647 a1c6a512-1295-4272-9138-f99709370657
2003-03-10renamed string.c to misc.c and added a misc.h for the num2max5() function,Daniel Stenberg
and included that header file in recording.c git-svn-id: svn://svn.rockbox.org/rockbox/trunk@3403 a1c6a512-1295-4272-9138-f99709370657