diff options
author | Koen Kooi <koen@openembedded.org> | 2005-06-30 08:19:37 +0000 |
---|---|---|
committer | OpenEmbedded Project <openembedded-devel@lists.openembedded.org> | 2005-06-30 08:19:37 +0000 |
commit | c8e5702127e507e82e6f68a4b8c546803accea9d (patch) | |
tree | 00583491f40ecc640f2b28452af995e3a63a09d7 /packages/frodo/frodo-4.1b/frodo-joystick-4state.diff | |
parent | 87ec8ca4d2e2eb4d1c1e1e1a6b46a395d56805b9 (diff) |
import clean BK tree at cset 1.3670
Diffstat (limited to 'packages/frodo/frodo-4.1b/frodo-joystick-4state.diff')
-rw-r--r-- | packages/frodo/frodo-4.1b/frodo-joystick-4state.diff | 77 |
1 files changed, 77 insertions, 0 deletions
diff --git a/packages/frodo/frodo-4.1b/frodo-joystick-4state.diff b/packages/frodo/frodo-4.1b/frodo-joystick-4state.diff index e69de29bb2..3234736d8b 100644 --- a/packages/frodo/frodo-4.1b/frodo-joystick-4state.diff +++ b/packages/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; + } + + |