mirror of
https://github.com/RaySollium99/picodrive.git
synced 2025-09-05 15:27:46 -04:00
fix Wiz timer drift and button name
git-svn-id: file:///home/notaz/opt/svn/PicoDrive@725 be3aeb3a-fb24-0410-a615-afba39da0efa
This commit is contained in:
parent
d737d9e3f5
commit
3328d53bb7
2 changed files with 5 additions and 3 deletions
|
@ -27,7 +27,7 @@ enum { BTN_UP = 0, BTN_LEFT = 2, BTN_DOWN = 4, BTN_RIGHT = 6,
|
|||
BTN_VOL_UP = 23, BTN_VOL_DOWN = 22, BTN_PUSH = 27 };
|
||||
|
||||
static const char * const in_gp2x_prefix = IN_PREFIX;
|
||||
static const char * const in_gp2x_keys[IN_GP2X_NBUTTONS] = {
|
||||
static const char *in_gp2x_keys[IN_GP2X_NBUTTONS] = {
|
||||
[0 ... IN_GP2X_NBUTTONS-1] = NULL,
|
||||
[BTN_UP] = "UP", [BTN_LEFT] = "LEFT", [BTN_DOWN] = "DOWN", [BTN_RIGHT] = "RIGHT",
|
||||
[BTN_START] = "START", [BTN_SELECT] = "SELECT", [BTN_L] = "L", [BTN_R] = "R",
|
||||
|
@ -104,6 +104,7 @@ static void in_gp2x_probe(void)
|
|||
return;
|
||||
}
|
||||
in_gp2x_get_bits = in_gp2x_get_wiz_bits;
|
||||
in_gp2x_keys[BTN_START] = "MENU";
|
||||
break;
|
||||
default:
|
||||
#ifdef FAKE_IN_GP2X
|
||||
|
|
|
@ -219,9 +219,10 @@ unsigned int gp2x_get_ticks_us_(void)
|
|||
|
||||
unsigned int gp2x_get_ticks_ms_(void)
|
||||
{
|
||||
/* approximate /= 1000 */
|
||||
unsigned long long v64;
|
||||
v64 = (unsigned long long)gp2x_get_ticks_us_() * 4195;
|
||||
return v64 >> 22;
|
||||
v64 = (unsigned long long)gp2x_get_ticks_us_() * 4294968;
|
||||
return v64 >> 32;
|
||||
}
|
||||
|
||||
static void timer_cleanup(void)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue