From 1c2a6e8457237bdbe355ad402c2fa11b6a470927 Mon Sep 17 00:00:00 2001 From: Braden Obrzut Date: Fri, 16 Jan 2015 13:12:18 -0500 Subject: [PATCH 1/3] - Fixed: fullscreenoffset coordinates were determined by translated (offsets) coordinates instead of input coordinates. --- src/g_shared/sbarinfo.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/g_shared/sbarinfo.cpp b/src/g_shared/sbarinfo.cpp index 7a11a2865..8ffedb5a4 100644 --- a/src/g_shared/sbarinfo.cpp +++ b/src/g_shared/sbarinfo.cpp @@ -1280,8 +1280,8 @@ public: // We can't use DTA_HUDRules since it forces a width and height. // Translation: No high res. - bool xright = rx < 0; - bool ybot = ry < 0; + bool xright = *x < 0; + bool ybot = *y < 0; w = (forceWidth < 0 ? texture->GetScaledWidthDouble() : forceWidth); h = (forceHeight < 0 ? texture->GetScaledHeightDouble() : forceHeight); From 4bae3f99762ac7c1d602fdcc95142e10809d28ea Mon Sep 17 00:00:00 2001 From: Braden Obrzut Date: Fri, 16 Jan 2015 18:58:23 -0500 Subject: [PATCH 2/3] - Fixed: SDLVideo::CreateFrameBuffer cleared "retry" too soon resulting in infinite recursion if the code was used. --- src/posix/sdl/sdlvideo.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/posix/sdl/sdlvideo.cpp b/src/posix/sdl/sdlvideo.cpp index 7a04ce901..309002456 100644 --- a/src/posix/sdl/sdlvideo.cpp +++ b/src/posix/sdl/sdlvideo.cpp @@ -286,7 +286,6 @@ DFrameBuffer *SDLVideo::CreateFrameBuffer (int width, int height, bool fullscree } SDLFB *fb = new SDLFB (width, height, fullscreen); - retry = 0; // If we could not create the framebuffer, try again with slightly // different parameters in this order: @@ -327,6 +326,7 @@ DFrameBuffer *SDLVideo::CreateFrameBuffer (int width, int height, bool fullscree ++retry; fb = static_cast(CreateFrameBuffer (width, height, fullscreen, NULL)); } + retry = 0; fb->SetFlash (flashColor, flashAmount); From 845bcdf14c0beda51d6bfd0c9db062c287e35d8b Mon Sep 17 00:00:00 2001 From: Braden Obrzut Date: Fri, 16 Jan 2015 19:13:51 -0500 Subject: [PATCH 3/3] - Attempt to disable all comparison operators on FString since unless we decide otherwise, it's a programming error to use them (caused implicit conversion to const char* and then the built in comparision was called). --- src/zstring.h | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/zstring.h b/src/zstring.h index 0104020fa..82c38142c 100644 --- a/src/zstring.h +++ b/src/zstring.h @@ -296,6 +296,16 @@ protected: static FNullStringData NullString; friend struct FStringData; + +private: + // Prevent these from being called as current practices are to use Compare. + // Without this FStrings will be accidentally compared against char* ptrs. + bool operator == (const FString &illegal) const; + bool operator != (const FString &illegal) const; + bool operator < (const FString &illegal) const; + bool operator > (const FString &illegal) const; + bool operator <= (const FString &illegal) const; + bool operator >= (const FString &illegal) const; }; namespace StringFormat