- Added two new cvars (win_x and win_y) that keep track of the window
position when not playing in fullscreen mode. - Changed the upper-left window positioning that was always used in debug builds into a command line option (-0), so debug and release builds behave the same. SVN r482 (trunk)
This commit is contained in:
parent
8ca5f3821d
commit
dea5cf9ba4
7 changed files with 139 additions and 14 deletions
|
|
@ -219,6 +219,7 @@ DDrawFB::DDrawFB (int width, int height, bool fullscreen)
|
|||
|
||||
DDrawFB::~DDrawFB ()
|
||||
{
|
||||
I_SaveWindowedPos ();
|
||||
ReleaseResources ();
|
||||
}
|
||||
|
||||
|
|
@ -233,7 +234,7 @@ bool DDrawFB::CreateResources ()
|
|||
if (!Windowed)
|
||||
{
|
||||
// Remove the window border in fullscreen mode
|
||||
SetWindowLongPtr (Window, GWL_STYLE, WS_POPUP|WS_VISIBLE);
|
||||
SetWindowLong (Window, GWL_STYLE, WS_POPUP|WS_VISIBLE|WS_SYSMENU);
|
||||
|
||||
TrueHeight = Height;
|
||||
for (Win32Video::ModeInfo *mode = static_cast<Win32Video *>(Video)->m_Modes; mode != NULL; mode = mode->next)
|
||||
|
|
@ -307,12 +308,13 @@ bool DDrawFB::CreateResources ()
|
|||
LOG2 ("Resize window to %dx%d\n", sizew, sizeh);
|
||||
VidResizing = true;
|
||||
// Make sure the window has a border in windowed mode
|
||||
SetWindowLongPtr (Window, GWL_STYLE, WS_VISIBLE|WS_OVERLAPPEDWINDOW);
|
||||
SetWindowLong (Window, GWL_STYLE, WS_VISIBLE|WS_OVERLAPPEDWINDOW);
|
||||
if (!SetWindowPos (Window, NULL, 0, 0, sizew, sizeh,
|
||||
SWP_DRAWFRAME | SWP_NOCOPYBITS | SWP_NOMOVE | SWP_NOZORDER))
|
||||
{
|
||||
LOG1 ("SetWindowPos failed because %08lx\n", GetLastError());
|
||||
}
|
||||
I_RestoreWindowedPos ();
|
||||
VidResizing = false;
|
||||
|
||||
// Create the clipper
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue