aboutsummaryrefslogtreecommitdiff
path: root/apps/chess.c
diff options
context:
space:
mode:
Diffstat (limited to 'apps/chess.c')
-rw-r--r--apps/chess.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/apps/chess.c b/apps/chess.c
index b4808b9..6670919 100644
--- a/apps/chess.c
+++ b/apps/chess.c
@@ -8,7 +8,7 @@
// Config
#define SIZE 8
-#define TILE 36
+#define TILE 48
#define WHITE_STARTS 1
#define DARK_COLOR 0xff946f51
#define LIGHT_COLOR 0xfff0d9b5
@@ -78,6 +78,9 @@ static void mouseclick(u32 widget_id, vec2 pos)
struct piece *clicked_piece = &tiles[clicked.x][clicked.y];
+ if (vec2_eq(clicked, selected))
+ return;
+
if (selected.x != (u32)-1) {
struct piece *selected_piece = &tiles[selected.x][selected.y];