scp-fs2open / scp-fs2open/fs2open.github.com

New HUD Config doesn't draw correctly for triple monitor screens

Open
#6,730 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
C++
Stars
487
Forks
184
PR merge metrics
PR metrics pending

Description

Recording this here because I don't know how to solve it right now.

When using the `center_res` commandline (generally for triple monitor setups) the HUD is restricted to drawing within the defined center resolution while in mission. Since the new HUD Config code uses the actual HUD rendering methods, this causes the HUD to be restricted to `center_res` as if the defined HUD Config render area is the entire available resolution; effectively the HUD gets scaled twice.

I suspect this has something to do with lines like this in the render code:

```
int to_resize = (resize_mode != GR_RESIZE_NONE && resize_mode != GR_RESIZE_REPLACE && (gr_screen.custom_size || (gr_screen.rendering_to_texture != -1)));
```

HUD Config sets resize mode to GR_RESIZE_NONE on purpose so it can manually scale as needed. It looks like `gr_screen.custom_size` is true when `center_res` is defined. So I suspect this statement is ultimately returning true and causes further resizing to be done. Forcing that to be skipped could be tricky because this is downstream of the HUD rendering code and we've long lost who the caller is at this point so it may be difficult to branch out for this specific case without some ugliness being copied into each of the various render methods (bitmap, bitmapEx, aabitmap, aabitmapEx, string, line, and other shapes).

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.