The games now use the error(3) function.
This commit is contained in:
parent
fda16f93ac
commit
d9205a59df
|
@ -10,6 +10,7 @@
|
||||||
#include <fcntl.h>
|
#include <fcntl.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
|
#include <error.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
using namespace Maxsi;
|
using namespace Maxsi;
|
||||||
|
@ -47,7 +48,7 @@ bool FlushVGA()
|
||||||
int Init()
|
int Init()
|
||||||
{
|
{
|
||||||
vgafd = open("/dev/vga", O_RDWR);
|
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();
|
Clear();
|
||||||
|
|
||||||
|
|
|
@ -11,6 +11,7 @@
|
||||||
#include <fcntl.h>
|
#include <fcntl.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
|
#include <error.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
using namespace Maxsi;
|
using namespace Maxsi;
|
||||||
|
@ -61,7 +62,7 @@ bool FlushVGA()
|
||||||
int Init()
|
int Init()
|
||||||
{
|
{
|
||||||
vgafd = open("/dev/vga", O_RDWR);
|
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();
|
Reset();
|
||||||
|
|
||||||
|
|
|
@ -9,6 +9,7 @@
|
||||||
#include <fcntl.h>
|
#include <fcntl.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
|
#include <error.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
using namespace Maxsi;
|
using namespace Maxsi;
|
||||||
|
@ -81,7 +82,7 @@ bool FlushVGA()
|
||||||
int Init()
|
int Init()
|
||||||
{
|
{
|
||||||
vgafd = open("/dev/vga", O_RDWR);
|
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();
|
Reset();
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue