Skip to content

Commit

Permalink
Fixed stretched UI bug in classic interface mode.
Browse files Browse the repository at this point in the history
  • Loading branch information
afritz1 committed Jul 21, 2024
1 parent 73927a5 commit b7016cd
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions OpenTESArena/src/Rendering/Renderer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -662,16 +662,17 @@ void Renderer::handleRenderTargetsReset()
return;
}

const Int2 viewDims = this->getViewDimensions();
this->nativeTexture = this->createTexture(Renderer::DEFAULT_PIXELFORMAT, SDL_TEXTUREACCESS_TARGET, viewDims.x, viewDims.y);
const Int2 windowDims = this->getWindowDimensions();
this->nativeTexture = this->createTexture(Renderer::DEFAULT_PIXELFORMAT, SDL_TEXTUREACCESS_TARGET, windowDims.x, windowDims.y);
if (this->nativeTexture.get() == nullptr)
{
DebugLogError("Couldn't recreate native frame buffer for render targets reset to " + std::to_string(viewDims.x) + "x" +
std::to_string(viewDims.y) + " (" + std::string(SDL_GetError()) + ").");
DebugLogError("Couldn't recreate native frame buffer for render targets reset to " + std::to_string(windowDims.x) + "x" +
std::to_string(windowDims.y) + " (" + std::string(SDL_GetError()) + ").");
}

if (this->renderer3D->isInited())
{
const Int2 viewDims = this->getViewDimensions();
const double resolutionScale = this->resolutionScaleFunc();
const Int2 renderDims = MakeInternalRendererDimensions(viewDims, resolutionScale);

Expand Down

0 comments on commit b7016cd

Please sign in to comment.