From 0a9f2cc7555cf991945c5c28b71f6004d3fba42f Mon Sep 17 00:00:00 2001 From: davidovski Date: Sun, 18 Jul 2021 00:48:40 +0100 Subject: reset on menu --- src/main.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/main.c b/src/main.c index d1e7ede..91ec117 100644 --- a/src/main.c +++ b/src/main.c @@ -14,6 +14,7 @@ // You should have received a copy of the GNU General Public License // along with this program. If not, see . +#include #include #include #include @@ -39,6 +40,8 @@ int h = 16; int w = 2; int main(void) { + gint_setrestart(1); + int tick = 1; bool game = true; while (game) { @@ -55,7 +58,7 @@ int main(void) pollevent(); if (keydown(KEY_EXIT)) - game = false; + gint_osmenu(); if (keydown(KEY_1) && p1 + h < 64) p1 += 1; @@ -113,6 +116,7 @@ int main(void) tick++; sleep_us(20*1000); } - game = true; + + return 0; } -- cgit v1.2.1