diff options
author | Denys Dmytriyenko <denis@denix.org> | 2009-03-17 14:32:59 -0400 |
---|---|---|
committer | Denys Dmytriyenko <denis@denix.org> | 2009-03-17 14:32:59 -0400 |
commit | 709c4d66e0b107ca606941b988bad717c0b45d9b (patch) | |
tree | 37ee08b1eb308f3b2b6426d5793545c38396b838 /recipes/frodo/frodo-4.1b/frodo-joystick-4state.diff | |
parent | fa6cd5a3b993f16c27de4ff82b42684516d433ba (diff) |
rename packages/ to recipes/ per earlier agreement
See links below for more details:
http://thread.gmane.org/gmane.comp.handhelds.openembedded/21326
http://thread.gmane.org/gmane.comp.handhelds.openembedded/21816
Signed-off-by: Denys Dmytriyenko <denis@denix.org>
Acked-by: Mike Westerhof <mwester@dls.net>
Acked-by: Philip Balister <philip@balister.org>
Acked-by: Khem Raj <raj.khem@gmail.com>
Acked-by: Marcin Juszkiewicz <hrw@openembedded.org>
Acked-by: Koen Kooi <koen@openembedded.org>
Acked-by: Frans Meulenbroeks <fransmeulenbroeks@gmail.com>
Diffstat (limited to 'recipes/frodo/frodo-4.1b/frodo-joystick-4state.diff')
-rw-r--r-- | recipes/frodo/frodo-4.1b/frodo-joystick-4state.diff | 77 |
1 files changed, 77 insertions, 0 deletions
diff --git a/recipes/frodo/frodo-4.1b/frodo-joystick-4state.diff b/recipes/frodo/frodo-4.1b/frodo-joystick-4state.diff new file mode 100644 index 0000000000..3234736d8b --- /dev/null +++ b/recipes/frodo/frodo-4.1b/frodo-joystick-4state.diff @@ -0,0 +1,77 @@ +diff -u Src/C64_Qtopia.i Src/C64_Qtopia.i +--- Src/C64_Qtopia.i 2004-07-11 09:28:05.000000000 +0200 ++++ Src/C64_Qtopia.i 2004-07-11 09:30:20.000000000 +0200 +@@ -246,10 +246,16 @@ + } + + // Joystick keyboard emulation +- if (TheDisplay->NumLock()) ++ if (TheDisplay->NumLock() == 1) + TheCIA1->Joystick1 &= joykey; + else ++ if (TheDisplay->NumLock() == 2) + TheCIA1->Joystick2 &= joykey; ++ else ++ if (TheDisplay->NumLock() == 3) { ++ TheCIA1->Joystick1 &= joykey; ++ TheCIA1->Joystick2 &= joykey; ++ } + + // Count TOD clocks + TheCIA1->CountTOD(); +diff -u Src/Display.h Src/Display.h +--- Src/Display.h 2002-01-02 22:31:34.000000000 +0100 ++++ Src/Display.h 2004-07-11 09:30:43.000000000 +0200 +@@ -59,7 +59,7 @@ + #else + void PollKeyboard(uint8 *key_matrix, uint8 *rev_matrix, uint8 *joystick); + #endif +- bool NumLock(void); ++ int NumLock(void); + void InitColors(uint8 *colors); + void NewPrefs(Prefs *prefs); + +diff -u Src/Display_QtopiaSDL.i Src/Display_QtopiaSDL.i +--- Src/Display_QtopiaSDL.i 2004-07-11 09:28:06.000000000 +0200 ++++ Src/Display_QtopiaSDL.i 2004-07-11 09:31:47.000000000 +0200 +@@ -17,7 +17,7 @@ + // Display surface + static SDL_Surface *screen = NULL; + +-// Mode of Joystick emulation. 0 = none, 1 = Joyport 1, 2 = Joyport 2 ++// Mode of Joystick emulation. 0 = none, 1 = Joyport 1, 2 = Joyport 2, 3 = both + static short joy_emu = 0; + + // Keyboard +@@ -210,6 +210,8 @@ + draw_string(screen, DISPLAY_X * 4/5 + 2, (screen->h - 17) + 4, "1", black, fill_gray); + else if (joy_emu == 2) + draw_string(screen, DISPLAY_X * 4/5 + 2, (screen->h - 17) + 4, "2", black, fill_gray); ++ else if (joy_emu == 3) ++ draw_string(screen, DISPLAY_X * 4/5 + 2, (screen->h - 17) + 4, "3", black, fill_gray); + draw_string(screen, 24, (screen->h - 17) + 4, speedometer_string, black, fill_gray); + + // Update display +@@ -500,7 +502,7 @@ + // fprintf(stderr, "SDL-Key: %d\n", event.key.keysym.sym); + if (tab_pressed && event.key.keysym.sym == SDLK_j) + { +- if (joy_emu < 2) ++ if (joy_emu < 3) + joy_emu++; + else + joy_emu = 0; +@@ -573,11 +575,9 @@ + * Check if NumLock is down (for switching the joystick keyboard emulation) + */ + +-bool C64Display::NumLock(void) ++int C64Display::NumLock(void) + { +- if (joy_emu == 2) +- return true; +- return false; ++ return joy_emu; + } + + |