diff --git a/code/win32/win_glimp.cpp b/code/win32/win_glimp.cpp index df2b5bd..5011dbb 100644 --- a/code/win32/win_glimp.cpp +++ b/code/win32/win_glimp.cpp @@ -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; +} + diff --git a/code/win32/win_local.h b/code/win32/win_local.h index 932f1a9..2bab90b 100644 --- a/code/win32/win_local.h +++ b/code/win32/win_local.h @@ -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(); diff --git a/code/win32/win_wndproc.cpp b/code/win32/win_wndproc.cpp index d9fba21..22d73e4 100644 --- a/code/win32/win_wndproc.cpp +++ b/code/win32/win_wndproc.cpp @@ -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;