summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/cetris.c6
-rw-r--r--lib/timer.c2
2 files changed, 3 insertions, 5 deletions
diff --git a/lib/cetris.c b/lib/cetris.c
index 288b82b..3bff1f1 100644
--- a/lib/cetris.c
+++ b/lib/cetris.c
@@ -403,9 +403,9 @@ void update_board(cetris_game *g) {
CETRIS_EXPORT void hold_piece(cetris_game *g) {
if (g->current.held) return;
if (g->piece_held) {
- tetrimino tmp = g->current;
+ uint8_t tmp = g->current.t;
g->current = g->held;
- g->held = tmp;
+ set_piece(g, tmp, &g->held);
} else {
set_piece(g, g->current.t, &g->held);
g->piece_held = true;
@@ -582,5 +582,3 @@ CETRIS_EXPORT bool update_game_tick(cetris_game *g) {
return true;
}
-
-
diff --git a/lib/timer.c b/lib/timer.c
index 0a1504c..8b7b221 100644
--- a/lib/timer.c
+++ b/lib/timer.c
@@ -1,7 +1,7 @@
#include <cetris.h>
#ifdef _WIN32
-#include <window.h>
+#include <windows.h>
#if CETRIS_HI_RES
DWORD WINAPI cetris_game_loop(void* data) {