diff --git a/games/conway.cpp b/games/conway.cpp index 2fdc61f7..d47d9254 100644 --- a/games/conway.cpp +++ b/games/conway.cpp @@ -10,6 +10,7 @@ #include #include #include +#include #include using namespace Maxsi; @@ -47,7 +48,7 @@ bool FlushVGA() int Init() { vgafd = open("/dev/vga", O_RDWR); - if ( vgafd < 0 ) { printf("Unable to open vga device: %s", strerror(errno)); return 1; } + if ( vgafd < 0 ) { error(0, errno, "unable to open vga device /dev/vga"); return 1; } Clear(); diff --git a/games/pong.cpp b/games/pong.cpp index 0df5e101..bd3ff331 100644 --- a/games/pong.cpp +++ b/games/pong.cpp @@ -11,6 +11,7 @@ #include #include #include +#include #include using namespace Maxsi; @@ -61,7 +62,7 @@ bool FlushVGA() int Init() { vgafd = open("/dev/vga", O_RDWR); - if ( vgafd < 0 ) { printf("Unable to open vga device: %s", strerror(errno)); return 1; } + if ( vgafd < 0 ) { error(0, errno, "unable to open vga device /dev/vga"); return 1; } Reset(); diff --git a/games/snake.cpp b/games/snake.cpp index de5eab0b..5e638998 100644 --- a/games/snake.cpp +++ b/games/snake.cpp @@ -9,6 +9,7 @@ #include #include #include +#include #include using namespace Maxsi; @@ -81,7 +82,7 @@ bool FlushVGA() int Init() { vgafd = open("/dev/vga", O_RDWR); - if ( vgafd < 0 ) { printf("Unable to open vga device: %s", strerror(errno)); return 1; } + if ( vgafd < 0 ) { error(0, errno, "unable to open vga device /dev/vga"); return 1; } Reset();