Skip to content

Commit

Permalink
Temporary fix for dedicated server window resolution
Browse files Browse the repository at this point in the history
Font quality for dedicated server is TrueType now
  • Loading branch information
Xottab-DUTY committed Jul 24, 2018
1 parent 6c621a1 commit aed5f01
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/xrEngine/Device_Initialize.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ void CRenderDevice::Initialize()
#endif
| SDL_WINDOW_OPENGL;

m_sdlWnd = SDL_CreateWindow("S.T.A.L.K.E.R.: Call of Pripyat", 0, 0, 256, 192, flags);
m_sdlWnd = SDL_CreateWindow("S.T.A.L.K.E.R.: Call of Pripyat", 0, 0, 640, 480, flags);

R_ASSERT3(m_sdlWnd, "Unable to create SDL window", SDL_GetError());
SDL_SetWindowHitTest(m_sdlWnd, WindowHitTest, nullptr);
Expand Down
9 changes: 8 additions & 1 deletion src/xrEngine/Device_create.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,14 @@ void CRenderDevice::UpdateWindowRects()

void CRenderDevice::SelectResolution(const bool windowed)
{
if (windowed)
// Dedicated server hardcoded resolution
// XXX: to be removed
if (GEnv.isDedicatedServer)
{
dwWidth = psCurrentVidMode[0] = 640;
dwHeight = psCurrentVidMode[1] = 480;
}
else if (windowed)
{
dwWidth = psCurrentVidMode[0];
dwHeight = psCurrentVidMode[1];
Expand Down
4 changes: 2 additions & 2 deletions src/xrEngine/Text_Console.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -105,9 +105,9 @@ void CTextConsole::CreateLogWnd()
lf.lfUnderline = 0;
lf.lfStrikeOut = 0;
lf.lfCharSet = DEFAULT_CHARSET;
lf.lfOutPrecision = OUT_STRING_PRECIS;
lf.lfOutPrecision = OUT_TT_PRECIS;
lf.lfClipPrecision = CLIP_STROKE_PRECIS;
lf.lfQuality = DRAFT_QUALITY;
lf.lfQuality = CLEARTYPE_NATURAL_QUALITY;
lf.lfPitchAndFamily = VARIABLE_PITCH | FF_SWISS;
xr_sprintf(lf.lfFaceName, sizeof(lf.lfFaceName), "");

Expand Down

0 comments on commit aed5f01

Please sign in to comment.