aboutsummaryrefslogtreecommitdiff
path: root/apps/chess.c
diff options
context:
space:
mode:
authorMarvin Borner2021-04-01 18:07:36 +0200
committerMarvin Borner2021-04-01 18:07:36 +0200
commit4c168fb34c15a1b8981abef7ccef1542a6fb05ca (patch)
tree306604c6fab7b2d914aaa125e232696a040ed141 /apps/chess.c
parent0d16626ad13677451970758ad7299540957bd89a (diff)
Started WM improvements
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];