mirror of
https://github.com/reactos/reactos.git
synced 2024-12-28 10:04:49 +00:00
[WIN32SS:ENG] EngCreateBitmap: mark created bitmaps as API bitmaps (#4146)
CORE-17561 Set the API_BITMAP flag for bitmaps created by EngCreateBitmap(). This avoids failure when created bitmap is passed to NtGdiSelectBitmap(), since it checks for this flag and fails if it isn't set. Otherwise, if failure occurs, the bitmap is hot handled properly. Setting this flag outside of that function is not an option at all, because it is a public (exported) function, and in many cases it's called directly by the caller (in case with MS DDraw stack, it can be called also by dxg.sys from dxgthk!EngCreateBitmap, which directly calls win32k!EngCreateBitmap). In particular, it allows Windows XP/2003 DirectDraw stack (ddraw.dll & dxg.sys) to properly work in ReactOS (in software emulation mode), even on real hardware. So now, a lot of DirectX 1-7 apps and games (whose can work withoug hardware acceleation), are working properly with ddraw.dll + dxg.sys replacement! Also Justin Miller (DarkFire01) confirmed that even Direct3D software emulation now also works correctly on real hardware!
This commit is contained in:
parent
0db5fce47d
commit
dc483bd700
1 changed files with 3 additions and 0 deletions
|
@ -332,6 +332,9 @@ EngCreateBitmap(
|
|||
/* Get the handle for the bitmap */
|
||||
hbmp = (HBITMAP)psurf->SurfObj.hsurf;
|
||||
|
||||
/* Mark as API bitmap */
|
||||
psurf->flags = API_BITMAP;
|
||||
|
||||
/* Set public ownership */
|
||||
GDIOBJ_vSetObjectOwner(&psurf->BaseObject, GDI_OBJ_HMGR_PUBLIC);
|
||||
|
||||
|
|
Loading…
Reference in a new issue