Skip to content

Commit

Permalink
Merge pull request #12 from niligulmohar/prefetch-textures-only-once
Browse files Browse the repository at this point in the history
Only prefetch texture overrides on first init
  • Loading branch information
SalamatiQus authored Jan 2, 2017
2 parents 4315041 + b82e721 commit f0e8a95
Showing 1 changed file with 11 additions and 7 deletions.
18 changes: 11 additions & 7 deletions RenderstateManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -51,16 +51,20 @@ void RSManager::initResources() {
rgbaBuffer1Tex->GetSurfaceLevel(0, &rgbaBuffer1Surf);
d3ddev->CreateDepthStencilSurface(rw, rh, D3DFMT_D24S8, D3DMULTISAMPLE_NONE, 0, false, &depthStencilSurf, NULL);
d3ddev->CreateStateBlock(D3DSBT_ALL, &prevStateBlock);
if (Settings::get().getEnableTextureOverride() && Settings::get().getEnableTexturePrefetch())
prefetchTextures();

if (Settings::get().getEnableShaderDumping()) {
createDirectory(PIXEL_SHADER_DUMP_DIR);
createDirectory(VERTEX_SHADER_DUMP_DIR);
}
if (!inited) { // on first init only
startDetour();

if (Settings::get().getEnableTextureOverride() && Settings::get().getEnableTexturePrefetch()) {
prefetchTextures();
}

if (Settings::get().getEnableShaderDumping()) {
createDirectory(PIXEL_SHADER_DUMP_DIR);
createDirectory(VERTEX_SHADER_DUMP_DIR);
}
}
SDLOG(0, "RenderstateManager resource initialization completed\n");
if(!inited) startDetour(); // on first init only
inited = true;
}

Expand Down

0 comments on commit f0e8a95

Please sign in to comment.