From 362a05c08b95043fe270826d0077558a19dc73bd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miloslav=20=C4=8C=C3=AD=C5=BE?= Date: Sat, 10 Oct 2020 16:29:11 +0200 Subject: [PATCH] Update build script --- game.h | 2 +- main_terminal.c | 5 ++++- make.sh | 2 +- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/game.h b/game.h index 280409a..422ad2e 100755 --- a/game.h +++ b/game.h @@ -67,7 +67,7 @@ #endif #ifndef SFG_CPU_LOAD - #define SFG_CPU_LOAD(percent) ; ///< Can be redefined to check CPU load in %. + #define SFG_CPU_LOAD(percent) {} ///< Can be redefined to check CPU load in %. #endif /** diff --git a/main_terminal.c b/main_terminal.c index 8e7ec91..c507f54 100644 --- a/main_terminal.c +++ b/main_terminal.c @@ -5,6 +5,8 @@ priviledges (sudo) to work! This frontend is more of an experiment, don't expect it to work perfectly and everywhere. + Needs to be run with sudo. + by Miloslav Ciz (drummyfish), 2019 Released under CC0 1.0 (https://creativecommons.org/publicdomain/zero/1.0/) @@ -138,7 +140,8 @@ int main() timeStart = getTime(); - devFile = open("/dev/input/event0", O_RDONLY); + devFile = open("/dev/input/event0",O_RDONLY); + // ^ replace with your specific keyboard file fcntl(devFile, F_SETFL, O_NONBLOCK); diff --git a/make.sh b/make.sh index 4b13378..b80a189 100755 --- a/make.sh +++ b/make.sh @@ -48,7 +48,7 @@ elif [ $1 == "terminal" ]; then echo ${COMMAND} - ${COMMAND} && ./game + ${COMMAND} && sudo ./game elif [ $1 == "pokitto" ]; then # Pokitto build, requires: # - PokittoLib, in this folder create a symlink named "PokittoLib" to the