Fix most reds, I have no idea what's wrong with the gigabeats (yet).

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26619 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Thomas Martitz 2010-06-06 10:27:14 +00:00
parent 6029502468
commit 19ac3453e0
8 changed files with 40 additions and 34 deletions

View file

@ -228,6 +228,30 @@ static void button_event(int key, bool pressed)
return; return;
#endif #endif
#if defined(IRIVER_H100_SERIES) || defined (IRIVER_H300_SERIES)
case SDLK_t:
if(pressed)
switch(_remote_type)
{
case REMOTETYPE_UNPLUGGED:
_remote_type=REMOTETYPE_H100_LCD;
DEBUGF("Changed remote type to H100\n");
break;
case REMOTETYPE_H100_LCD:
_remote_type=REMOTETYPE_H300_LCD;
DEBUGF("Changed remote type to H300\n");
break;
case REMOTETYPE_H300_LCD:
_remote_type=REMOTETYPE_H300_NONLCD;
DEBUGF("Changed remote type to H300 NON-LCD\n");
break;
case REMOTETYPE_H300_NONLCD:
_remote_type=REMOTETYPE_UNPLUGGED;
DEBUGF("Changed remote type to none\n");
break;
}
break;
#endif
case SDLK_KP0: case SDLK_KP0:
case SDLK_F5: case SDLK_F5:
if(pressed) if(pressed)
@ -236,9 +260,17 @@ static void button_event(int key, bool pressed)
return; return;
} }
break; break;
#ifdef HAVE_TOUCHSCREEN
case SDLK_F4:
if(pressed)
{
touchscreen_set_mode(touchscreen_get_mode() == TOUCHSCREEN_POINT ? TOUCHSCREEN_BUTTON : TOUCHSCREEN_POINT);
printf("Touchscreen mode: %s\n", touchscreen_get_mode() == TOUCHSCREEN_POINT ? "TOUCHSCREEN_POINT" : "TOUCHSCREEN_BUTTON");
}
#endif
default: default:
#ifdef HAVE_TOUCHSCREEN #ifdef HAVE_TOUCHSCREEN
new_btn = key_to_touch(key); new_btn = key_to_touch(key, mouse_coords);
if (!new_btn) if (!new_btn)
#endif #endif
new_btn = key_to_button(key); new_btn = key_to_button(key);

View file

@ -59,7 +59,7 @@ onda-vx747.c
#elif CONFIG_KEYPAD == ONDAVX777_PAD #elif CONFIG_KEYPAD == ONDAVX777_PAD
onda-vx777.c onda-vx777.c
#elif CONFIG_KEYPAD == SAMSUNG_YH_PAD #elif CONFIG_KEYPAD == SAMSUNG_YH_PAD
samsung-yh820_yh925.c samsung-yh820_yh92x.c
#elif CONFIG_KEYPAD == PBELL_VIBE500_PAD #elif CONFIG_KEYPAD == PBELL_VIBE500_PAD
pbell-vibe500.c pbell-vibe500.c
#elif CONFIG_KEYPAD == MPIO_HD200_PAD #elif CONFIG_KEYPAD == MPIO_HD200_PAD

View file

@ -36,7 +36,7 @@ int xy2button( int x, int y);
int key_to_button(int keyboard_button); int key_to_button(int keyboard_button);
#ifdef HAVE_TOUCHSCREEN #ifdef HAVE_TOUCHSCREEN
int key_to_touch(int keyboard_button); int key_to_touch(int keyboard_button, unsigned int mouse_coords);
#endif #endif
#endif /* __BUTTONMAP_H__ */ #endif /* __BUTTONMAP_H__ */

View file

@ -20,6 +20,10 @@ n/***************************************************************************
****************************************************************************/ ****************************************************************************/
#include <SDL.h>
#include "button.h"
#include "buttonmap.h"
int key_to_button(int keyboard_button) int key_to_button(int keyboard_button)
{ {
int new_btn = BUTTON_NONE; int new_btn = BUTTON_NONE;

View file

@ -19,7 +19,6 @@ n/***************************************************************************
* *
****************************************************************************/ ****************************************************************************/
#include <SDL.h> #include <SDL.h>
#include "button.h" #include "button.h"
#include "buttonmap.h" #include "buttonmap.h"

View file

@ -29,28 +29,6 @@ int key_to_button(int keyboard_button)
int new_btn = BUTTON_NONE; int new_btn = BUTTON_NONE;
switch (keyboard_button) switch (keyboard_button)
{ {
case SDLK_t:
if(pressed)
switch(_remote_type)
{
case REMOTETYPE_UNPLUGGED:
_remote_type=REMOTETYPE_H100_LCD;
DEBUGF("Changed remote type to H100\n");
break;
case REMOTETYPE_H100_LCD:
_remote_type=REMOTETYPE_H300_LCD;
DEBUGF("Changed remote type to H300\n");
break;
case REMOTETYPE_H300_LCD:
_remote_type=REMOTETYPE_H300_NONLCD;
DEBUGF("Changed remote type to H300 NON-LCD\n");
break;
case REMOTETYPE_H300_NONLCD:
_remote_type=REMOTETYPE_UNPLUGGED;
DEBUGF("Changed remote type to none\n");
break;
}
break;
case SDLK_KP4: case SDLK_KP4:
case SDLK_LEFT: case SDLK_LEFT:
new_btn = BUTTON_LEFT; new_btn = BUTTON_LEFT;

View file

@ -26,7 +26,7 @@
#include "buttonmap.h" #include "buttonmap.h"
#include "touchscreen.h" #include "touchscreen.h"
int key_to_touch(int keyboard_button) int key_to_touch(int keyboard_button, unsigned int mouse_coords)
{ {
int new_btn = BUTTON_NONE; int new_btn = BUTTON_NONE;
switch (keyboard_button) switch (keyboard_button)
@ -91,13 +91,6 @@ int key_to_touch(int keyboard_button)
case SDLK_l: case SDLK_l:
new_btn = BUTTON_BOTTOMRIGHT; new_btn = BUTTON_BOTTOMRIGHT;
break; break;
case SDLK_F4:
if(pressed)
{
touchscreen_set_mode(touchscreen_get_mode() == TOUCHSCREEN_POINT ? TOUCHSCREEN_BUTTON : TOUCHSCREEN_POINT);
printf("Touchscreen mode: %s\n", touchscreen_get_mode() == TOUCHSCREEN_POINT ? "TOUCHSCREEN_POINT" : "TOUCHSCREEN_BUTTON");
}
break;
} }
return new_btn; return new_btn;
} }