Skip to content

Commit

Permalink
xrEngine: refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
eagleivg authored and Xottab-DUTY committed Jul 24, 2018
1 parent acd0b87 commit b3e56d3
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 9 deletions.
2 changes: 1 addition & 1 deletion src/Layers/xrRender/HW.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ void CHW::CreateDevice(SDL_Window* m_sdlWnd, bool move_window)
fDepth = selectDepthStencil(fTarget);
}

if ((D3DFMT_UNKNOWN == fTarget) || (D3DFMT_UNKNOWN == fTarget))
if (D3DFMT_UNKNOWN == fTarget)
{
Msg("Failed to initialize graphics hardware.\n"
"Please try to restart the game.\n"
Expand Down
13 changes: 5 additions & 8 deletions src/xrEngine/Device_Initialize.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,9 @@ void CRenderDevice::Initialize()
if (strstr(Core.Params, "-weather"))
initialize_weather_editor();

//SetEnvironmentVariable("SDL_VIDEODRIVER", "windows");
SetEnvironmentVariable("SDL_AUDIODRIVER", "directsound");

if (SDL_Init(SDL_INIT_EVERYTHING) != 0)
{
Log("Unable to initialize SDL: %s", SDL_GetError());
Expand All @@ -55,14 +58,8 @@ void CRenderDevice::Initialize()
flags |= SDL_WINDOW_OPENGL;

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

if (!m_sdlWnd)
Log("Unable to create window: %s", SDL_GetError());

//m_sdlRndr = SDL_CreateRenderer(m_sdlWnd, -1, SDL_RENDERER_ACCELERATED);

//SDL_RenderClear(m_sdlRndr);
//SDL_RenderPresent(m_sdlRndr);

R_ASSERT3(m_sdlWnd, "Unable to create SDL window", SDL_GetError());
}
// Save window properties

Expand Down

0 comments on commit b3e56d3

Please sign in to comment.