Skip to content

Commit b3e56d3

Browse files
eagleivgXottab-DUTY
authored andcommitted
xrEngine: refactor
1 parent acd0b87 commit b3e56d3

File tree

2 files changed

+6
-9
lines changed

2 files changed

+6
-9
lines changed

src/Layers/xrRender/HW.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ void CHW::CreateDevice(SDL_Window* m_sdlWnd, bool move_window)
109109
fDepth = selectDepthStencil(fTarget);
110110
}
111111

112-
if ((D3DFMT_UNKNOWN == fTarget) || (D3DFMT_UNKNOWN == fTarget))
112+
if (D3DFMT_UNKNOWN == fTarget)
113113
{
114114
Msg("Failed to initialize graphics hardware.\n"
115115
"Please try to restart the game.\n"

src/xrEngine/Device_Initialize.cpp

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,9 @@ void CRenderDevice::Initialize()
3939
if (strstr(Core.Params, "-weather"))
4040
initialize_weather_editor();
4141

42+
//SetEnvironmentVariable("SDL_VIDEODRIVER", "windows");
43+
SetEnvironmentVariable("SDL_AUDIODRIVER", "directsound");
44+
4245
if (SDL_Init(SDL_INIT_EVERYTHING) != 0)
4346
{
4447
Log("Unable to initialize SDL: %s", SDL_GetError());
@@ -55,14 +58,8 @@ void CRenderDevice::Initialize()
5558
flags |= SDL_WINDOW_OPENGL;
5659

5760
m_sdlWnd = SDL_CreateWindow("S.T.A.L.K.E.R.: Call of Pripyat", SDL_WINDOWPOS_UNDEFINED, SDL_WINDOWPOS_UNDEFINED, 640, 480, flags);
58-
59-
if (!m_sdlWnd)
60-
Log("Unable to create window: %s", SDL_GetError());
61-
62-
//m_sdlRndr = SDL_CreateRenderer(m_sdlWnd, -1, SDL_RENDERER_ACCELERATED);
63-
64-
//SDL_RenderClear(m_sdlRndr);
65-
//SDL_RenderPresent(m_sdlRndr);
61+
62+
R_ASSERT3(m_sdlWnd, "Unable to create SDL window", SDL_GetError());
6663
}
6764
// Save window properties
6865

0 commit comments

Comments
 (0)