diff --git a/polymer/eduke32/build/src/baselayer.c b/polymer/eduke32/build/src/baselayer.c index 1d579c42c..26b33721b 100644 --- a/polymer/eduke32/build/src/baselayer.c +++ b/polymer/eduke32/build/src/baselayer.c @@ -328,8 +328,8 @@ int32_t baselayer_init(void) cvar_t cvars_engine[] = { { "r_usenewaspect","r_usenewaspect: enable/disable new screen aspect ratio determination code",(void *) &r_usenewaspect, CVAR_BOOL, 0, 1 }, - { "r_screenaspect","r_screenaspect: if using the new aspect code and in fullscreen, screen aspect ratio in the form XXYY, e.g. 1609 for 16:9", - (void *) &r_screenxy, SCREENASPECT_CVAR_TYPE, 100, 9999 }, + { "r_screenaspect","r_screenaspect: if using r_usenewaspect and in fullscreen, screen aspect ratio in the form XXYY, e.g. 1609 for 16:9", + (void *) &r_screenxy, SCREENASPECT_CVAR_TYPE, 0, 9999 }, { "r_novoxmips","r_novoxmips: turn off/on the use of mipmaps when rendering 8-bit voxels",(void *) &novoxmips, CVAR_BOOL, 0, 1 }, { "r_voxels","r_voxels: enable/disable automatic sprite->voxel rendering",(void *) &usevoxels, CVAR_BOOL, 0, 1 }, #ifdef YAX_ENABLE diff --git a/polymer/eduke32/build/src/config.c b/polymer/eduke32/build/src/config.c index e08287fe7..151eebc43 100644 --- a/polymer/eduke32/build/src/config.c +++ b/polymer/eduke32/build/src/config.c @@ -401,7 +401,8 @@ int32_t writesetup(const char *fn) "; Use new aspect determination code? (classic/Polymost)\n" "r_usenewaspect = %d\n" #ifndef RENDERTYPEWIN - "; Screen aspect for fullscreen, in the form WWHH (e.g. 1609 for 16:9)\n" + "; Screen aspect for fullscreen, in the form WWHH (e.g. 1609 for 16:9).\n" + "; A value of 0 means to assume that the pixel aspect is square." "r_screenxy = %d\n" #endif "\n" diff --git a/polymer/eduke32/build/src/engine.c b/polymer/eduke32/build/src/engine.c index 17fd990f5..40c7d6018 100644 --- a/polymer/eduke32/build/src/engine.c +++ b/polymer/eduke32/build/src/engine.c @@ -117,7 +117,7 @@ static int32_t oxdimen = -1, oviewingrange = -1, oxyaspect = -1; // r_usenewaspect is the cvar, newaspect_enable to trigger the new behaviour in the code int32_t r_usenewaspect = 1, newaspect_enable=0; -uint32_t r_screenxy = 403; // 4:3 aspect ratio +uint32_t r_screenxy = 0; int32_t curbrightness = 0, gammabrightness = 0; @@ -13542,7 +13542,12 @@ void setaspect_new() int32_t pixratio; x=r_screenxy/100; y=r_screenxy%100; - if (y==0 || x==0) { x=4; y=3; } + if (y==0 || x==0) + { + // Assume square pixel aspect. + x = xdim; + y = ydim; + } pixratio = divscale16(xd*y, yd*x); yx = divscale16(yx, pixratio);