Hard Light Productions Forums

Modding, Mission Design, and Coding => FS2 Open Coding - The Source Code Project (SCP) => Topic started by: snake60 on February 18, 2015, 07:00:28 pm

Title: 3x (5:4) : a way to ajust menus size ? (added a code +ZoomTo question)
Post by: snake60 on February 18, 2015, 07:00:28 pm
Hi everybody,

I'm currently playing FSOpen on a tri-screen configuration, but with 5:4 monitors (1280x1024) and bezel compensation, resulting in a 3976x1024 resolution.

I've already modified the hud interface for the mission so this part is ok.

The problem I have is with the menus interface. I've managed to modify the mainhall files (and associated tables) to see the whole mainhall on the center screen (by changing it to a 5:4 ratio and adding black borders on the top and bottom of it) but it does not work on the other menus (option, etc...)

I know I could desactivate the bezel compensation to resolve my problem but I would like to keep it in missions if there is an available solution.

The files attached show my actual problem ("hidden" zone behind the bezel due to the 5:4 format) and what I would like to achieved in a perfect world.

Thanks for your help, makers of awesome  :D

[attachment deleted by nobody]
Title: Re: 3x 1280x1024 (5:4) : is there a way to ajust menus size ?
Post by: chief1983 on February 20, 2015, 09:12:51 am
Hmm, I used to have a single 1280x1024 monitor and never really considered that we could run into issues with multiple 5:4 monitors like that.  We might need some sort of aspect override or something as opposed to just a toggle for that behavior.
Title: Re: 3x 1280x1024 (5:4) : is there a way to ajust menus size ?
Post by: snake60 on February 20, 2015, 12:22:59 pm
So, not even an "ugly" solution with tables from what I understand ?  :(

5:4 is the devil  :D


Technical edit  :p :

I took a look into the code concerning the +ZoomTo feature for mainhalls.
Currently, if I add a "+ZoomTo: 1365 1024" in mainhall.tbl to simulate a 4:3 screen with a height of 1024, it won't work because there is a control in mainhallmenu.cpp to check if the zoom area is within the background bitmap (line 525) :
Code: [Select]
// make sure the zoom area is completely within the background bitmap
if (Main_hall->zoom_area_width > Main_hall_bitmap_w) {
Main_hall->zoom_area_width = Main_hall_bitmap_w;
}
if (Main_hall->zoom_area_height > Main_hall_bitmap_h) {
Main_hall->zoom_area_height = Main_hall_bitmap_h;
}

What would happen if we suppress this control ?
Would the game engine automatically zoom out and create the empty zone at the top and bottom or would the code at line 668 crash ?
Code: [Select]
// set the screen scale to the main hall's dimensions
gr_set_screen_scale(Main_hall_bitmap_w, Main_hall_bitmap_h, Main_hall->zoom_area_width, Main_hall->zoom_area_height);

Why all those questions you ask ? :lol:
It's just to know if it would be virtually possible to use the +ZoomTo parameter to kind of zoom out and make the modifications I've done to the mainhall table and pcx file not necessary


Edit2 : investigating the gr_set_screen_scale function in 2d.cpp (line 105)
Title: Re: 3x (5:4) : a way to ajust menus size ? (added a code +ZoomTo question)
Post by: snake60 on February 27, 2015, 01:33:15 pm
Nobody ? Yarn perhaps, who created the code for the +ZoomTo function ? :'(
Title: Re: 3x (5:4) : a way to ajust menus size ? (added a code +ZoomTo question)
Post by: chief1983 on February 27, 2015, 01:50:02 pm
Hmm, I must have gotten this issue confused with the HUD dpi issue and thought both were somehow being looked at.  I'm surprised no one else has stopped in to comment on this yet.  I'll see if I can get anyone else to look at this.
Title: Re: 3x (5:4) : a way to ajust menus size ? (added a code +ZoomTo question)
Post by: snake60 on February 27, 2015, 03:53:01 pm
Thanks a lot !
Title: Re: 3x (5:4) : a way to ajust menus size ? (added a code +ZoomTo question)
Post by: Yarn on February 27, 2015, 07:04:51 pm
I'll see what I can do to fix this. Hopefully I can fix the HUD issue as well.
Title: Re: 3x (5:4) : a way to ajust menus size ? (added a code +ZoomTo question)
Post by: snake60 on February 28, 2015, 06:36:09 am
Thank you great magician  :)
Title: Re: 3x (5:4) : a way to ajust menus size ? (added a code +ZoomTo question)
Post by: Yarn on March 01, 2015, 02:07:52 pm
I posted a patch and build that should fix this problem. You can find it in this post: http://www.hard-light.net/forums/index.php?topic=89262.0 (http://www.hard-light.net/forums/index.php?topic=89262.0)
Title: Re: 3x (5:4) : a way to ajust menus size ? (added a code +ZoomTo question)
Post by: snake60 on March 02, 2015, 06:01:58 pm
Thanks a lot ! I will try it as soon as possible.... in fact as soon as my graphic card comes back from warranty, 'cause for now I'm stuck with double-monitor only. Bad luck hhuuuhh ^^
Title: Re: 3x (5:4) : a way to ajust menus size ? (added a code +ZoomTo question)
Post by: snake60 on March 20, 2015, 12:43:40 pm
Problem resolved with Yarn patch, as explained in the other topic ! Again, thanks A LOT for this :)