# Emulation

DirectX emulation determines how the fullscreen DirectX operations are managed to fit a windowed environment, with the following options:

None | (default) | The primary surface and backbuffers are simply scaled to the desired size, but no other characteristic is altered. In particular, the pixel color depth and mode are not altered.
Primary Buffer | EMULATEBUFFER | Same as "None," but blit operations are made against a memory surface and then transferred to the real primary surface – this handles the so-called "pitch-bug" problem.
Locked Surface | LOCKEDSURFACE | Same as "Primary Buffer" (EMULATEBUFFER) but the buffer is the surface of an OFFSCREENPLAIN DirectDraw surface, so it is handled similarly to a DirectX surfacebuffer.
Primary Surface | EMULATESURFACE | The virtual primary surface has a different color depth from the real primary surface, and DxWnd takes care of the color transformation internally: it might be a little slower but it involves no screen mode changes. Furthermore, this option allows you to set the "Set AERO compatible mode" that avoids making a temporary color conversion and stretching it to the primary surface (which would break the AERO desktop composition mode).
Hybrid mode | HYBRIDMODE | Similar to "Primary Surface" mode (EMULATESURFACE), but DxWnd forwards the palette and color conversion to GDI calls instead of managing them internally. It is usually less compatible than primary surface, but in some rare cases it may better at managing unusual color conversions. Try this option if the game works but the colors are wrong or the screen is black.
GDI mode | GDIMODE | Similar to "Primary Surface" mode (EMULATESURFACE), but DxWnd forwards all the conversion between the virtual primary interface and the window surface instead of managing it internally. Because of recent optimizations to GDI that can now take advantage of hardware-accelerated functions, this mode is becoming particularly interesting, and the lack of extra service surfaces brings it closer to the original game schema. It is also quite respectful of AERO desktop modes.

Note that the chosen option only influences DirectDraw1 through DirectDraw7 interfaces. Interfaces with Direct3D8 and up (or OpenGL) are not affected by these options.