forked from len0rd/rockbox
text_viewer: cleanup & bugfix
cleanup:
- don't use enum in struct / return values
- don't use a getter for preferences but a global pointer
- explicitely make enums start at 0
- use static tables for header/footer settings
- remove unneeded memset before strlcpy
- use static buffer allocation, not dynamic
- check header/footer preferences before using the callbacks
- don't include font filename in archos player preferences (break
file format)
bugfix:
- statically allocate old preferences in tv_set_preferences()
Sometimes I can read a file on Clipv2, but it still aborts quite often
refs: FS#11399
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26998 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
17a2f9d8d2
commit
298316d192
19 changed files with 272 additions and 380 deletions
|
|
@ -23,8 +23,8 @@
|
|||
#ifndef PLUGIN_TEXT_VIEWER_MENU_H
|
||||
#define PLUGIN_TEXT_VIEWER_MENU_H
|
||||
|
||||
enum tv_menu_result {
|
||||
TV_MENU_RESULT_MOVE_PAGE,
|
||||
enum {
|
||||
TV_MENU_RESULT_MOVE_PAGE = 0,
|
||||
TV_MENU_RESULT_EXIT_MENU,
|
||||
TV_MENU_RESULT_EXIT_PLUGIN,
|
||||
TV_MENU_RESULT_ATTACHED_USB,
|
||||
|
|
@ -40,6 +40,6 @@ enum tv_menu_result {
|
|||
* TV_MENU_RESULT_EXIT_PLUGIN request to exit this plugin
|
||||
* TV_MENU_RESULT_ATTACHED_USB connect USB cable
|
||||
*/
|
||||
enum tv_menu_result tv_display_menu(void);
|
||||
unsigned tv_display_menu(void);
|
||||
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue