The games now use the error(3) function.

This commit is contained in:
Jonas 'Sortie' Termansen 2011-12-04 15:04:06 +01:00
parent fda16f93ac
commit d9205a59df
3 changed files with 6 additions and 3 deletions

View File

@ -10,6 +10,7 @@
#include <fcntl.h>
#include <unistd.h>
#include <errno.h>
#include <error.h>
#include <string.h>
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();

View File

@ -11,6 +11,7 @@
#include <fcntl.h>
#include <unistd.h>
#include <errno.h>
#include <error.h>
#include <string.h>
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();

View File

@ -9,6 +9,7 @@
#include <fcntl.h>
#include <unistd.h>
#include <errno.h>
#include <error.h>
#include <string.h>
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();