mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-11-18 09:32:40 -05:00
iBasso DX50/DX90: Major code cleanup and reorganization.
Reorganization - Separated iBasso devices from PLATFORM_ANDROID. These are now standlone hosted targets. Most device specific code is in the firmware/target/hosted/ibasso directory. - No dependency on Android SDK, only the Android NDK is needed. 32 bit Android NDK and Android API Level 16. - Separate implementation for each device where feasible. Code cleanup - Rewrite of existing code, from simple reformat to complete reimplementation. - New backlight interface, seperating backlight from touchscreen. - Rewrite of device button handler, removing unneeded code and fixing memory leaks. - New Debug messages interface logging to Android adb logcat (DEBUGF, panicf, logf). - Rewrite of lcd device handler, removing unneeded code and fixing memory leaks. - Rewrite of audiohw device handler/pcm interface, removing unneeded code and fixing memory leaks, enabling 44.1/48kHz pthreaded playback. - Rewrite of power and powermng, proper shutdown, using batterylog results (see http://gerrit.rockbox.org/r/#/c/1047/). - Rewrite of configure (Android NDK) and device specific config. - Rewrite of the Android NDK specific Makefile. Misc - All plugins/games/demos activated. - Update tinyalsa to latest from https://github.com/tinyalsa/tinyalsa. Includes - http://gerrit.rockbox.org/r/#/c/993/ - http://gerrit.rockbox.org/r/#/c/1010/ - http://gerrit.rockbox.org/r/#/c/1035/ Does not include http://gerrit.rockbox.org/r/#/c/1007/ due to new backlight interface and new option for hold switch, touchscreen, physical button interaction. Rockbox needs the iBasso DX50/DX90 loader for startup, see http://gerrit.rockbox.org/r/#/c/1099/ The loader expects Rockbox to be installed in /mnt/sdcard/.rockbox/. If /mnt/sdcard/ is accessed as USB mass storage device, Rockbox will exit gracefully and the loader will restart Rockbox on USB disconnect. Tested on iBasso DX50. Compiled (not tested) for iBasso DX90. Compiled (not tested) for PLATFORM_ANDROID. Change-Id: I5f5e22e68f5b4cf29c28e2b40b2c265f2beb7ab7
This commit is contained in:
parent
cef17e3d59
commit
dbabd0d9c3
69 changed files with 3909 additions and 1402 deletions
|
|
@ -100,7 +100,7 @@ gui/statusbar.c
|
|||
#ifdef HAVE_LCD_BITMAP
|
||||
gui/statusbar-skinned.c
|
||||
#endif
|
||||
#if (CONFIG_PLATFORM&PLATFORM_ANDROID) && !defined (DX50) && !defined(DX90)
|
||||
#if (CONFIG_PLATFORM&PLATFORM_ANDROID)
|
||||
hosted/android/yesno.c
|
||||
hosted/android/notification.c
|
||||
#else
|
||||
|
|
@ -129,7 +129,7 @@ player/keyboard.c
|
|||
#ifdef HAVE_LCD_BITMAP
|
||||
recorder/bmp.c
|
||||
recorder/icons.c
|
||||
#if (CONFIG_PLATFORM&PLATFORM_ANDROID) && !defined (DX50) && !defined(DX90)
|
||||
#if (CONFIG_PLATFORM&PLATFORM_ANDROID)
|
||||
hosted/android/keyboard.c
|
||||
#else
|
||||
recorder/keyboard.c
|
||||
|
|
|
|||
|
|
@ -77,6 +77,10 @@ static inline int do_button_check(const struct button_mapping *items,
|
|||
{
|
||||
if (items[i].button_code == button)
|
||||
{
|
||||
/*
|
||||
CAVEAT: This will allways return the action without pre_button_code if it has a
|
||||
lower index in the list.
|
||||
*/
|
||||
if ((items[i].pre_button_code == BUTTON_NONE)
|
||||
|| (items[i].pre_button_code == last_button))
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1,13 +1,15 @@
|
|||
/***************************************************************************
|
||||
* __________ __ ___.
|
||||
* __________ __ ___
|
||||
* Open \______ \ ____ ____ | | _\_ |__ _______ ___
|
||||
* Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
|
||||
* Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
|
||||
* Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
|
||||
* \/ \/ \/ \/ \/
|
||||
* $Id$
|
||||
*
|
||||
* Copyright (C) 2010 Maurus Cuelenaere
|
||||
* Copyright (C) 2014 by Ilia Sergachev: Initial Rockbox port to iBasso DX50
|
||||
* Copyright (C) 2014 by Mario Basister: iBasso DX90 port
|
||||
* Copyright (C) 2014 by Simon Rothen: Initial Rockbox repository submission, additional features
|
||||
* Copyright (C) 2014 by Udo Schläpfer: Code clean up, additional features
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
|
|
@ -19,7 +21,6 @@
|
|||
*
|
||||
****************************************************************************/
|
||||
|
||||
/* Button Code Definitions for iBasso DX50 & DX90 */
|
||||
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
|
|
@ -30,190 +31,214 @@
|
|||
#include "button.h"
|
||||
#include "settings.h"
|
||||
|
||||
|
||||
/*
|
||||
* The format of the list is as follows
|
||||
* { Action Code, Button code, Prereq button code }
|
||||
* if there's no need to check the previous button's value, use BUTTON_NONE
|
||||
* Insert LAST_ITEM_IN_LIST at the end of each mapping
|
||||
*/
|
||||
Button Code Definitions for iBasso DX50 & DX90.
|
||||
|
||||
static const struct button_mapping button_context_standard[] = {
|
||||
{ ACTION_STD_PREV, BUTTON_LEFT, BUTTON_NONE },
|
||||
{ ACTION_STD_NEXT, BUTTON_RIGHT, BUTTON_NONE },
|
||||
{ ACTION_STD_PREVREPEAT, BUTTON_LEFT|BUTTON_REPEAT, BUTTON_NONE },
|
||||
{ ACTION_STD_NEXTREPEAT, BUTTON_RIGHT|BUTTON_REPEAT, BUTTON_NONE },
|
||||
{ ACTION_STD_OK, BUTTON_PLAY|BUTTON_REL, BUTTON_PLAY },
|
||||
{ ACTION_STD_CANCEL, BUTTON_POWER, BUTTON_NONE },
|
||||
{ ACTION_STD_CONTEXT, BUTTON_PLAY|BUTTON_REPEAT, BUTTON_NONE },
|
||||
The format of the list is as follows
|
||||
|
||||
{ Action Code, Button code, Prereq button code }
|
||||
|
||||
If there's no need to check the previous button's value, use BUTTON_NONE.
|
||||
CAVEAT: The action without prereq button code will allways be choosen if it has a
|
||||
lower index in the list.
|
||||
Insert LAST_ITEM_IN_LIST at the end of each mapping
|
||||
*/
|
||||
|
||||
|
||||
static const struct button_mapping button_context_standard[] =
|
||||
{
|
||||
{ ACTION_STD_CONTEXT, BUTTON_PLAY | BUTTON_REPEAT, BUTTON_PLAY },
|
||||
{ ACTION_STD_OK, BUTTON_PLAY | BUTTON_REL, BUTTON_PLAY },
|
||||
{ ACTION_STD_PREV, BUTTON_LEFT, BUTTON_NONE },
|
||||
{ ACTION_STD_NEXT, BUTTON_RIGHT, BUTTON_NONE },
|
||||
{ ACTION_STD_PREVREPEAT, BUTTON_LEFT | BUTTON_REPEAT, BUTTON_NONE },
|
||||
{ ACTION_STD_NEXTREPEAT, BUTTON_RIGHT | BUTTON_REPEAT, BUTTON_NONE },
|
||||
{ ACTION_STD_CANCEL, BUTTON_POWER, BUTTON_NONE },
|
||||
|
||||
LAST_ITEM_IN_LIST
|
||||
}; /* button_context_standard */
|
||||
};
|
||||
|
||||
|
||||
static const struct button_mapping button_context_wps[] =
|
||||
{
|
||||
{ ACTION_WPS_MENU, BUTTON_POWER, BUTTON_NONE },
|
||||
{ ACTION_WPS_CONTEXT, BUTTON_PLAY | BUTTON_REPEAT, BUTTON_NONE },
|
||||
{ ACTION_WPS_PLAY, BUTTON_PLAY | BUTTON_REL, BUTTON_NONE },
|
||||
{ ACTION_WPS_SEEKBACK, BUTTON_LEFT | BUTTON_REPEAT, BUTTON_NONE },
|
||||
{ ACTION_WPS_SEEKFWD, BUTTON_RIGHT | BUTTON_REPEAT, BUTTON_NONE },
|
||||
{ ACTION_WPS_STOPSEEK, BUTTON_LEFT | BUTTON_REL, BUTTON_LEFT | BUTTON_REPEAT },
|
||||
{ ACTION_WPS_STOPSEEK, BUTTON_RIGHT | BUTTON_REL, BUTTON_RIGHT | BUTTON_REPEAT },
|
||||
{ ACTION_WPS_SKIPNEXT, BUTTON_RIGHT | BUTTON_REL, BUTTON_NONE },
|
||||
{ ACTION_WPS_SKIPPREV, BUTTON_LEFT | BUTTON_REL, BUTTON_NONE },
|
||||
{ ACTION_WPS_VOLUP, BUTTON_VOL_UP, BUTTON_NONE },
|
||||
{ ACTION_WPS_VOLUP, BUTTON_VOL_UP | BUTTON_REPEAT, BUTTON_NONE },
|
||||
{ ACTION_WPS_VOLDOWN, BUTTON_VOL_DOWN, BUTTON_NONE },
|
||||
{ ACTION_WPS_VOLDOWN, BUTTON_VOL_DOWN | BUTTON_REPEAT, BUTTON_NONE },
|
||||
|
||||
static const struct button_mapping button_context_wps[] = {
|
||||
{ ACTION_WPS_MENU, BUTTON_POWER, BUTTON_NONE },
|
||||
{ ACTION_WPS_CONTEXT, BUTTON_PLAY|BUTTON_REPEAT, BUTTON_NONE },
|
||||
{ ACTION_WPS_PLAY, BUTTON_PLAY|BUTTON_REL, BUTTON_NONE },
|
||||
{ ACTION_WPS_SKIPNEXT, BUTTON_RIGHT|BUTTON_REL, BUTTON_NONE },
|
||||
{ ACTION_WPS_SKIPPREV, BUTTON_LEFT|BUTTON_REL, BUTTON_NONE },
|
||||
{ ACTION_WPS_SEEKBACK, BUTTON_LEFT|BUTTON_REPEAT, BUTTON_NONE },
|
||||
{ ACTION_WPS_SEEKFWD, BUTTON_RIGHT|BUTTON_REPEAT, BUTTON_NONE },
|
||||
{ ACTION_WPS_STOPSEEK, BUTTON_LEFT|BUTTON_REL, BUTTON_LEFT|BUTTON_REPEAT },
|
||||
{ ACTION_WPS_STOPSEEK, BUTTON_RIGHT|BUTTON_REL, BUTTON_RIGHT|BUTTON_REPEAT },
|
||||
{ ACTION_WPS_VOLUP, BUTTON_VOL_UP, BUTTON_NONE },
|
||||
{ ACTION_WPS_VOLUP, BUTTON_VOL_UP|BUTTON_REPEAT, BUTTON_NONE },
|
||||
{ ACTION_WPS_VOLDOWN, BUTTON_VOL_DOWN, BUTTON_NONE },
|
||||
{ ACTION_WPS_VOLDOWN, BUTTON_VOL_DOWN|BUTTON_REPEAT, BUTTON_NONE },
|
||||
LAST_ITEM_IN_LIST
|
||||
}; /* button_context_wps */
|
||||
};
|
||||
|
||||
|
||||
static const struct button_mapping button_context_list[] =
|
||||
{
|
||||
{ ACTION_LIST_VOLUP, BUTTON_VOL_UP | BUTTON_REPEAT, BUTTON_NONE },
|
||||
{ ACTION_LIST_VOLUP, BUTTON_VOL_UP, BUTTON_NONE },
|
||||
{ ACTION_LIST_VOLDOWN, BUTTON_VOL_DOWN, BUTTON_NONE },
|
||||
{ ACTION_LIST_VOLDOWN, BUTTON_VOL_DOWN | BUTTON_REPEAT, BUTTON_NONE },
|
||||
|
||||
static const struct button_mapping button_context_list[] = {
|
||||
#ifdef HAVE_VOLUME_IN_LIST
|
||||
{ ACTION_LIST_VOLUP, BUTTON_VOL_UP|BUTTON_REPEAT, BUTTON_NONE },
|
||||
{ ACTION_LIST_VOLUP, BUTTON_VOL_UP, BUTTON_NONE },
|
||||
{ ACTION_LIST_VOLDOWN, BUTTON_VOL_DOWN, BUTTON_NONE },
|
||||
{ ACTION_LIST_VOLDOWN, BUTTON_VOL_DOWN|BUTTON_REPEAT, BUTTON_NONE },
|
||||
#endif
|
||||
LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_STD),
|
||||
}; /* button_context_list */
|
||||
};
|
||||
|
||||
static const struct button_mapping button_context_tree[] = {
|
||||
|
||||
static const struct button_mapping button_context_tree[] =
|
||||
{
|
||||
LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_LIST),
|
||||
}; /* button_context_tree */
|
||||
|
||||
static const struct button_mapping button_context_listtree_scroll_with_combo[] = {
|
||||
LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_CUSTOM|CONTEXT_TREE),
|
||||
};
|
||||
|
||||
static const struct button_mapping button_context_listtree_scroll_without_combo[] = {
|
||||
LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_CUSTOM|CONTEXT_TREE),
|
||||
|
||||
static const struct button_mapping button_context_listtree_scroll_with_combo[] =
|
||||
{
|
||||
LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_CUSTOM | CONTEXT_TREE),
|
||||
};
|
||||
|
||||
static const struct button_mapping button_context_settings[] = {
|
||||
{ ACTION_SETTINGS_INC, BUTTON_VOL_UP|BUTTON_REL, BUTTON_NONE },
|
||||
{ ACTION_SETTINGS_INCREPEAT, BUTTON_VOL_UP|BUTTON_REPEAT, BUTTON_NONE },
|
||||
{ ACTION_SETTINGS_DEC, BUTTON_VOL_DOWN|BUTTON_REL, BUTTON_NONE },
|
||||
{ ACTION_SETTINGS_DECREPEAT, BUTTON_VOL_DOWN|BUTTON_REPEAT, BUTTON_NONE },
|
||||
LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_STD),
|
||||
}; /* button_context_settings */
|
||||
|
||||
static const struct button_mapping button_context_settings_right_is_inc[] = {
|
||||
static const struct button_mapping button_context_listtree_scroll_without_combo[] =
|
||||
{
|
||||
LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_CUSTOM | CONTEXT_TREE),
|
||||
};
|
||||
|
||||
|
||||
static const struct button_mapping button_context_settings[] =
|
||||
{
|
||||
{ ACTION_SETTINGS_INC, BUTTON_VOL_UP | BUTTON_REL, BUTTON_NONE },
|
||||
{ ACTION_SETTINGS_INCREPEAT, BUTTON_VOL_UP | BUTTON_REPEAT, BUTTON_NONE },
|
||||
{ ACTION_SETTINGS_DEC, BUTTON_VOL_DOWN | BUTTON_REL, BUTTON_NONE },
|
||||
{ ACTION_SETTINGS_DECREPEAT, BUTTON_VOL_DOWN | BUTTON_REPEAT, BUTTON_NONE },
|
||||
|
||||
LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_STD),
|
||||
}; /* button_context_settingsgraphical */
|
||||
};
|
||||
|
||||
static const struct button_mapping button_context_mainmenu[] = {
|
||||
|
||||
static const struct button_mapping button_context_settings_right_is_inc[] =
|
||||
{
|
||||
LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_STD),
|
||||
};
|
||||
|
||||
|
||||
static const struct button_mapping button_context_mainmenu[] =
|
||||
{
|
||||
{ ACTION_TREE_WPS, BUTTON_POWER, BUTTON_NONE },
|
||||
|
||||
LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_TREE),
|
||||
}; /* button_context_mainmenu */
|
||||
};
|
||||
|
||||
static const struct button_mapping button_context_yesno[] = {
|
||||
{ ACTION_YESNO_ACCEPT, BUTTON_PLAY, BUTTON_NONE },
|
||||
|
||||
static const struct button_mapping button_context_yesno[] =
|
||||
{
|
||||
{ ACTION_YESNO_ACCEPT, BUTTON_PLAY, BUTTON_NONE },
|
||||
{ ACTION_YESNO_ACCEPT, BUTTON_LEFT, BUTTON_NONE },
|
||||
|
||||
LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_STD),
|
||||
}; /* button_context_settings_yesno */
|
||||
};
|
||||
|
||||
static const struct button_mapping button_context_colorchooser[] = {
|
||||
|
||||
static const struct button_mapping button_context_colorchooser[] =
|
||||
{
|
||||
LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_SETTINGS),
|
||||
}; /* button_context_colorchooser */
|
||||
};
|
||||
|
||||
static const struct button_mapping button_context_eq[] = {
|
||||
|
||||
static const struct button_mapping button_context_eq[] =
|
||||
{
|
||||
LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_SETTINGS),
|
||||
}; /* button_context_eq */
|
||||
};
|
||||
|
||||
static const struct button_mapping button_context_keyboard[] = {
|
||||
{ ACTION_KBD_LEFT, BUTTON_LEFT, BUTTON_NONE },
|
||||
{ ACTION_KBD_LEFT, BUTTON_LEFT|BUTTON_REPEAT, BUTTON_NONE },
|
||||
{ ACTION_KBD_RIGHT, BUTTON_RIGHT, BUTTON_NONE },
|
||||
{ ACTION_KBD_RIGHT, BUTTON_RIGHT|BUTTON_REPEAT, BUTTON_NONE },
|
||||
|
||||
{ ACTION_KBD_CURSOR_LEFT, BUTTON_PLAY|BUTTON_LEFT, BUTTON_NONE },
|
||||
{ ACTION_KBD_CURSOR_LEFT, BUTTON_PLAY|BUTTON_LEFT|BUTTON_REPEAT, BUTTON_NONE },
|
||||
{ ACTION_KBD_CURSOR_RIGHT, BUTTON_PLAY|BUTTON_RIGHT, BUTTON_NONE },
|
||||
{ ACTION_KBD_CURSOR_RIGHT, BUTTON_PLAY|BUTTON_RIGHT|BUTTON_REPEAT, BUTTON_NONE },
|
||||
{ ACTION_KBD_SELECT, BUTTON_PLAY, BUTTON_NONE },
|
||||
|
||||
{ ACTION_KBD_UP, BUTTON_VOL_UP, BUTTON_NONE },
|
||||
{ ACTION_KBD_UP, BUTTON_VOL_UP|BUTTON_REPEAT, BUTTON_NONE },
|
||||
{ ACTION_KBD_DOWN, BUTTON_VOL_DOWN, BUTTON_NONE },
|
||||
{ ACTION_KBD_DOWN, BUTTON_VOL_DOWN|BUTTON_REPEAT, BUTTON_NONE },
|
||||
static const struct button_mapping button_context_keyboard[] =
|
||||
{
|
||||
{ ACTION_KBD_LEFT, BUTTON_LEFT, BUTTON_NONE },
|
||||
{ ACTION_KBD_LEFT, BUTTON_LEFT | BUTTON_REPEAT, BUTTON_NONE },
|
||||
{ ACTION_KBD_RIGHT, BUTTON_RIGHT, BUTTON_NONE },
|
||||
{ ACTION_KBD_RIGHT, BUTTON_RIGHT | BUTTON_REPEAT, BUTTON_NONE },
|
||||
{ ACTION_KBD_CURSOR_LEFT, BUTTON_PLAY | BUTTON_LEFT, BUTTON_NONE },
|
||||
{ ACTION_KBD_CURSOR_LEFT, BUTTON_PLAY | BUTTON_LEFT | BUTTON_REPEAT, BUTTON_NONE },
|
||||
{ ACTION_KBD_CURSOR_RIGHT, BUTTON_PLAY | BUTTON_RIGHT, BUTTON_NONE },
|
||||
{ ACTION_KBD_CURSOR_RIGHT, BUTTON_PLAY | BUTTON_RIGHT | BUTTON_REPEAT, BUTTON_NONE },
|
||||
{ ACTION_KBD_SELECT, BUTTON_PLAY, BUTTON_NONE },
|
||||
{ ACTION_KBD_UP, BUTTON_VOL_UP, BUTTON_NONE },
|
||||
{ ACTION_KBD_UP, BUTTON_VOL_UP | BUTTON_REPEAT, BUTTON_NONE },
|
||||
{ ACTION_KBD_DOWN, BUTTON_VOL_DOWN, BUTTON_NONE },
|
||||
{ ACTION_KBD_DOWN, BUTTON_VOL_DOWN | BUTTON_REPEAT, BUTTON_NONE },
|
||||
|
||||
LAST_ITEM_IN_LIST
|
||||
}; /* button_context_keyboard */
|
||||
};
|
||||
|
||||
/** Bookmark Screen **/
|
||||
static const struct button_mapping button_context_bmark[] = {
|
||||
|
||||
|
||||
static const struct button_mapping button_context_bmark[] =
|
||||
{
|
||||
LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_LIST),
|
||||
}; /* button_context_bmark */
|
||||
};
|
||||
|
||||
static const struct button_mapping button_context_time[] = {
|
||||
|
||||
static const struct button_mapping button_context_time[] =
|
||||
{
|
||||
LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_SETTINGS),
|
||||
}; /* button_context_time */
|
||||
};
|
||||
|
||||
static const struct button_mapping button_context_quickscreen[] = {
|
||||
|
||||
static const struct button_mapping button_context_quickscreen[] =
|
||||
{
|
||||
LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_STD)
|
||||
}; /* button_context_quickscreen */
|
||||
};
|
||||
|
||||
static const struct button_mapping button_context_pitchscreen[] = {
|
||||
|
||||
{ ACTION_PS_INC_SMALL, BUTTON_VOL_UP|BUTTON_REL, BUTTON_NONE },
|
||||
{ ACTION_PS_DEC_SMALL, BUTTON_VOL_DOWN|BUTTON_REL, BUTTON_NONE },
|
||||
{ ACTION_PS_EXIT, BUTTON_POWER, BUTTON_NONE },
|
||||
static const struct button_mapping button_context_pitchscreen[] =
|
||||
{
|
||||
{ ACTION_PS_INC_SMALL, BUTTON_VOL_UP | BUTTON_REL, BUTTON_NONE },
|
||||
{ ACTION_PS_DEC_SMALL, BUTTON_VOL_DOWN |BUTTON_REL, BUTTON_NONE },
|
||||
{ ACTION_PS_EXIT, BUTTON_POWER, BUTTON_NONE },
|
||||
|
||||
LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_STD)
|
||||
}; /* button_context_pitchcreen */
|
||||
};
|
||||
|
||||
|
||||
static const struct button_mapping button_context_radio[] = {
|
||||
static const struct button_mapping button_context_radio[] =
|
||||
{
|
||||
LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_SETTINGS)
|
||||
}; /* button_context_radio */
|
||||
};
|
||||
|
||||
|
||||
const struct button_mapping* target_get_context_mapping(int context)
|
||||
{
|
||||
switch (context)
|
||||
switch(context)
|
||||
{
|
||||
case CONTEXT_STD:
|
||||
return button_context_standard;
|
||||
case CONTEXT_WPS:
|
||||
return button_context_wps;
|
||||
|
||||
case CONTEXT_LIST:
|
||||
return button_context_list;
|
||||
case CONTEXT_MAINMENU:
|
||||
return button_context_mainmenu;
|
||||
case CONTEXT_STD: { return button_context_standard; }
|
||||
case CONTEXT_WPS: { return button_context_wps; }
|
||||
case CONTEXT_LIST: { return button_context_list; }
|
||||
case CONTEXT_MAINMENU: { return button_context_mainmenu; }
|
||||
case CONTEXT_CUSTOM | CONTEXT_TREE: { return button_context_tree; }
|
||||
case CONTEXT_SETTINGS: { return button_context_settings; }
|
||||
case CONTEXT_SETTINGS_COLOURCHOOSER: { return button_context_colorchooser; }
|
||||
case CONTEXT_SETTINGS_EQ: { return button_context_eq; }
|
||||
case CONTEXT_SETTINGS_TIME: { return button_context_time; }
|
||||
case CONTEXT_KEYBOARD: { return button_context_keyboard; }
|
||||
case CONTEXT_FM: { return button_context_radio; }
|
||||
case CONTEXT_BOOKMARKSCREEN: { return button_context_bmark; }
|
||||
case CONTEXT_QUICKSCREEN: { return button_context_quickscreen; }
|
||||
case CONTEXT_PITCHSCREEN: { return button_context_pitchscreen; }
|
||||
case CONTEXT_CUSTOM | CONTEXT_SETTINGS:
|
||||
case CONTEXT_SETTINGS_RECTRIGGER: { return button_context_settings_right_is_inc; }
|
||||
case CONTEXT_TREE:
|
||||
if (global_settings.hold_lr_for_scroll_in_list)
|
||||
{
|
||||
if(global_settings.hold_lr_for_scroll_in_list)
|
||||
{
|
||||
return button_context_listtree_scroll_without_combo;
|
||||
else
|
||||
return button_context_listtree_scroll_with_combo;
|
||||
case CONTEXT_CUSTOM|CONTEXT_TREE:
|
||||
return button_context_tree;
|
||||
|
||||
case CONTEXT_SETTINGS:
|
||||
return button_context_settings;
|
||||
case CONTEXT_CUSTOM|CONTEXT_SETTINGS:
|
||||
case CONTEXT_SETTINGS_RECTRIGGER:
|
||||
return button_context_settings_right_is_inc;
|
||||
|
||||
case CONTEXT_SETTINGS_COLOURCHOOSER:
|
||||
return button_context_colorchooser;
|
||||
case CONTEXT_SETTINGS_EQ:
|
||||
return button_context_eq;
|
||||
|
||||
case CONTEXT_SETTINGS_TIME:
|
||||
return button_context_time;
|
||||
|
||||
case CONTEXT_KEYBOARD:
|
||||
return button_context_keyboard;
|
||||
|
||||
case CONTEXT_FM:
|
||||
return button_context_radio;
|
||||
case CONTEXT_BOOKMARKSCREEN:
|
||||
return button_context_bmark;
|
||||
case CONTEXT_QUICKSCREEN:
|
||||
return button_context_quickscreen;
|
||||
case CONTEXT_PITCHSCREEN:
|
||||
return button_context_pitchscreen;
|
||||
}
|
||||
return button_context_listtree_scroll_with_combo;
|
||||
}
|
||||
}
|
||||
|
||||
return button_context_standard;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -171,6 +171,13 @@ static const struct button_mapping button_context_settings_right_is_inc[] = {
|
|||
LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_CUSTOM2|CONTEXT_CUSTOM|CONTEXT_SETTINGS)
|
||||
}; /* button_context_settingsgraphical */
|
||||
|
||||
|
||||
static const struct button_mapping button_context_mainmenu[] =
|
||||
{
|
||||
LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_CUSTOM2 | CONTEXT_MAINMENU)
|
||||
};
|
||||
|
||||
|
||||
static const struct button_mapping button_context_yesno[] = {
|
||||
{ ACTION_YESNO_ACCEPT, BUTTON_TOPRIGHT, BUTTON_NONE },
|
||||
{ ACTION_YESNO_ACCEPT, BUTTON_BOTTOMLEFT, BUTTON_NONE },
|
||||
|
|
@ -389,7 +396,12 @@ const struct button_mapping* get_context_mapping(int context)
|
|||
|
||||
case CONTEXT_LIST:
|
||||
return button_context_list;
|
||||
|
||||
case CONTEXT_MAINMENU:
|
||||
{
|
||||
return button_context_mainmenu;
|
||||
}
|
||||
|
||||
case CONTEXT_TREE:
|
||||
if (global_settings.hold_lr_for_scroll_in_list)
|
||||
return button_context_listtree_scroll_without_combo;
|
||||
|
|
|
|||
|
|
@ -37,7 +37,9 @@
|
|||
#include "menu.h"
|
||||
#include "usb.h"
|
||||
#include "powermgmt.h"
|
||||
#if !defined(DX50) && !defined(DX90)
|
||||
#include "adc.h"
|
||||
#endif
|
||||
#include "i2c.h"
|
||||
#ifndef DEBUG
|
||||
#include "serial.h"
|
||||
|
|
@ -340,7 +342,7 @@ static void init(void)
|
|||
#ifdef SIMULATOR
|
||||
sim_tasks_init();
|
||||
#endif
|
||||
#if (CONFIG_PLATFORM & PLATFORM_ANDROID) && !defined(DX50) && !defined(DX90)
|
||||
#if (CONFIG_PLATFORM & PLATFORM_ANDROID)
|
||||
notification_init();
|
||||
#endif
|
||||
lang_init(core_language_builtin, language_strings,
|
||||
|
|
|
|||
|
|
@ -1961,7 +1961,7 @@ static int audio_finish_load_track(struct track_info *info)
|
|||
resume_rewind_adjust_progress(track_id3, &elapsed, &offset);
|
||||
|
||||
logf("%s: Set resume for %s to %lu %lX", __func__,
|
||||
id3->title, elapsed, offset);
|
||||
track_id3->title, elapsed, offset);
|
||||
|
||||
enum data_type audiotype = rbcodec_format_is_atomic(track_id3->codectype) ?
|
||||
TYPE_ATOMIC_AUDIO : TYPE_PACKET_AUDIO;
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
#ifndef HAVE_TOUCHSCREEN
|
||||
#if !defined(HAVE_TOUCHSCREEN) || defined(DX50) || defined(DX90)
|
||||
/* In devices running RockBox as an application, but having a keypad */
|
||||
#include "SOURCES"
|
||||
#else
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
#ifndef HAVE_TOUCHSCREEN
|
||||
#if !defined(HAVE_TOUCHSCREEN) || defined(DX50) || defined(DX90)
|
||||
/* This is for devices having a keypad, running RockBox as an application */
|
||||
#include "SUBDIRS"
|
||||
|
||||
|
|
|
|||
|
|
@ -262,10 +262,10 @@
|
|||
#define BATTERY_OFF_TXT "Power"
|
||||
|
||||
#elif CONFIG_KEYPAD == DX50_PAD
|
||||
#define BATTERY_ON BUTTON_PLAY
|
||||
#define BATTERY_OFF BUTTON_POWER
|
||||
#define BATTERY_OFF_TXT "POWER"
|
||||
#define BATTERY_ON_TXT "PLAY - start"
|
||||
#define BATTERY_ON BUTTON_PLAY
|
||||
#define BATTERY_OFF BUTTON_POWER_LONG
|
||||
#define BATTERY_OFF_TXT "Power Long"
|
||||
#define BATTERY_ON_TXT "Play - start"
|
||||
|
||||
#else
|
||||
#error No keymap defined!
|
||||
|
|
|
|||
|
|
@ -11,11 +11,9 @@
|
|||
is_app_build =
|
||||
ifdef APP_TYPE
|
||||
ifneq ($(APP_TYPE),sdl-sim)
|
||||
ifeq (,$(findstring standalone, $(APP_TYPE)))
|
||||
is_app_build = yes
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
|
||||
ifdef is_app_build
|
||||
PLUGINS_SRC = $(call preprocess, $(APPSDIR)/plugins/SOURCES.app_build)
|
||||
|
|
|
|||
|
|
@ -792,13 +792,13 @@ void root_menu(void)
|
|||
case GO_TO_ROOT:
|
||||
if (last_screen != GO_TO_ROOT)
|
||||
selected = get_selection(last_screen);
|
||||
#if (CONFIG_PLATFORM&PLATFORM_ANDROID) && !defined(DX50) && !defined(DX90)
|
||||
#if (CONFIG_PLATFORM&PLATFORM_ANDROID)
|
||||
/* When we are in the main menu we want the hardware BACK
|
||||
* button to be handled by Android instead of rockbox */
|
||||
android_ignore_back_button(true);
|
||||
#endif
|
||||
next_screen = do_menu(&root_menu_, &selected, NULL, false);
|
||||
#if (CONFIG_PLATFORM&PLATFORM_ANDROID) && !defined(DX50) && !defined(DX90)
|
||||
#if (CONFIG_PLATFORM&PLATFORM_ANDROID)
|
||||
android_ignore_back_button(false);
|
||||
#endif
|
||||
if (next_screen != GO_TO_PREVIOUS)
|
||||
|
|
|
|||
|
|
@ -78,7 +78,7 @@ static void get_scrobbler_filename(char *path, size_t size)
|
|||
used = snprintf(path, size, "/home/user/MyDocs/%s", BASE_FILENAME);
|
||||
#elif (CONFIG_PLATFORM & PLATFORM_ANDROID)
|
||||
used = snprintf(path, size, "/sdcard/%s", BASE_FILENAME);
|
||||
#elif defined (SAMSUNG_YPR0)
|
||||
#elif defined (SAMSUNG_YPR0) || defined(DX50) || defined(DX90)
|
||||
used = snprintf(path, size, "%s/%s", HOME_DIR, BASE_FILENAME);
|
||||
#else /* SDL/unknown RaaA build */
|
||||
used = snprintf(path, size, "%s/%s", ROCKBOX_DIR, BASE_FILENAME);
|
||||
|
|
|
|||
|
|
@ -291,7 +291,7 @@ struct user_settings
|
|||
/* audio settings */
|
||||
|
||||
int volume; /* audio output volume in decibels range depends on the dac */
|
||||
int balance; /* stereo balance: 0-100 0=left 50=bal 100=right */
|
||||
int balance; /* stereo balance: -100 - +100 -100=left 0=bal +100=right */
|
||||
int bass; /* bass boost/cut in decibels */
|
||||
int treble; /* treble boost/cut in decibels */
|
||||
int channel_config; /* Stereo, Mono, Custom, Mono left, Mono right, Karaoke */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue