mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-11-09 21:22:39 -05:00
mikmod: Decouple the info scrolling from volume setting
This way volume setting will always follow UP/DN conventions but scrolling is reversed as needed. Change-Id: I3fc72c29d78fab46bdf19947a88c02e039bfad51
This commit is contained in:
parent
1dc8a5a8ce
commit
54c5ef60df
1 changed files with 27 additions and 10 deletions
|
|
@ -715,6 +715,23 @@ static void mm_errorhandler(void)
|
||||||
quit = true;
|
quit = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void do_vscroll(int up)
|
||||||
|
{
|
||||||
|
if (up) {
|
||||||
|
if ( textlines-vscroll >= MAX_LINES )
|
||||||
|
{
|
||||||
|
vscroll++;
|
||||||
|
screenupdated = false;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
if ( vscroll > 0 )
|
||||||
|
{
|
||||||
|
vscroll--;
|
||||||
|
screenupdated = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
static int playfile(char* filename)
|
static int playfile(char* filename)
|
||||||
{
|
{
|
||||||
int button;
|
int button;
|
||||||
|
|
@ -793,11 +810,11 @@ static int playfile(char* filename)
|
||||||
case ACTION_WPS_VOLUP:
|
case ACTION_WPS_VOLUP:
|
||||||
if ( display != DISPLAY_INFO )
|
if ( display != DISPLAY_INFO )
|
||||||
{
|
{
|
||||||
if ( textlines-vscroll >= MAX_LINES )
|
#ifdef HAVE_SCROLLWHEEL
|
||||||
{
|
do_vscroll(1);
|
||||||
vscroll++;
|
#else
|
||||||
screenupdated = false;
|
do_vscroll(0);
|
||||||
}
|
#endif
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -807,11 +824,11 @@ static int playfile(char* filename)
|
||||||
case ACTION_WPS_VOLDOWN:
|
case ACTION_WPS_VOLDOWN:
|
||||||
if ( display != DISPLAY_INFO )
|
if ( display != DISPLAY_INFO )
|
||||||
{
|
{
|
||||||
if ( vscroll > 0 )
|
#ifdef HAVE_SCROLLWHEEL
|
||||||
{
|
do_vscroll(0);
|
||||||
vscroll--;
|
#else
|
||||||
screenupdated = false;
|
do_vscroll(1);
|
||||||
}
|
#endif
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue