Mercurial > vba-clojure
diff src/sdl/SDL.cpp @ 55:719d910c90f8
can now send button presses to the simulated gameboy
author | Robert McIntyre <rlm@mit.edu> |
---|---|
date | Wed, 07 Mar 2012 13:24:32 -0600 |
parents | 9d0ec2614443 |
children | 43d4fb2a6fc2 |
line wrap: on
line diff
1.1 --- a/src/sdl/SDL.cpp Wed Mar 07 12:50:44 2012 -0600 1.2 +++ b/src/sdl/SDL.cpp Wed Mar 07 13:24:32 2012 -0600 1.3 @@ -2090,13 +2090,17 @@ 1.4 SDL_Delay(500); 1.5 } 1.6 sdlPollEvents(); 1.7 - if(mouseCounter) { 1.8 - mouseCounter--; 1.9 - if(mouseCounter == 0) 1.10 - SDL_ShowCursor(SDL_DISABLE); 1.11 - } 1.12 + SDL_ShowCursor(SDL_DISABLE); 1.13 } 1.14 1.15 +void step(int keymask){ 1.16 + currentButtons[0] = keymask; 1.17 + step(); 1.18 + currentButtons[0] = keymask; 1.19 +} 1.20 + 1.21 + 1.22 + 1.23 int main(int argc, char **argv) 1.24 { 1.25 fprintf(stderr, "VisualBoyAdvance version %s [SDL]\n", PACKAGE_VERSION);