Skip to content

Commit

Permalink
tr2/shell: fix wireframe mode not set upon launch
Browse files Browse the repository at this point in the history
Resolves #2313.
  • Loading branch information
rr- committed Jan 16, 2025
1 parent 6502ac8 commit 7870d13
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/tr2/game/render/common.c
Original file line number Diff line number Diff line change
Expand Up @@ -128,11 +128,11 @@ void Render_Reset(const RENDER_RESET_FLAGS reset_flags)
Render_AdjustTextureUVs(reset_flags & RENDER_RESET_TEXTURES);
M_ReuploadBackground();
}

if (reset_flags & RENDER_RESET_PARAMS) {
GFX_Context_SetWireframeMode(g_Config.rendering.enable_wireframe);
GFX_Context_SetLineWidth(g_Config.rendering.wireframe_width);
}

LOG_DEBUG("reset finished");
}

Expand Down
2 changes: 2 additions & 0 deletions src/tr2/game/shell/common.c
Original file line number Diff line number Diff line change
Expand Up @@ -308,6 +308,7 @@ static void M_HandleConfigChange(const EVENT *const event, void *const data)
CHANGED(rendering.enable_zbuffer)
|| CHANGED(rendering.enable_perspective_filter)
|| CHANGED(rendering.enable_wireframe)
|| CHANGED(rendering.wireframe_width)
|| CHANGED(rendering.texture_filter)
|| CHANGED(rendering.lighting_contrast)) {
Render_Reset(RENDER_RESET_PARAMS);
Expand Down Expand Up @@ -362,6 +363,7 @@ void Shell_Main(void)
Shell_Start();
Viewport_AlterFOV(-1);
Viewport_Reset();
Render_Reset(RENDER_RESET_PARAMS);

if (!GF_LoadScriptFile("data\\tombPC.dat")) {
Shell_ExitSystem("Could not load the original script file.");
Expand Down

0 comments on commit 7870d13

Please sign in to comment.