Commit 79ab3a96ffada4234ef5fe456cf3df919a28b949
1 parent
04491c76
Modified isKeyPressed
Showing
1 changed file
with
3 additions
and
3 deletions
primlib.c
| ... | ... | @@ -26,8 +26,8 @@ static struct RGB colors[COLOR_MAX] = { |
| 26 | 26 | {0, 255, 255}, {255, 0, 255}, {255, 255, 0}, {255, 255, 255}}; |
| 27 | 27 | |
| 28 | 28 | // Screen dimension constants |
| 29 | -const int SCREEN_WIDTH = 640; | |
| 30 | -const int SCREEN_HEIGHT = 480; | |
| 29 | +const int SCREEN_WIDTH = 1200; | |
| 30 | +const int SCREEN_HEIGHT = 700; | |
| 31 | 31 | |
| 32 | 32 | void gfx_pixel(int x, int y, enum color c) { |
| 33 | 33 | pixelRGBA(renderer, x, y, colors[c].r, colors[c].g, colors[c].b, 255); |
| ... | ... | @@ -113,7 +113,7 @@ int gfx_isKeyDown(int key) { |
| 113 | 113 | int numkeys; |
| 114 | 114 | SDL_PumpEvents(); |
| 115 | 115 | SDL_Event event; |
| 116 | - if(SDL_PollEvent(&event)) { | |
| 116 | + while(SDL_PollEvent(&event)) { | |
| 117 | 117 | switch (event.type) { |
| 118 | 118 | case SDL_QUIT: |
| 119 | 119 | exit(3); | ... | ... |