update the glConfig resolution with the one we actually have

This commit is contained in:
myT 2017-03-07 23:32:50 +01:00
parent 84ae1e4d9e
commit 701ae06fbb
3 changed files with 13 additions and 0 deletions

View File

@ -1156,3 +1156,11 @@ void WIN_UpdateHardwareGammaRamp( qbool enable )
else
GLW_RestoreGamma();
}
void WIN_UpdateResolution( int width, int height )
{
glConfig.vidWidth = width;
glConfig.vidHeight = height;
}

View File

@ -43,6 +43,7 @@ void IN_Shutdown();
void WIN_GetStartUpMonitorIndex();
void WIN_GetMonitorIndexFromMainWindow();
void WIN_UpdateHardwareGammaRamp( qbool enable );
void WIN_UpdateResolution( int width, int height );
void SNDDMA_Activate();

View File

@ -297,6 +297,10 @@ LRESULT CALLBACK MainWndProc (
}
break;
case WM_SIZE:
WIN_UpdateResolution( (int)LOWORD(lParam), (int)HIWORD(lParam) );
break;
case WM_SYSCOMMAND:
if ( wParam == SC_SCREENSAVE )
return 0;