PocketMatrix forums

A read-only archive of the PocketMatrix forums (2001–2014). Posting and accounts are closed.

DeviceToLogical is off when run full screen on Desktop PC

The DeviceToLogical function seems to be off when I run in full screen mode on a desktop pc.

Here are my screen settings:

OpenDisplay( hMainWnd, GDOPENDISPLAY_SIZEX25 | GDOPENDISPLAY_FULLSCREEN );

SetDisplayMode( GDDISPMODE_LANDSCAPE1 );

When I run with these settings on the desktop everything works fine:

OpenDisplay( hMainWnd, GDOPENDISPLAY_SIZEX25 );
SetDisplayMode( GDDISPMODE_LANDSCAPE1 );
I think I figured out what it is though I am not sure what to do about it. Everything farther down than the height that a titlebar would be is off by the height of a title bar. Also I found in you click in the top X pixels (where X is the height a title bar would be) you can drag the fullscreen window around (thats bad.) Any thoughts on this?
Yes. You need to change your window style for your main window to WS_POPUP. This is related to how DirectX works. Please see the enclosed samples for information on how to do this (e.g. the MaskDemo). The Window style is defined in the file MainFrm.cpp. For example:

Code:
#ifndef _WIN32_WCE
if (GAMEPARAM_FULLSCREEN)
{
cs.style = WS_POPUP;
}
else
{
cs.style = WS_OVERLAPPED | WS_CAPTION | FWS_ADDTOTITLE
| WS_THICKFRAME | WS_MINIMIZEBOX | WS_MAXIMIZEBOX | WS_SYSMENU;
}
#endif
Yup that fixed it. Ok one more question. I have a minimize button in the game. When you minimized it and then restore it when it is full size on the desktop it is messed up from there on out. Is there something else that needs done when I restore the game?
Thanks for reporting. A fix for this is included in GapiDraw 1.02.