termux-packages/x11-packages/sdl/SDL-1.2.15_src_video_fbcon_...

53 lines
1.7 KiB
Diff

diff -uNr SDL-1.2.15/src/video/fbcon/SDL_fbvideo.c SDL-1.2.15.mod/src/video/fbcon/SDL_fbvideo.c
--- SDL-1.2.15/src/video/fbcon/SDL_fbvideo.c 2012-01-19 08:30:06.000000000 +0200
+++ SDL-1.2.15.mod/src/video/fbcon/SDL_fbvideo.c 2017-12-08 17:33:10.990346779 +0200
@@ -27,6 +27,7 @@
#include <stdio.h>
#include <fcntl.h>
#include <unistd.h>
+#include <sys/syscall.h>
#include <sys/ioctl.h>
#include <sys/mman.h>
@@ -52,16 +53,15 @@
#if defined(i386) && defined(FB_TYPE_VGA_PLANES)
#define VGA16_FBCON_SUPPORT
-#include <sys/io.h> /* For ioperm() */
#ifndef FB_AUX_VGA_PLANES_VGA4
#define FB_AUX_VGA_PLANES_VGA4 0
#endif
-/*
+
static inline void outb (unsigned char value, unsigned short port)
{
__asm__ __volatile__ ("outb %b0,%w1"::"a" (value), "Nd" (port));
-}
-*/
+}
+
#endif /* FB_TYPE_VGA_PLANES */
/* A list of video resolutions that we query for (sorted largest to smallest) */
@@ -541,7 +541,7 @@
case FB_TYPE_VGA_PLANES:
/* VGA16 is supported, but that's it */
if ( finfo.type_aux == FB_AUX_VGA_PLANES_VGA4 ) {
- if ( ioperm(0x3b4, 0x3df - 0x3b4 + 1, 1) < 0 ) {
+ if ( syscall(__NR_ioperm, 0x3b4, 0x3df - 0x3b4 + 1, 1) < 0 ) {
SDL_SetError("No I/O port permissions");
FB_VideoQuit(this);
return(-1);
diff -uNr SDL-1.2.15/src/video/fbcon/SDL_fbvideo.c SDL-1.2.15.mod/src/video/fbcon/SDL_fbvideo.c
--- SDL-1.2.15/src/video/fbcon/SDL_fbvideo.c 2012-01-19 08:30:06.000000000 +0200
+++ SDL-1.2.15.mod/src/video/fbcon/SDL_fbvideo.c 2017-11-26 00:29:03.621353611 +0200
@@ -280,7 +280,7 @@
FB_Available, FB_CreateDevice
};
-#define FB_MODES_DB "/etc/fb.modes"
+#define FB_MODES_DB "/data/data/com.termux/files/usr/etc/fb.modes"
static int read_fbmodes_line(FILE*f, char* line, int length)
{