Removing the "list_wrap" argument is actually pretty easy.
In practice, almost all lists are using LIST_WRAP_UNLESS_HELD
behavior so we can make that the default. A couple of lists
disable wraparound with LIST_WRAP_OFF; this is now achieved
by setting the list "wraparound" flag to false when setting
up the list. LIST_WRAP_ON was unused and is of questionable
value, so it has been removed entirely.
This makes list wraparound behavior a property of the list,
controlled solely by the "wraparound" flag. The result is a
simpler list API and implementation, without changing the
behavior of any lists.
Change-Id: Ib55d17519e6d92fc95ae17b84ab0aaf4233bcb5a
Since gui_synclist_do_button() overrides the setting at runtime
there is no reason to have a public API call to set it. Really
it should be a local variable, but it will be simpler to do that
after refactoring how list wraparound behavior is handled.
Change-Id: Id09d42197814102693752a9f64db8325118ca796
Instead of putting "#ifdef LCD_STRIDEFORMAT" at every usage of the
macro it's simpler to have config.h define LCD_STRIDEFORMAT to the
default of horizontal stride when the target leaves it unspecified.
Change-Id: Ib187012aad65ac678dbd837b1464a83bad722411
LIST_WRAP_ON seems to only be used in 3 places
at this point.
- Keybox Plugin
- Puzzles Plugin
- (File) Properties Plugin
Switch them them over to LIST_WRAP_UNLESS_HELD
as that is used everywhere else and is arguably
preferable (the option to turn off list wrapping
completely remains, of course).
Change-Id: Id8017dcbb123a0568cb6db527a8966b63ba06d47
This adds a resync.sh script that handles most of the resyncing process:
copying new sources, regenerating help, and staging for commit. I also took
this opportunity to make the process more efficient and consistent by only
selecting the types of files that we care about and ignoring any
autogenerated temporary files that may be in the upstream tree.
Change-Id: Ib0803462684b8ae3b40eec3742944e5bdb28508e
This updates the upstream sources to include a modified get_cursor_location
patch that I anticipate Simon will merge shortly. Also, I've streamlined
the resync process to only copy the exact files we need to reduce clutter.
Change-Id: I6a5ac60821fce346c500b101c363ae0c63c2ee95
I'm currently running up against the limitations of the lcd_draw functions
I want these functions to be able to be used on any size buffer not
just buffers with a stride matching the underlying device
[DONE] allow the framebuffer to be decoupled from the device framebuffer
[DONE need examples] allow for some simple blit like transformations
[DONE] remove the device framebuffer from the plugin api
[DONE}ditto remote framebuffer
[DONE] remove _viewport_get_framebuffer you can call struct *vp = lcd_set_viewport(NULL) and vp->buffer->fb_ptr
while remote lcds may compile (and work in the sim) its not been tested on targets
[FIXED] backdrops need work to be screen agnostic
[FIXED] screen statusbar is not being combined into the main viewport correctly yet
[FIXED] screen elements are displayed incorrectly after switch to void*
[FIXED] core didn't restore proper viewport on splash etc.
[NEEDS TESTING] remote lcd garbled data
[FIXED] osd lib garbled screen on bmp_part
[FIXED] grey_set_vp needs to return old viewport like lcd_set_viewport
[FIXED] Viewport update now handles viewports with differing buffers/strides by copying to the main buffer
[FIXED] splash on top of WPS leaves old framebuffer data (doesn't redraw)
[UPDATE] refined this a bit more to have clear_viewport set the clean bit and have skin_render do its own screen clear
scrolling viewports no longer trigger wps refresh
also fixed a bug where guisyncyesno was displaying and then disappearing
[ADDED!] New LCD macros that allow you to create properly size frame buffers in you desired size without wasting bytes
(LCD_ and LCD_REMOTE_)
LCD_STRIDE(w, h) same as STRIDE_MAIN
LCD_FBSTRIDE(w, h) returns target specific stride for a buffer W x H
LCD_NBELEMS(w, h) returns the number of fb_data sized elemenst needed for a buffer W x H
LCD_NATIVE_STRIDE(s) conversion between rockbox native vertical and lcd native stride (2bitH)
test_viewports.c has an example of usage
[FIXED!!] 2bit targets don't respect non-native strides
[FIXED] Few define snags
Change-Id: I0d04c3834e464eca84a5a715743a297a0cefd0af
rb core allows you to load custom keyboard layouts
this patch adds the ability to load a keyboard layout in a buffer
the custom layout is temporary and does not overwrite the current layout
use like so:
unsigned short kbd[64];
unsigned short *kbd_p = kbd;
if (!kbd_create_layout("ABCD1234\n", kbd, sizeof(kbd)))
kbd_p = NULL;
rb->kbd_input(buf,sizeof(buf), kbd_p);
Change-Id: I7be2bd4a1b4797a147fa70228a9749dc56ac052a
keep running into the rigid nature of do_menu
it isn't too bad when you don't need voice but once
you do the fun awaits
do_menu likes to talk on menu enter which is in a loop when you use do_menu
I would like to move the processing to the callback
TOO BAD you only get an action and the menu_item_ex struct
you sent it when calling the function
Change-Id: Iaefd0cc133435d675b7dd27a558c504d6ccb327a
We were improperly conditioning the state reset with `do_pausemenu'. We
should reset the input state no matter what.
Change-Id: Iaafc59b95e9f1f053b57a34f0f28f7c672c0e327
This works around an odd issue in Mines involving the zoom feature. The
chain of events leading to it is rather convoluted:
1. No save game is found, so no fonts are loaded from disk.
2. A new game is started.
3. The user selects the "Zoom" option.
4. The allocation of the zoom framebuffer causes the malloc code to grab
the audiobuffer. This causes all further font_load() calls to FAIL, due
to buflib allocations no longer working.
5. The user goes back to the normal view and uncovers a square.
6. Font loading fails, causing the drawing code to fall back to the system
font.
7. An unrelated bug (not yet tracked down) causes font_get(FONT_UI) to
return a different font.
8. font_getstringsize() returns the right size of the "wrong" font, leading
to centering issues upon rb_draw_text().
The real solution to this would be to fix font_get(), but this fix should
prevent the issue from happening if Mines has been run and saved at least
once before.
Change-Id: Ib9ad51376eeb3ca1113a1f3786124b612db88cd7
Frontends now have a way to retrieve the backend cursor position with some
changes I've submitted upstream. With this information, we can now follow
the cursor around in "interaction mode" while zoomed in, eliminating (most)
need for mode switching.
Also does some cleanup of the frontend code.
Change-Id: I1ba118f67564a3baed95435f5619b73cfa3ae87a
- zoom now remembers position between activations (but not when exiting the
plugin)
- key repeat enabled when panning
- moving mouse out of frame while zoomed will pan
- mouse can be moved diagonally
Change-Id: I39380ef7f36238700b6baa54cac036832933df67
We had some issues in Keen with the arithmetic operators not being rendered
properly. This is still a kludge (we should intelligently search the font)
but is still less ugly than the garbage it was drawing before.
Change-Id: I5b957c7371b659ea6d64847145f9913b2a892e48
We have a couple games like Untangle and mouse-mode games in which the
software poweroff is very annoying.
Change-Id: I554b89aecf8c7cc20c6c7f305be1b8807dc9283b
For some reason lcd_getstringsize was occasionally reverting to the system
font, rather than the loaded font. This was leading to improper font sizes
being reported.
Change-Id: Ie5fc31de9a6a7af739beb22efc3ec1383206eaea
I can't believe this has gone unnoticed for so long... We need to update
the game size upon loading games. Who knew?
Change-Id: I929f8139457853440ae687bd937af989fa7c6f93
As rbcompat.h is -include'd on the command line, the mkdep script doesn't
pick it up. Explicitly add the dependency to lang_enum.h to the makefile.
Also add lang_enum.h to the 'make clean' target!
Change-Id: I33c8ed0cd5c1d44dce02ac9285469c0e4feac00e
This brings the puzzles source to upstream commit e2135d5. (I've made my own
changes on top of that.)
This brings in a couple bugfixes and a new solver for Dominosa.
Change-Id: I11d46b43171787832330a5e2e0d2f353f36f727d
This brings the code to upstream commit 3ece3d6 (I've made my own Rockbox-
specific changes on top of that).
Changes include using C99 `bool' throughout, and minor logic fixes for some
puzzles.
Change-Id: Ie823e73ae49a8ee1de411d6d406df2ba835af541
This brings the source to upstream commit 506b073 (though I have made some
extra commits on top of that). Notably this includes a fix for a double-free
bug that I myself introduced upstream.
Change-Id: I02671586bbc34d63e05398ee971271fed42538cf
When zoomed in, the original commit made a mono bitmap (a.k.a. text) always
have the red component set to 255. This would cause drawn text to always be
red. Fixed.
Change-Id: Iec06256a3a783948c60c70557de042b375224448
The upstream code changed a little bit with regard to the request_keys()
API. Also, we save some bytes (especially on the c200v2) by compiling with
-ffunction-sections and -fdata-sections, which allows Net to fit once again.
Change-Id: I3ab30127169c73e4cd8996f0c12e1223ee18d79f
This includes an upstream change to the Galaxies help text. `genhelp.sh'
no longer leaves temporary files sitting around, and the self-test feature
of lz4tiny.c works again.
Change-Id: I787f4cb3c258baade31638d6be18f95b7aa0705e
This brings the upstream version to b3da238 (though some of my own
changes are included on top of that).
Change-Id: Ida73e8cd86765413147ce891af3cc2b7aeda2b2a
This should cut just enough size off the binary to let Net still compile
for the c200v2. This is probably close to the last time I'll be able to do
this; I'm already resorting to dirty hacks like writing super terse error
messages.
Change-Id: I43344b9a601696d7ca56fc02af4a611fd9d1a150
They all work now :). I merged in part of Chris Boyle's Android port of
Puzzles to give the front end a way to know what keys the back end needs.
This also re-syncs to the latest upstream sources.
Change-Id: Ie0409bbb32f617ae5abf4f81be3b45d1552db9bb
The help text is now processed to generate a style array to pass to the
display_text library in addition to the text itself. The help text is still
compressed using LZ4, and still fits on the c200v2.
Change-Id: I7a3a664f90f67a1a018956c72d2b62d92b8ffd17