diff --git a/polymer/eduke32/build/include/baselayer.h b/polymer/eduke32/build/include/baselayer.h index 9d2ed091d..367c8d1fe 100644 --- a/polymer/eduke32/build/include/baselayer.h +++ b/polymer/eduke32/build/include/baselayer.h @@ -30,6 +30,7 @@ extern int32_t startwin_idle(void *); // video extern int32_t r_usenewaspect, newaspect_enable; +extern int32_t setaspect_new_use_dimen; extern uint32_t r_screenxy; extern int32_t xres, yres, bpp, fullscreen, bytesperline; extern intptr_t frameplace; diff --git a/polymer/eduke32/build/src/engine.c b/polymer/eduke32/build/src/engine.c index b069ce5b4..85191698c 100644 --- a/polymer/eduke32/build/src/engine.c +++ b/polymer/eduke32/build/src/engine.c @@ -13516,6 +13516,8 @@ restart_grand: #endif } +int32_t setaspect_new_use_dimen = 0; + void setaspect_new() { if (r_usenewaspect && newaspect_enable && getrendermode()!=4) @@ -13525,6 +13527,9 @@ void setaspect_new() int32_t vr, yx=(65536*4*100)/(3*107); int32_t y, x; + const int32_t xd = setaspect_new_use_dimen ? xdimen : xdim; + const int32_t yd = setaspect_new_use_dimen ? ydimen : ydim; + if (fullscreen) { int32_t pixratio; @@ -13532,13 +13537,13 @@ void setaspect_new() x=r_screenxy/100; y=r_screenxy%100; if (y==0 || x==0) { x=4; y=3; } - pixratio = divscale16(xdimen*y, ydimen*x); + pixratio = divscale16(xd*y, yd*x); yx = divscale16(yx, pixratio); } else { - x = xdimen; - y = ydimen; + x = xd; + y = yd; } vr = divscale16(x*3, y*4); diff --git a/polymer/eduke32/source/gameexec.c b/polymer/eduke32/source/gameexec.c index ec558904e..af3008943 100644 --- a/polymer/eduke32/source/gameexec.c +++ b/polymer/eduke32/source/gameexec.c @@ -2448,7 +2448,11 @@ nullquote: { int32_t o = newaspect_enable; newaspect_enable = r_usenewaspect; + setaspect_new_use_dimen = 1; + setview(x1,y1,x2,y2); + + setaspect_new_use_dimen = 0; newaspect_enable = o; }