hi guys... quick bug report for the new basecode. it shouldn''t affect you too often, but can still be fixed so why not!
in the function CreateWindowGL you find this code
if (window->init.isFullScreen == TRUE) // Fullscreen Requested, Try Changing Video Modes
{
if (ChangeScreenResolution (window->init.width, window->init.height, window->init.bitsPerPixel) == FALSE)
{
// Fullscreen Mode Failed. Run In Windowed Mode Instead
MessageBox (HWND_DESKTOP, "Mode Switch Failed.\nRunning In Windowed Mode.", "Error", MB_OK | MB_ICONEXCLAMATION);
window->init.isFullScreen = FALSE; // Set isFullscreen To False (Windowed Mode)
}
else // Otherwise (If Fullscreen Mode Was Successful)
{
ShowCursor (true); // Turn Off The Cursor
windowStyle = WS_POPUP; // Set The WindowStyle To WS_POPUP (Popup Window)
windowExtendedStyle |= WS_EX_TOPMOST; // Set The Extended Window Style To WS_EX_TOPMOST
} // (Top Window Covering Everything Else)
}
else {
// Adjust Window, Account For Window Borders
AdjustWindowRectEx (&windowRect, windowStyle, 0, windowExtendedStyle);
}
however, this causes a little bug. I was asking for a square window (750x750) and inadvertantly hit the button to ask for a fullscreen window. That resolution isn''t supported, so it went to windowed mode. The problem was that the code above skips over the AdjustWindowRect call when that situation occurs.
just replace
else
{
// Adjust Window, Account For Window Borders
AdjustWindowRectEx (&windowRect, windowStyle, 0, windowExtendedStyle);
}
with
if(FALSE == window->init.isFullScreen)// replaces else...
{
// Adjust Window, Account For Window Borders
AdjustWindowRectEx (&windowRect, windowStyle, 0, windowExtendedStyle);
}