diff --git a/Minecraft.Client/Windows64/Windows64_Minecraft.cpp b/Minecraft.Client/Windows64/Windows64_Minecraft.cpp index dcd5b30dc..2ac1cd8d4 100644 --- a/Minecraft.Client/Windows64/Windows64_Minecraft.cpp +++ b/Minecraft.Client/Windows64/Windows64_Minecraft.cpp @@ -84,9 +84,6 @@ BOOL g_bWidescreen = TRUE; int g_iScreenWidth = 1920; int g_iScreenHeight = 1080; -UINT g_ScreenWidth = 1920; -UINT g_ScreenHeight = 1080; - // Fullscreen toggle state static bool g_isFullscreen = false; static WINDOWPLACEMENT g_wpPrev = { sizeof(g_wpPrev) }; @@ -431,8 +428,9 @@ LRESULT CALLBACK WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam) case WM_SIZE: { // Set the screen width and height used for calculating the aspect ratio - g_ScreenWidth = LOWORD(lParam); - g_ScreenHeight = HIWORD(lParam); + g_iScreenWidth = LOWORD(lParam); + g_iScreenHeight = HIWORD(lParam); + app.DebugPrintf("width: %d, height: %d\n", g_iScreenWidth, g_iScreenHeight); } break; default: diff --git a/Minecraft.Client/glWrapper.cpp b/Minecraft.Client/glWrapper.cpp index 5e0fab2c6..540271b91 100644 --- a/Minecraft.Client/glWrapper.cpp +++ b/Minecraft.Client/glWrapper.cpp @@ -48,12 +48,12 @@ void glLoadIdentity() RenderManager.MatrixSetIdentity(); } -extern UINT g_ScreenWidth; -extern UINT g_ScreenHeight; +extern int g_iScreenWidth; +extern int g_iScreenHeight; void gluPerspective(float fovy, float aspect, float zNear, float zFar) { - float dynamicAspect = (float)g_ScreenWidth / (float)g_ScreenHeight; + float dynamicAspect = (float)g_iScreenWidth / (float)g_iScreenHeight; RenderManager.MatrixPerspective(fovy, dynamicAspect, zNear, zFar); }