forked from len0rd/rockbox
made get_button a little slower to get a more realistic control
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@1305 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
c9b642b821
commit
43f733b85b
3 changed files with 5 additions and 1 deletions
|
@ -22,6 +22,7 @@
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
#include "sh7034.h"
|
#include "sh7034.h"
|
||||||
#include "button.h"
|
#include "button.h"
|
||||||
|
#include "kernel.h"
|
||||||
|
|
||||||
#define KEY(k) HIBYTE(GetKeyState (k))
|
#define KEY(k) HIBYTE(GetKeyState (k))
|
||||||
|
|
||||||
|
@ -34,6 +35,7 @@ void button_init(void)
|
||||||
|
|
||||||
int button_get(bool block)
|
int button_get(bool block)
|
||||||
{
|
{
|
||||||
|
int func_call = current_tick;
|
||||||
|
|
||||||
int btn = 0;
|
int btn = 0;
|
||||||
do
|
do
|
||||||
|
@ -87,5 +89,7 @@ int button_get(bool block)
|
||||||
}
|
}
|
||||||
while (btn == 0 && block);
|
while (btn == 0 && block);
|
||||||
|
|
||||||
|
Sleep (50);
|
||||||
|
|
||||||
return btn;
|
return btn;
|
||||||
}
|
}
|
Binary file not shown.
|
@ -107,7 +107,7 @@
|
||||||
Name="Source Files"
|
Name="Source Files"
|
||||||
Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm">
|
Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm">
|
||||||
<File
|
<File
|
||||||
RelativePath="..\..\firmware\backlight.c">
|
RelativePath="backlight-win32.c">
|
||||||
</File>
|
</File>
|
||||||
<File
|
<File
|
||||||
RelativePath="..\..\apps\recorder\bmp.c">
|
RelativePath="..\..\apps\recorder\bmp.c">
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue