wined3d: Merge FindContext() into context_acquire().
authorHenri Verbeet <hverbeet@codeweavers.com>
Sun, 21 Aug 2011 19:34:53 +0000 (21:34 +0200)
committerAlexandre Julliard <julliard@winehq.org>
Mon, 22 Aug 2011 14:14:36 +0000 (16:14 +0200)
commit34b2956e23a03458ed4c13d7556eb5438cb3fa1d
tree70d1c29b57adbd8eca03db4c5dadb8b3425cc92e
parent56428c638650b39fc37b100af1d67acc0f96a559
wined3d: Merge FindContext() into context_acquire().

This actually fixes a bug. A context's current_rt field may get set to NULL if
that surface gets destroyed or unloaded. In general, the next time that
context is acquired, context_setup_target() will then set everything up again.
However, if a context_acquire() call with a NULL target ends up returning such
a context, context_setup_target() never sets the current_rt field because the
target FindContext() chooses never gets propagated to context_acquire(). This
patch ensures context_setup_target() is never called with a NULL target.
dlls/wined3d/context.c