mirror of https://github.com/mpv-player/mpv
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:
parent
e1959e4e1a
commit
c35ebe6c3f
|
@ -794,14 +794,16 @@ run_vm86(void)
|
||||||
{
|
{
|
||||||
unsigned int vret;
|
unsigned int vret;
|
||||||
sigset_t allsigs, cursigs;
|
sigset_t allsigs, cursigs;
|
||||||
unsigned long oldgs;
|
unsigned long oldgs, oldfs;
|
||||||
|
|
||||||
while (1)
|
while (1)
|
||||||
{
|
{
|
||||||
sigfillset(&allsigs);
|
sigfillset(&allsigs);
|
||||||
sigprocmask(SIG_SETMASK, &allsigs, &cursigs);
|
sigprocmask(SIG_SETMASK, &allsigs, &cursigs);
|
||||||
asm volatile ("movl %%gs, %0" : "=g" (oldgs));
|
asm volatile ("movl %%gs, %0" : "=g" (oldgs));
|
||||||
|
asm volatile ("movl %%fs, %0" : "=g" (oldfs));
|
||||||
vret = lrmi_vm86(&context.vm);
|
vret = lrmi_vm86(&context.vm);
|
||||||
|
asm volatile ("movl %0, %%fs" :: "g" (oldfs));
|
||||||
asm volatile ("movl %0, %%gs" :: "g" (oldgs));
|
asm volatile ("movl %0, %%gs" :: "g" (oldgs));
|
||||||
sigprocmask(SIG_SETMASK, &cursigs, NULL);
|
sigprocmask(SIG_SETMASK, &cursigs, NULL);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue