Skip to content

Commit 1390342

Browse files
eagleivgXottab-DUTY
authored andcommitted
xrRenderDX10: fix r3 and r4 screen resolution
1 parent 7b46c3d commit 1390342

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

src/Layers/xrRenderDX10/dx10HW.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,7 @@ void CHW::CreateDevice(SDL_Window* m_sdlWnd, bool move_window)
118118
{
119119
case SDL_SYSWM_WINDOWS:
120120
sd.OutputWindow = info.info.win.window;
121+
SDL_SetWindowSize(m_sdlWnd, sd.BufferDesc.Width, sd.BufferDesc.Height); //workaround for r3 and r4
121122
break;
122123
default: break;
123124
}

src/xrEngine/Device_Initialize.cpp

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -46,14 +46,11 @@ void CRenderDevice::Initialize()
4646

4747
if (!m_sdlWnd)
4848
{
49-
Uint32 flags = SDL_WINDOW_BORDERLESS;
49+
Uint32 flags = SDL_WINDOW_BORDERLESS | SDL_WINDOW_OPENGL;
5050
#if SDL_VERSION_ATLEAST(2, 0, 5)
5151
flags |= SDL_WINDOW_ALWAYS_ON_TOP;
5252
#endif
5353

54-
if (strstr(Core.Params, "-gl"))
55-
flags |= SDL_WINDOW_OPENGL;
56-
5754
m_sdlWnd = SDL_CreateWindow("S.T.A.L.K.E.R.: Call of Pripyat", SDL_WINDOWPOS_UNDEFINED, SDL_WINDOWPOS_UNDEFINED, 640, 480, flags);
5855

5956
R_ASSERT3(m_sdlWnd, "Unable to create SDL window", SDL_GetError());

0 commit comments

Comments
 (0)