1
mirror of https://github.com/mpv-player/mpv synced 2024-12-28 06:03:45 +01:00

Save fs before calling vm86, this might eleminate bugs (if there were any) in cooperation of using vesa with win32 dlls. Patch by Peter Kosinar <goober@ksp.sk>

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@11520 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
alex 2003-11-24 22:39:03 +00:00
parent e1959e4e1a
commit c35ebe6c3f

View File

@ -794,14 +794,16 @@ run_vm86(void)
{
unsigned int vret;
sigset_t allsigs, cursigs;
unsigned long oldgs;
unsigned long oldgs, oldfs;
while (1)
{
sigfillset(&allsigs);
sigprocmask(SIG_SETMASK, &allsigs, &cursigs);
asm volatile ("movl %%gs, %0" : "=g" (oldgs));
asm volatile ("movl %%fs, %0" : "=g" (oldfs));
vret = lrmi_vm86(&context.vm);
asm volatile ("movl %0, %%fs" :: "g" (oldfs));
asm volatile ("movl %0, %%gs" :: "g" (oldgs));
sigprocmask(SIG_SETMASK, &cursigs, NULL);