Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/ClusterM/nes2wii.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexey 'Cluster' Avdyukhin <clusterrr@clusterrr.com>2014-01-29 06:24:32 +0400
committerAlexey 'Cluster' Avdyukhin <clusterrr@clusterrr.com>2014-01-29 06:24:32 +0400
commitcb829d8e4e6e5217076a0eafab2097e857017945 (patch)
tree7ef30ff2bfac9bb22027c73b5d580a1820772704
parent28f853d626c2e244ba08b8953187c64436c0fe1f (diff)
SMD timing fix
-rw-r--r--main.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/main.c b/main.c
index cda2dbc..69edaad 100644
--- a/main.c
+++ b/main.c
@@ -351,6 +351,7 @@ int main()
}
#endif
#ifdef SMD_ENABLED
+ char smd_present = 0;
for (c = 0; c < 4; c++)
{
uint16_t smd_gamepad_data = get_smd_gamepad();
@@ -360,6 +361,7 @@ int main()
{
if (!((smd_gamepad_data>>b)&1))
{
+ smd_present = 1; // Coontroller is connected
switch (b)
{
case 0: // Up
@@ -440,6 +442,7 @@ int main()
}
}
}
+ if (smd_present) _delay_us(750); // Need to wait!
#endif
but_dat[0] += x;
but_dat[1] += y;