Skip to content
This repository has been archived by the owner on Apr 7, 2023. It is now read-only.

Commit

Permalink
Correct widescreen calculation (Allows 32:9 ratio o_o)
Browse files Browse the repository at this point in the history
  • Loading branch information
Garey27 committed Mar 18, 2020
1 parent f148cff commit 8711134
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions MiniBase/widescreen.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,9 @@ int(HUD_UpdateClientData)(client_data_t* pcldata, float flTime)
new_y = V_CalcFov(pcldata->fov, g_Screen.iWidth, g_Screen.iHeight);
}
else
{
new_y = V_CalcFov(pcldata->fov, g_Screen.iWidth / 1024.0, g_Screen.iHeight / 768.0);
new_x = pcldata->fov = V_CalcFov(new_y, g_Screen.iHeight, g_Screen.iWidth);
{
new_y = (2.f * atan(tan(pcldata->fov * M_PI / 180.f / 2.f) * 0.75f /*768.0/1024.0*/ )) * 180.f / M_PI;
new_x = pcldata->fov = (2.f * atan(tan(new_y * M_PI / 180.f / 2.f) * g_Screen.iWidth/g_Screen.iHeight)) * 180.f / M_PI;
}
return ret;
}
Expand Down

0 comments on commit 8711134

Please sign in to comment.