Skip to content

Commit

Permalink
add identifier to disable engine-based aspect correction to avoid con…
Browse files Browse the repository at this point in the history
…flict with game module implementation
  • Loading branch information
Chomenor committed Sep 25, 2021
1 parent ca53c80 commit f6b078c
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
4 changes: 4 additions & 0 deletions code/cgame/cg_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -1157,6 +1157,10 @@ void CG_Init( int serverMessageNum, int serverCommandSequence ) {
cgs.redflag = cgs.blueflag = -1; // For compatibily, default to unset for
// old servers

// indicate to engine that engine-based aspect correction shouldn't be used
// should be called ahead of trap_GetGlconfig
VMExt_GVCommandInt( "register_aspect_aware", 0 );

// get the rendering configuration from the client system
trap_GetGlconfig( &cgs.glconfig );
AspectCorrect_Init( cgs.glconfig.vidWidth, cgs.glconfig.vidHeight );
Expand Down
4 changes: 4 additions & 0 deletions code/ui/ui_atoms.c
Original file line number Diff line number Diff line change
Expand Up @@ -1375,6 +1375,10 @@ void UI_Init( void ) {

UI_InitGameinfo();

// indicate to engine that engine-based aspect correction shouldn't be used
// should be called ahead of trap_GetGlconfig
VMExt_GVCommandInt( "register_aspect_aware", 0 );

// cache redundant calulations
trap_GetGlconfig( &uis.glconfig );
AspectCorrect_Init( uis.glconfig.vidWidth, uis.glconfig.vidHeight );
Expand Down

0 comments on commit f6b078c

Please sign in to comment.