I have wrote a simple DirectX 2D game engine and im having some issues when running the game applications on different computers. I developed the engine and demos on a windows 7 dual core with an NVIDIA GeForce GT 520. I can run the game over two monitors and its performance is 60+ FPS.
The platform I need to run my games on is a dual core, XP system with an ATi HD 3200 across dual monitors. I setup the games to look fullscreen by using the WS_POPUP window style, using one window which is 2048 x 768 running on a 1024 x 768 resolution.
This works brilliant on my computer but im having some issues on other computers.
The problems I am having are:
- If I use WS_POPUP the first monitor is just a black screen
- If I use WS_POPUPWINDOW it works and draws to both monitors but its really slow
- If I set the game to not be borderless, E.g use WS_OVERLAPPEDWINDOW instead, the performace shoots up from around 10 FPS to 25 FPS but it no longer looks fullscreen.
This is my window style setup code:
if (g_engine->getFullscreen())
{
DEVMODE dm;
memset(&dm, 0, sizeof(dm));
dm.dmSize = sizeof(dm);
dm.dmPelsWidth = g_engine->getScreenWidth();
dm.dmPelsHeight = g_engine->getScreenHeight();
dm.dmBitsPerPel = g_engine->getColorDepth();
dm.dmFields = DM_BITSPERPEL | DM_PELSWIDTH | DM_PELSHEIGHT;
if (ChangeDisplaySettings(&dm, CDS_FULLSCREEN) != DISP_CHANGE_SUCCESSFUL) {
MessageBox(NULL, "Display mode failed", NULL, MB_OK);
g_engine->setFullscreen(false);
}
dwStyle = WS_POPUP;
dwExStyle = WS_EX_APPWINDOW;
ShowCursor(FALSE);
}
else if(g_engine->getBorderless())
{
dwStyle = WS_POPUP;
dwExStyle = WS_EX_APPWINDOW | WS_EX_TOPMOST ;
}
else {
dwStyle = WS_OVERLAPPEDWINDOW;
dwExStyle = WS_EX_APPWINDOW | WS_EX_TOPMOST ;
}
Im very confused with these issues and any help would be greatly appreciated.
Thanks,
Martin






