summaryrefslogtreecommitdiffstats
path: root/linux/vbelib.c
diff options
context:
space:
mode:
authornick <nick@b3059339-0415-0410-9bf9-f77b7e298cf2>2001-10-23 09:31:53 +0000
committernick <nick@b3059339-0415-0410-9bf9-f77b7e298cf2>2001-10-23 09:31:53 +0000
commit81751cdcafd6acc906057a403c0ca0be1e5a09cf (patch)
treedce94daa324103a0776d4428cd1c7c6e0709b8a2 /linux/vbelib.c
parentbde620379c21b3be20303d743343d1dbd0212f37 (diff)
downloadmpv-81751cdcafd6acc906057a403c0ca0be1e5a09cf.tar.bz2
mpv-81751cdcafd6acc906057a403c0ca0be1e5a09cf.tar.xz
Title support
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@2411 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'linux/vbelib.c')
-rw-r--r--linux/vbelib.c22
1 files changed, 22 insertions, 0 deletions
diff --git a/linux/vbelib.c b/linux/vbelib.c
index a1bedeaac2..8a3ace1291 100644
--- a/linux/vbelib.c
+++ b/linux/vbelib.c
@@ -386,3 +386,25 @@ int vbeGetProtModeInfo(struct VesaProtModeInterface *pm_info)
}
return retval;
}
+/* --------- Standard VGA stuff -------------- */
+int vbeWriteString(int x, int y, int attr, char *str)
+{
+ struct LRMI_regs r;
+ void *rm_space = NULL;
+ int retval;
+ memset(&r,0,sizeof(struct LRMI_regs));
+ r.ecx = strlen(str);
+ r.edx = ((y<<8)&0xff00)|(x&0xff);
+ r.ebx = attr;
+ if(!(rm_space = LRMI_alloc_real(r.ecx))) return VBE_OUT_OF_DOS_MEM;
+ r.es = VirtToPhysSeg(rm_space);
+ r.ebp = VirtToPhysOff(rm_space);
+ memcpy(rm_space,str,r.ecx);
+ r.eax = 0x1300;
+ retval = VBE_LRMI_int(0x10,&r);
+ if(rm_space) LRMI_free_real(rm_space);
+ if(!retval) return VBE_VM86_FAIL;
+ retval = r.eax & 0xffff;
+ if(retval == 0x4f) retval = VBE_OK;
+ return retval;
+} \ No newline at end of file