ntdll: Support setting the CPU context on the current thread without segment registers.

This commit is contained in:
Alexandre Julliard 2007-05-08 20:09:25 +02:00
parent f2e30a0a1c
commit c5134b77c6
1 changed files with 11 additions and 2 deletions

View File

@ -758,10 +758,19 @@ void set_cpu_context( const CONTEXT *context )
}
if (flags & CONTEXT_FULL)
{
if ((flags & CONTEXT_FULL) != (CONTEXT_FULL & ~CONTEXT_i386))
if (!(flags & CONTEXT_CONTROL))
FIXME( "setting partial context (%x) not supported\n", flags );
else
else if (flags & CONTEXT_SEGMENTS)
__wine_call_from_32_restore_regs( context );
else
{
CONTEXT newcontext = *context;
newcontext.SegDs = wine_get_ds();
newcontext.SegEs = wine_get_es();
newcontext.SegFs = wine_get_fs();
newcontext.SegGs = wine_get_gs();
__wine_call_from_32_restore_regs( &newcontext );
}
}
}