diff --git a/src/common/filesystem/file_zip.cpp b/src/common/filesystem/file_zip.cpp index bd0d76624f..e14305b529 100644 --- a/src/common/filesystem/file_zip.cpp +++ b/src/common/filesystem/file_zip.cpp @@ -266,6 +266,8 @@ bool FZipFile::Open(bool quiet, LumpFilterInfo* filter) continue; // 'filter' is a reserved name of the file system. if (name.IndexOf("__macosx") == 0) continue; // skip Apple garbage. At this stage only the root folder matters. + if (name.IndexOf(".bat") >= 0 || name.IndexOf(".exe") >= 0) + continue; // also ignore executables for this. if (!foundprefix) { // check for special names, if one of these gets found this must be treated as a normal zip. diff --git a/src/common/objects/dobjtype.cpp b/src/common/objects/dobjtype.cpp index fde9ea0e3c..0ac7bc8add 100644 --- a/src/common/objects/dobjtype.cpp +++ b/src/common/objects/dobjtype.cpp @@ -252,6 +252,7 @@ void PClass::StaticShutdown () // Make a full garbage collection here so that all destroyed but uncollected higher level objects // that still exist are properly taken down before the low level data is deleted. GC::FullGC(); + GC::FullGC(); Namespaces.ReleaseSymbols(); diff --git a/src/common/statusbar/base_sbar.cpp b/src/common/statusbar/base_sbar.cpp index e7cab98d24..b1fb2d79aa 100644 --- a/src/common/statusbar/base_sbar.cpp +++ b/src/common/statusbar/base_sbar.cpp @@ -47,6 +47,7 @@ #include "v_text.h" #include "vm.h" #include "i_interface.h" +#include "r_videoscale.h" FGameTexture* CrosshairImage; static int CrosshairNum; @@ -367,9 +368,11 @@ void DStatusBarCore::SetScale() double screenaspect = w / double(h); double aspectscale = 1.0; + double ViewportAspect = ViewportPixelAspect(); + if ((horz == 320 && vert == 200) || (horz == 640 && vert == 400)) { - refaspect = 1.333; + refaspect = (4. / 3.); if (!hud_aspectscale) aspectscale = 1 / 1.2; } @@ -384,9 +387,9 @@ void DStatusBarCore::SetScale() refw = h * refaspect; } refw *= hud_scalefactor; - refh *= hud_scalefactor * aspectscale; + refh *= hud_scalefactor * aspectscale / ViewportAspect; - int sby = vert - int(RelTop * hud_scalefactor * aspectscale); + int sby = vert - int(RelTop * hud_scalefactor * aspectscale / ViewportAspect); // Use full pixels for destination size. ST_X = xs_CRoundToInt((w - refw) / 2); diff --git a/src/common/utility/basics.h b/src/common/utility/basics.h index 4ebc2cc888..6655ede2c8 100644 --- a/src/common/utility/basics.h +++ b/src/common/utility/basics.h @@ -3,6 +3,7 @@ #include #include #include +#include "xs_Float.h" #define MAXWIDTH 12000 #define MAXHEIGHT 5000 @@ -103,12 +104,12 @@ inline double RAD2DEG(double rad) inline angle_t RAD2BAM(float rad) { - return angle_t(rad * float(0x80000000u / M_PI)); + return angle_t(xs_RoundToUInt(rad * float(0x80000000u / M_PI))); } inline angle_t RAD2BAM(double rad) { - return angle_t(rad * (0x80000000u / M_PI)); + return angle_t(xs_RoundToUInt(rad * (0x80000000u / M_PI))); }