Black trace when moving around map in sdl2 client

You can get help here if Freeciv doesn't start on your computer, or if you keep getting fatal errors while playing etc.
Post Reply
goduck777
Posts: 2
Joined: Wed Feb 10, 2021 4:39 pm

Black trace when moving around map in sdl2 client

Post by goduck777 »

I have a question about the SDL2 client. Most of the functions work fine, but an annoying issue is that, when I move around the map using right click, the country border and the city name will have black trace on top of it left, and finally become totally dark. It can recover if I move to a different region and then move back (refresh it?).

I remember I had this problem before in an older version, but it seems to be fixed in the Qt version. I wonder if this is a known issue in SDL2 version.

Version 2.6.3
goduck777
Posts: 2
Joined: Wed Feb 10, 2021 4:39 pm

Re: Black trace when moving around map in sdl2 client

Post by goduck777 »

I found a fix for this bug. It seems to be related to a SDL bug though.

Code: Select all

diff -Naur a/client/gui-sdl2/canvas.c b/client/gui-sdl2/canvas.c
--- a/client/gui-sdl2/canvas.c> 2021-02-17 01:10:17.597121668 -0500
+++ b/client/gui-sdl2/canvas.c> 2021-02-17 01:10:37.549121428 -0500
@@ -91,6 +91,7 @@
   SDL_Rect src_rect = {src_x, src_y, width, height};
   SDL_Rect dest_rect = {dest_x, dest_y, width, height};
-
+  SDL_SetSurfaceBlendMode(src->surf, SDL_BLENDMODE_NONE);
   alphablit(src->surf, &src_rect, dest->surf, &dest_rect, 255);
 }
Can someone please help test it and merge it to the repository?
Post Reply