Remove filestream dependency

This causes issues in #5664
This commit is contained in:
Alcaro 2017-11-13 09:45:48 +00:00 committed by GitHub
parent 5879e551a5
commit 58bae8456a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 11 additions and 15 deletions

View File

@ -22,8 +22,6 @@
#include <linux/fb.h>
#include <linux/vt.h>
#include <streams/file_stream.h>
#ifdef HAVE_CONFIG_H
#include "../../config.h"
#endif
@ -56,8 +54,7 @@ static enum gfx_ctx_api mali_api = GFX_CTX_NONE;
static void gfx_ctx_mali_fbdev_destroy(void *data)
{
int fb;
RFILE *fd = NULL;
int fd;
mali_ctx_data_t *mali = (mali_ctx_data_t*)data;
if (mali)
@ -71,12 +68,11 @@ static void gfx_ctx_mali_fbdev_destroy(void *data)
}
/* Clear framebuffer and set cursor on again */
fd = filestream_open("/dev/tty", RFILE_MODE_READ_WRITE, -1);
fb = filestream_get_fd(fd);
fd = open("/dev/tty", O_RDWR);
ioctl(fd, VT_ACTIVATE, 5);
ioctl(fd, VT_ACTIVATE, 1);
close(fd);
ioctl(fb, VT_ACTIVATE,5);
ioctl(fb, VT_ACTIVATE,1);
filestream_close(fd);
system("setterm -cursor on");
}
@ -160,16 +156,16 @@ static bool gfx_ctx_mali_fbdev_set_video_mode(void *data,
EGL_NONE
};
mali_ctx_data_t *mali = (mali_ctx_data_t*)data;
RFILE *fd = filestream_open("/dev/fb0", RFILE_MODE_READ_WRITE, -1);
int fb = filestream_get_fd(fd);
int fd = open("/dev/fb0", O_RDWR);
if (ioctl(fb, FBIOGET_VSCREENINFO, &vinfo) < 0)
if (ioctl(fd, FBIOGET_VSCREENINFO, &vinfo) < 0)
{
RARCH_ERR("Error obtaining framebuffer info.\n");
goto error;
}
filestream_close(fd);
close(fd);
fd = -1;
width = vinfo.xres;
height = vinfo.yres;
@ -196,8 +192,8 @@ static bool gfx_ctx_mali_fbdev_set_video_mode(void *data,
return true;
error:
if (fd)
filestream_close(fd);
if (fd >= 0)
close(fd);
RARCH_ERR("[Mali fbdev]: EGL error: %d.\n", eglGetError());
gfx_ctx_mali_fbdev_destroy(data);
return false;