summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--hdaps-tux.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/hdaps-tux.c b/hdaps-tux.c
index 1856040..9228883 100644
--- a/hdaps-tux.c
+++ b/hdaps-tux.c
@@ -99,15 +99,15 @@ int main(int argc, char *argv[])
SDL_SetColorKey(image, SDL_SRCCOLORKEY, SDL_MapRGB(image->format, 255, 255, 255));
/* Calculate and set initial position of tux (centre of the window) */
- tuxX = (W_WIDTH / 2) - (image->w / 2);
- tuxY = (W_HEIGHT / 2) - (image->h / 2);
+ tuxX = (W_WIDTH - image->w) / 2;
+ tuxY = (W_HEIGHT - image->h) / 2;
/* Get the hdaps position so we have something to start from */
get_pos(&hdapsX, &hdapsY);
while (!done) {
while (SDL_PollEvent(&event)) {
- switch(event.type) {
+ switch (event.type) {
case SDL_QUIT:
done = 1;
break;