Commit graph

26 commits

Author SHA1 Message Date
Björn Stenberg
0942e2a0f7 Changed the FOR_NB_SCREENS macro to always be a for loop that declares its own loop variable. This removes the need to declare this variable in the outer scope.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30756 a1c6a512-1295-4272-9138-f99709370657
2011-10-15 19:35:02 +00:00
Rafaël Carré
cde3c9a08e maze: fix warning spotted by gcc 4.6.0
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29658 a1c6a512-1295-4272-9138-f99709370657
2011-03-28 21:44:23 +00:00
Teruaki Kawashima
01313d5039 * Rename backlight_force_on to backlight_ignore_timeout to make it clear what the function does.
* Add backlight_force_on() which forces to turn on backlight even when the setting is set to Off. use this in lamp.
No functional change except lamp.
See aslo FS#9883.


git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29128 a1c6a512-1295-4272-9138-f99709370657
2011-01-24 12:29:16 +00:00
Thomas Martitz
cae4ae2c71 Second try: Introduce plugin_crt0.c that every plugin links.
It handles exit() properly, calling the handler also when the plugin returns
normally (also make exit() more standard compliant while at it).
It also holds PLUGIN_HEADER, so that it doesn't need to be in each plugin anymore.

To work better together with callbacks passed to rb->default_event_handler_ex() introduce exit_on_usb() which will call the exit handler before showing the usb screen and exit() after it.
In most cases rb->default_event_handler_ex() was passed a callback which was manually called at all other return points. This can now be done via atexit().

In future plugin_crt0.c could also handle clearing bss, initializing iram and more.

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27873 a1c6a512-1295-4272-9138-f99709370657
2010-08-24 14:30:46 +00:00
Thomas Martitz
93cb949372 Revert "Introduce plugin_crt0.c that every plugin links."
Too much errors and no time to fix them now.

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27863 a1c6a512-1295-4272-9138-f99709370657
2010-08-23 17:12:26 +00:00
Thomas Martitz
abdc5935be Introduce plugin_crt0.c that every plugin links.
It handles exit() properly, calling the handler also when the plugin returns
normally (also it makes exit() more standard compliant while at it).
It also holds PLUGIN_HEADER, so that it doesn't need to be in each plugin anymore.

To work better together with callbacks passed to rb->default_event_handler_ex introduce exit_on_usb() which will call the exit handler before showing the usb screen and exit() after it.
In most cases it was passed a callback which was manually called at all other return points. This can now be done via atexit().

In future plugin_crt0.c could also handle clearing bss, initializing iram and more.

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27862 a1c6a512-1295-4272-9138-f99709370657
2010-08-23 16:56:49 +00:00
Thomas Martitz
20e9d56ba5 S#10387 - Rework pluginlib actions
It changes pluginlib actions to contain only a single and simple context (and
other one for remote directional buttons),
consisting of 7(9) buttons: up/down/left/right, select OR short select and long
select, exit and cancel (plus 2 for scrollwheel targets).
This ensures contexts don't clash with other contexts and simplifies them, at
the expense of reduced versatility. However, the versatility made it largely unusable
due to the great number of targets.
This should allow for using pluginlib actions safely for the most simple plugins (e.g. almost all demos).

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26202 a1c6a512-1295-4272-9138-f99709370657
2010-05-20 17:41:28 +00:00
Johannes Schwarz
959d07df5c FS#10294: reform the weird buttons in maze and mazezam for Fuze, E200 and ipod3G
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@21529 a1c6a512-1295-4272-9138-f99709370657
2009-06-27 11:14:47 +00:00
Andrew Mahone
23d9812273 loader-initialized global plugin API:
struct plugin_api *rb is declared in PLUGIN_HEADER, and pointed to by
__header.api

the loader uses this pointer to initialize rb before calling entry_point

entry_point is no longer passed a pointer to the plugin API

all plugins, and pluginlib functions, are modified to refer to the
global rb

pluginlib functions which only served to copy the API pointer are
removed

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19776 a1c6a512-1295-4272-9138-f99709370657
2009-01-16 10:34:40 +00:00
Björn Stenberg
c6b3d38a15 New makefile solution: A single invocation of 'make' to build the entire tree. Fully controlled dependencies give faster and more correct recompiles.
Many #include lines adjusted to conform to the new standards.


git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19146 a1c6a512-1295-4272-9138-f99709370657
2008-11-20 11:27:31 +00:00
Jonathan Gordon
4aafed43d4 Accept FS#9191 - lots of code reworking for maze.rock, should also fix FS#9184
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@18045 a1c6a512-1295-4272-9138-f99709370657
2008-07-15 13:49:07 +00:00
Jonathan Gordon
69d468fd06 fix FS#9184 hopefully...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@18023 a1c6a512-1295-4272-9138-f99709370657
2008-07-13 07:23:08 +00:00
Peter D'Hoye
205f3df781 Remove a viewport ambiguity by changing the screens width/heigth members into lcdwidth/lcdheight. Normal usercode should always use getwidth()/getheigth() as that returns the viewport width/height. Fixes issues that would have appeared in many places when introducing viewports with sizes != lcd sizes.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@17857 a1c6a512-1295-4272-9138-f99709370657
2008-06-28 20:45:21 +00:00
Daniel Stenberg
2acc0ac542 Updated our source code header to explicitly mention that we are GPL v2 or
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-28 18:10:04 +00:00
Steve Bavin
6526577818 Plugin parameters should be const.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@17492 a1c6a512-1295-4272-9138-f99709370657
2008-05-13 09:57:56 +00:00
Marianne Arnold
8d8576a54f Fix maze and rocklife on greyscale targets which were broken by r17382. Maybe the colours or the code can be improved a bit, just get it working again for now.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@17390 a1c6a512-1295-4272-9138-f99709370657
2008-05-05 17:14:45 +00:00
Barry Wardell
80ad31c5e3 Keep the old colours for maze and rocklife.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@17382 a1c6a512-1295-4272-9138-f99709370657
2008-05-05 13:42:05 +00:00
Jens Arnold
b6213bbf98 Optimise line drawing calls.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@17082 a1c6a512-1295-4272-9138-f99709370657
2008-04-12 08:57:28 +00:00
Marianne Arnold
12ddb8ea0d Enable plugins on the Sansa C200. Large parts taken from patch FS#7749 by Max Kelley with tweaks, bit of cleanup and additional bitmaps by me. Some of the now enabled plugins could still be improved in regard to screen size adaptation or keymaps but this way it can easily be done later and one by one. The rather ugly 'ifndef's I added temporaryly in plugins/SOURCES will also go one by one. Plugin button actions cause some quirks in a few plugins (e.g. 'clock') but since it's not critical , the bitmaps were already done and it makes a good example for discussing plugin button actions, I thought it could go in.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@14771 a1c6a512-1295-4272-9138-f99709370657
2007-09-20 10:49:48 +00:00
Peter D'Hoye
61aa70c483 Code police and keep backlight on while in mazezam
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@14667 a1c6a512-1295-4272-9138-f99709370657
2007-09-10 22:55:10 +00:00
Peter D'Hoye
fd3b0d95d8 Fix FS #7685 by using the backlight helper functions. Some code policing and cleaning. Still contains a potential crash although this version does not crash atm.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@14559 a1c6a512-1295-4272-9138-f99709370657
2007-08-31 21:53:32 +00:00
Jens Arnold
b701322fea Rockbox compiles and boots now on the 2nd gen, but doesn't work properly yet.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@14021 a1c6a512-1295-4272-9138-f99709370657
2007-07-27 09:57:27 +00:00
Kevin Ferrare
5d3bbe6d38 fix red for maze plugin
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@13997 a1c6a512-1295-4272-9138-f99709370657
2007-07-26 11:59:36 +00:00
Kevin Ferrare
bc597e4aa5 code cleanup and remote support for maze plugin
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@13996 a1c6a512-1295-4272-9138-f99709370657
2007-07-26 11:25:24 +00:00
Antoine Cellerier
cf089d3910 * FS #7373 - Maze: Button changes for iPods
* Use black as foreground color


git-svn-id: svn://svn.rockbox.org/rockbox/trunk@13735 a1c6a512-1295-4272-9138-f99709370657
2007-06-29 19:30:35 +00:00
Antoine Cellerier
fef46334d8 FS #6636 - "Maze generator plugin" by Matthias Wientapper.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@13732 a1c6a512-1295-4272-9138-f99709370657
2007-06-28 21:13:04 +00:00