Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package ballerburg for openSUSE:Factory 
checked in at 2022-05-28 22:17:14
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/ballerburg (Old)
 and      /work/SRC/openSUSE:Factory/.ballerburg.new.2254 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "ballerburg"

Sat May 28 22:17:14 2022 rev:2 rq:979616 version:1.2.1

Changes:
--------
--- /work/SRC/openSUSE:Factory/ballerburg/ballerburg.changes    2019-02-28 
21:41:49.625565489 +0100
+++ /work/SRC/openSUSE:Factory/.ballerburg.new.2254/ballerburg.changes  
2022-05-28 22:17:45.893070029 +0200
@@ -1,0 +2,7 @@
+Sat May 28 18:30:41 UTC 2022 - Martin Hauke <mar...@gmx.de>
+
+- Update to version 1.2.1
+  - Bugfix release
+- Build with with sdl2
+
+-------------------------------------------------------------------

Old:
----
  ballerburg-1.2.0.tar.gz

New:
----
  ballerburg-1.2.1.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ ballerburg.spec ++++++
--- /var/tmp/diff_new_pack.QmN5vq/_old  2022-05-28 22:17:46.213070425 +0200
+++ /var/tmp/diff_new_pack.QmN5vq/_new  2022-05-28 22:17:46.217070430 +0200
@@ -1,7 +1,7 @@
 #
 # spec file for package ballerburg
 #
-# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2022 SUSE LLC
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -12,12 +12,12 @@
 # license that conforms to the Open Source Definition (Version 1.9)
 # published by the Open Source Initiative.
 
-# Please submit bugfixes or comments via http://bugs.opensuse.org/
+# Please submit bugfixes or comments via https://bugs.opensuse.org/
 #
 
 
 Name:           ballerburg
-Version:        1.2.0
+Version:        1.2.1
 Release:        0
 Summary:        Two players, two castles, and a hill in between
 License:        GPL-3.0-only
@@ -29,7 +29,8 @@
 BuildRequires:  cmake
 BuildRequires:  pkgconfig
 BuildRequires:  update-desktop-files
-BuildRequires:  pkgconfig(SDL_gfx)
+#BuildRequires:  pkgconfig(SDL_gfx)
+BuildRequires:  pkgconfig(sdl2)
 
 %description
 Ballerburg is a castle combat game. Two players (which can be human or

++++++ ballerburg-1.2.0.tar.gz -> ballerburg-1.2.1.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ballerburg-1.2.0/CMakeLists.txt 
new/ballerburg-1.2.1/CMakeLists.txt
--- old/ballerburg-1.2.0/CMakeLists.txt 2015-03-29 17:04:01.000000000 +0200
+++ new/ballerburg-1.2.1/CMakeLists.txt 2022-05-28 09:55:50.000000000 +0200
@@ -2,9 +2,9 @@
 # CMake build file for Ballerburg
 # ###############################
 
-cmake_minimum_required (VERSION 2.8 FATAL_ERROR)
+cmake_minimum_required (VERSION 3.3 FATAL_ERROR)
 project (ballerburg C)
-set(VERSION 1.2.0)
+set(VERSION 1.2.1)
 
 set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake")
 
@@ -17,7 +17,7 @@
 # Set build type to "Release" if user did not specify any build type yet
 # Other possible values: Debug, Release, RelWithDebInfo and MinSizeRel
 if(NOT CMAKE_BUILD_TYPE)
-        set(CMAKE_BUILD_TYPE Release)
+       set(CMAKE_BUILD_TYPE Release)
 endif(NOT CMAKE_BUILD_TYPE)
 
 
@@ -62,20 +62,17 @@
 # Check for libraries:
 # ####################
 
-if(ENABLE_SDL2)
-       find_package(SDL2 REQUIRED)
-       if(NOT SDL2_FOUND)
-               message(FATAL_ERROR "SDL2 library not found!")
-       endif(NOT SDL2_FOUND)
+find_package(SDL2)
+if(SDL2_FOUND)
        set(SDL_INCLUDE_DIR ${SDL2_INCLUDE_DIR})
        set(SDL_LIBRARY ${SDL2_LIBRARY})
        set(SDLMAIN_LIBRARY ${SDL2MAIN_LIBRARY})
-else(ENABLE_SDL2)
+else(SDL2_FOUND)
        find_package(SDL REQUIRED)
        if(NOT SDL_FOUND)
                message(FATAL_ERROR "SDL library not found!")
        endif(NOT SDL_FOUND)
-endif(ENABLE_SDL2)
+endif(SDL2_FOUND)
 
 find_package(Math REQUIRED)
 find_package(Gettext)
@@ -85,16 +82,16 @@
 # ################
 
 # Additional CFLAGS suggested by the SDL library:
-if(ENABLE_SDL2)
+if(SDL2_FOUND)
        add_definitions(-DWITH_SDL2)
        execute_process(COMMAND pkg-config --cflags-only-other sdl2
                        OUTPUT_VARIABLE DETECTED_SDL_CFLAGS
                        ERROR_QUIET OUTPUT_STRIP_TRAILING_WHITESPACE)
-else(ENABLE_SDL2)
+else(SDL2_FOUND)
        execute_process(COMMAND pkg-config --cflags-only-other sdl
                        OUTPUT_VARIABLE DETECTED_SDL_CFLAGS
                        ERROR_QUIET OUTPUT_STRIP_TRAILING_WHITESPACE)
-endif(ENABLE_SDL2)
+endif(SDL2_FOUND)
 if(DETECTED_SDL_CFLAGS)
        add_definitions(${DETECTED_SDL_CFLAGS})
        # message(STATUS "Additional CFLAGS of SDL: ${DETECTED_SDL_CFLAGS}")
@@ -111,7 +108,7 @@
 # Various CFLAGS:
 # ###############
 
-if(CMAKE_COMPILER_IS_GNUCC)
+if(CMAKE_COMPILER_IS_GNUCC OR CMAKE_C_COMPILER_ID MATCHES "Clang")
        set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fsigned-char -Wall")
        set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wextra -Wno-unused-parameter")
        set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wmissing-prototypes 
-Wstrict-prototypes")
@@ -122,7 +119,7 @@
        if (CMAKE_BUILD_TYPE STREQUAL "Debug")
                set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -D_FORTIFY_SOURCE=2")
        endif(CMAKE_BUILD_TYPE STREQUAL "Debug")
-endif(CMAKE_COMPILER_IS_GNUCC)
+endif()
 
 
 # #########################################
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ballerburg-1.2.0/LIESMICH.txt 
new/ballerburg-1.2.1/LIESMICH.txt
--- old/ballerburg-1.2.0/LIESMICH.txt   2015-03-29 17:04:01.000000000 +0200
+++ new/ballerburg-1.2.1/LIESMICH.txt   2022-05-28 09:55:50.000000000 +0200
@@ -1,10 +1,10 @@
 
                 ============================
-                =   Ballerburg SDL v1.2.0  =
+                =   Ballerburg SDL v1.2.1  =
                 ============================
 
            Copyright (C) 1987, 1989  Eckhard Kruse
-           Copyright (C) 2010, 2015  Thomas Huth
+           Copyright (C) 2010, 2022  Thomas Huth
 
 
          F??r meine Schwester Martina Huth - ich werde
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ballerburg-1.2.0/README.txt 
new/ballerburg-1.2.1/README.txt
--- old/ballerburg-1.2.0/README.txt     2015-03-29 17:04:01.000000000 +0200
+++ new/ballerburg-1.2.1/README.txt     2022-05-28 09:55:50.000000000 +0200
@@ -1,10 +1,10 @@
 
                ============================
-               =   Ballerburg SDL v1.2.0  =
+               =   Ballerburg SDL v1.2.1  =
                ============================
 
            Copyright (C) 1987, 1989  Eckhard Kruse
-           Copyright (C) 2010, 2015  Thomas Huth
+           Copyright (C) 2010, 2022  Thomas Huth
 
 
           For my sister Martina Huth - I will never
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ballerburg-1.2.0/cmake/FindMath.cmake 
new/ballerburg-1.2.1/cmake/FindMath.cmake
--- old/ballerburg-1.2.0/cmake/FindMath.cmake   2015-03-29 17:04:00.000000000 
+0200
+++ new/ballerburg-1.2.1/cmake/FindMath.cmake   2022-05-28 09:55:50.000000000 
+0200
@@ -9,7 +9,7 @@
 find_library(MATH_LIBRARY NAMES m)
 
 include(FindPackageHandleStandardArgs)
-find_package_handle_standard_args(MATH DEFAULT_MSG
+find_package_handle_standard_args(Math DEFAULT_MSG
                                   MATH_LIBRARY MATH_INCLUDE_DIR)
 
 mark_as_advanced(MATH_LIBRARY MATH_INCLUDE_DIR)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ballerburg-1.2.0/configure 
new/ballerburg-1.2.1/configure
--- old/ballerburg-1.2.0/configure      2015-03-29 17:04:01.000000000 +0200
+++ new/ballerburg-1.2.1/configure      2022-05-28 09:55:50.000000000 +0200
@@ -16,7 +16,6 @@
   echo "  --prefix=<path>         Set the install prefix to path"
   echo "  --enable-debug          Enable debug (non-optimized) build"
   echo "  --disable-color-make    Disable color output for Makefiles"
-  echo "  --enable-sdl2           Compile with libsdl 2.0 instead of 1.2"
   echo
   echo "Please run cmake directly for full control over the build."
   echo
@@ -52,12 +51,6 @@
     --disable-color-make)
       cmake_args="$cmake_args -DCMAKE_COLOR_MAKEFILE:BOOL=0"
     ;;
-    --enable-sdl2)
-      cmake_args="$cmake_args -DENABLE_SDL2:BOOL=1"
-    ;;
-    --disable-sdl2)
-      cmake_args="$cmake_args -DENABLE_SDL2:BOOL=0"
-    ;;
     *)
       echo "Invalid argument: $preq"
       echo "Run $0 --help for a list of valid parameters."
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ballerburg-1.2.0/doc/en/manual.html 
new/ballerburg-1.2.1/doc/en/manual.html
--- old/ballerburg-1.2.0/doc/en/manual.html     2015-03-29 17:04:01.000000000 
+0200
+++ new/ballerburg-1.2.1/doc/en/manual.html     2022-05-28 09:55:50.000000000 
+0200
@@ -186,7 +186,7 @@
 things and repair your castle. You can trigger one of the actions by clicking
 on the price of the corresponding entry.
 However, this is only possible if the entry is active. In case it is inactive,
-you either do not have enough money or one of the following reasons occured:
+you either do not have enough money or one of the following reasons occurred:
 </p>
 <ul>
  <li>You can have only one vane. If you already have one, the entry for a new
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ballerburg-1.2.0/src/CMakeLists.txt 
new/ballerburg-1.2.1/src/CMakeLists.txt
--- old/ballerburg-1.2.0/src/CMakeLists.txt     2015-03-29 17:04:01.000000000 
+0200
+++ new/ballerburg-1.2.1/src/CMakeLists.txt     2022-05-28 09:55:50.000000000 
+0200
@@ -1,18 +1,24 @@
 
 
-include_directories(${CMAKE_BINARY_DIR} ${MATH_INCLUDE_DIR}
-                    ${SDL_INCLUDE_DIR} ${SDLGFX_INCLUDE_DIR})
+include_directories(${CMAKE_BINARY_DIR} ${SDL_INCLUDE_DIR})
 
+if(MATH_INCLUDE_DIR)
+       include_directories(${MATH_INCLUDE_DIR})
+endif(MATH_INCLUDE_DIR)
 
 add_executable (ballerburg baller1.c baller2.c ballergui.c cannoneer.c
                        screen.c psg.c dlgAlert.c sdlgui.c market.c
                        music.c paths.c settings.c sdlgfx.c)
 
-target_link_libraries(ballerburg ${SDL_LIBRARY} ${MATH_LIBRARY})
+target_link_libraries(ballerburg ${SDL_LIBRARY})
 
 if(SDLMAIN_LIBRARY)
        target_link_libraries(ballerburg ${SDLMAIN_LIBRARY})
 endif(SDLMAIN_LIBRARY)
 
+if(MATH_LIBRARY)
+       target_link_libraries(ballerburg ${MATH_LIBRARY})
+endif(MATH_LIBRARY)
+
 install(TARGETS ballerburg RUNTIME DESTINATION ${BINDIR})
 install(FILES baller.dat baller.mus DESTINATION ${DATADIR})
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ballerburg-1.2.0/src/baller1.c 
new/ballerburg-1.2.1/src/baller1.c
--- old/ballerburg-1.2.0/src/baller1.c  2015-03-29 17:04:01.000000000 +0200
+++ new/ballerburg-1.2.1/src/baller1.c  2022-05-28 09:55:50.000000000 +0200
@@ -51,8 +51,9 @@
 
 short mx, my, bt, xy[100],
        bur[2],bx[2],by[2], ge[2],pu[2],ku[2],vo[2],st[2],kn[2],
-       wx[2],wy[2], *bg, zug,n, p[6], max_rund,
+       wx[2],wy[2], *bg, zug, n, max_rund,
        *burgen[30], b_anz;
+int prices[6];
 static short ws, wc, t_gew[COMP_NUM][COMP_NUM+4];
 int ftx, fty, ftw, fth;     /* Koordinaten von "Fertig" */
 void *bur_ad;
@@ -217,8 +218,8 @@
        wnd=rand()%60-30;
        st[0]=st[1]=20;
        kn[0]=kn[1]=0;
-       for ( j=0;j<6;j++ )
-               p[j]=pr[j]*(95+rand()%11)/100;
+       for (j = 0; j < 6; j++)
+               prices[j] = pr[j] * (95 + rand() % 11) / 100;
        bild();
        for ( n=0;n<2;n++ )
        {
@@ -316,7 +317,7 @@
        n=zug&1;
        bg=burgen[bur[n]];
        for ( a=0;a<10;a++ ) if ( ka[n][a].x>-1 ) break;
-       if ( a==10 && i<10 && bg[40]>vo[n] && ge[n]<p[2]/3 && au_kap &&
+       if ( a==10 && i<10 && bg[40]>vo[n] && ge[n]<prices[2]/3 && au_kap &&
                        
ft[n][0].x+ft[n][1].x+ft[n][2].x+ft[n][3].x+ft[n][4].x==-5 )
                end=n+33;
 
@@ -325,9 +326,15 @@
                static int h[2];
                for (n=0;n<2;n++)
                {
-                       
h[n]=ge[n]+pu[n]*p[4]/30+ku[n]*p[5]/2+(wx[n]>-1)*p[3]+vo[n]*4;
-                       for (i=0;i<5;i++) if ( ft[n][i].x>-1 ) h[n]+=p[1];
-                       for (i=0;i<10;i++) if ( ka[n][i].x>-1 ) h[n]+=p[2];
+                       h[n] = ge[n] + pu[n] * prices[4] / 30
+                              + ku[n] * prices[5] / 2
+                              + (wx[n] > -1) * prices[3] + vo[n] * 4;
+                       for (i = 0; i < 5; i++)
+                               if (ft[n][i].x > -1)
+                                       h[n] += prices[1];
+                       for (i = 0; i < 10; i++)
+                               if (ka[n][i].x > -1)
+                                       h[n] += prices[2];
                }
                end=65+(h[1]<h[0]);
        }
@@ -367,9 +374,9 @@
        for ( j=0;j<5;j++ ) ge[n]+=(40+rand()%31)*(ft[n][j].x>-1);
        for ( j=0;j<6;j++ )
        {
-               p[j]+=psp[j]*(rand()%99)/98-psp[j]/2;
-               p[j]=Max(p[j],pmi[j]);
-               p[j]=Min(p[j],pma[j]);
+               prices[j] += psp[j] * (rand()%99)/98 - psp[j]/2;
+               prices[j] = Max(prices[j], pmi[j]);
+               prices[j] = Min(prices[j], pma[j]);
        }
        drw_gpk(0);
 }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ballerburg-1.2.0/src/baller1.h 
new/ballerburg-1.2.1/src/baller1.h
--- old/ballerburg-1.2.0/src/baller1.h  2015-03-29 17:04:01.000000000 +0200
+++ new/ballerburg-1.2.1/src/baller1.h  2022-05-28 09:55:50.000000000 +0200
@@ -22,9 +22,10 @@
 
 extern short mx, my, bt, xy[100],
        bur[2],bx[2],by[2], ge[2],pu[2],ku[2],vo[2],st[2],kn[2],
-       wx[2],wy[2], *bg, zug,n, p[6], max_rund,
+       wx[2],wy[2], *bg, zug,n, max_rund,
        fx,fy,fw,fh,
        *burgen[], b_anz;
+extern int prices[6];
 extern int ftx, fty, ftw, fth;
 extern const char *l_nam, *r_nam;
 extern int f;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ballerburg-1.2.0/src/baller2.c 
new/ballerburg-1.2.1/src/baller2.c
--- old/ballerburg-1.2.0/src/baller2.c  2015-03-29 17:04:01.000000000 +0200
+++ new/ballerburg-1.2.1/src/baller2.c  2022-05-28 09:55:50.000000000 +0200
@@ -78,25 +78,25 @@
 
        st[n]=16;
        for ( i=0;i<10;i++ ) if ( ka[n][i].x>-1 ) break;
-       if ( pu[n]<20 && ge[n]>=p[4] )
+       if (pu[n] < 20 && ge[n] >= prices[4])
        {
-               pu[n]+=30;        /* Pulv. kaufen*/
-               ge[n]-=p[4];
+               pu[n] += 30;        /* Pulv. kaufen*/
+               ge[n] -= prices[4];
        }
-       if ( !ku[n] && ge[n]>=p[5] )
+       if (!ku[n] && ge[n] >= prices[5])
        {
-               ku[n]+=2;         /* Kug.  kaufen*/
-               ge[n]-=p[5];
+               ku[n] += 2;         /* Kug.  kaufen*/
+               ge[n] -= prices[5];
        }
-       if ( i>9 && ge[n]>=p[2] )
+       if (i > 9 && ge[n] >= prices[2])
        {
-               init_ka(i=0,639*n);        /* Ka. kauf.*/
-               ge[n]-=p[2];
+               init_ka(i=0, 639*n);    /* Ka. kauf.*/
+               ge[n] -= prices[2];
        }
-       if ( (ft[n][0].x<0 || ft[n][1].x<0 || ft[n][2].x<0 ) && ge[n]>=p[1] &&
-                       cw[n]>2 )
+       if ((ft[n][0].x < 0 || ft[n][1].x < 0 || ft[n][2].x < 0)
+            && ge[n] >= prices[1] && cw[n] > 2)
        {
-               ge[n]-=p[1];        /* F?rderturm kaufen */
+               ge[n] -= prices[1];     /* F?rderturm kaufen */
                fturm();
        }
        drw_all();
@@ -283,7 +283,8 @@
                }
                color(1);
                kugel( (int)x,(int)y );
-               scr_update(Min(ox, x)-3, Min(oy, y)-3, abs(ox-x)+7, 
abs(oy-y)+7);
+               scr_update(Min(ox, x) - 3, Min(oy, y) - 3,
+                          abs((int)(ox - x)) + 7, abs((int)(oy - y)) + 7);
                SDL_Delay(8);
                SDL_PumpEvents();
 
@@ -722,7 +723,7 @@
                s[1]=j&2 ? _(kn12) : _(kn6);
                if ( j&4 ) s[i++] = _(kn14);
 
-               if (ge[n] > p[1] && t < 3)
+               if (ge[n] > prices[1] && t < 3)
                        s[i++] = _(kn5);
                if ((st[n] > 40 && vo[n] < bg[40]) || st[n] > 70)
                        s[i++] = _(kn3);
@@ -732,7 +733,7 @@
                        s[1] = t<2 ? _(kn1) : _(kn2);
                if (t > 2)
                        s[i++] = _(kn2);
-               if (k < 1 && ge[n] < p[2])
+               if (k < 1 && ge[n] < prices[2])
                        s[i++] = _(kn4);
                if ((kn[n]&15) > 4)
                {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ballerburg-1.2.0/src/ballergui.c 
new/ballerburg-1.2.1/src/ballergui.c
--- old/ballerburg-1.2.0/src/ballergui.c        2015-03-29 17:04:01.000000000 
+0200
+++ new/ballerburg-1.2.1/src/ballergui.c        2022-05-28 09:55:50.000000000 
+0200
@@ -112,6 +112,16 @@
                                return 1;
                        }
                        break;
+#if WITH_SDL2
+                case SDL_WINDOWEVENT:
+                       switch(ev.window.event) {
+                        case SDL_WINDOWEVENT_EXPOSED:
+                        case SDL_WINDOWEVENT_RESTORED:
+                               scr_update(0, 0, 0, 0);
+                               break;
+                       }
+                       break;
+#endif /* WITH_SDL2 */
                }
 
                ev_avail = SDL_PollEvent(&ev);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ballerburg-1.2.0/src/cannoneer.c 
new/ballerburg-1.2.1/src/cannoneer.c
--- old/ballerburg-1.2.0/src/cannoneer.c        2015-03-29 17:04:01.000000000 
+0200
+++ new/ballerburg-1.2.1/src/cannoneer.c        2022-05-28 09:55:50.000000000 
+0200
@@ -203,7 +203,7 @@
        }
        while (i != SOK && i != SAB);
 
-       SDL_UpdateRect(surf, 0,0, 0,0);
+       scr_update(0,0, 0,0);
 
        ka[n][k].w=wi;
        ka[n][k].p=pv;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ballerburg-1.2.0/src/dlgAlert.c 
new/ballerburg-1.2.1/src/dlgAlert.c
--- old/ballerburg-1.2.0/src/dlgAlert.c 2015-03-29 17:04:01.000000000 +0200
+++ new/ballerburg-1.2.1/src/dlgAlert.c 2022-05-28 09:55:50.000000000 +0200
@@ -154,7 +154,7 @@
 
        i = SDLGui_DoDialog(alertdlg, NULL);
 
-       SDL_UpdateRect(surf, 0,0, 0,0);
+       scr_update(0,0, 0,0);
        SDL_ShowCursor(bOldMouseVisibility);
 
        return (i == DLGALERT_OK);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ballerburg-1.2.0/src/market.c 
new/ballerburg-1.2.1/src/market.c
--- old/ballerburg-1.2.0/src/market.c   2015-03-29 17:04:01.000000000 +0200
+++ new/ballerburg-1.2.1/src/market.c   2022-05-28 09:55:50.000000000 +0200
@@ -201,7 +201,7 @@
 
        for (a = 0; a < 6; a++)
        {
-               zahl(SM1 + a, p[a]);
+               zahl(SM1 + a, prices[a]);
        }
 
        do
@@ -243,8 +243,8 @@
                for (a = 0; a < 6; a++)
                {
                        // fprintf(stderr,"a=%i: ge=%i p=%i an_erl=%i bg=%i 
t=%i k=%i wx=%i\n",
-                       //         a, ge[n], p[a], an_erl, bg[0], t, k, wx[n]);
-                       if (ge[n] < p[a]
+                       //         a, ge[n], prices[a], an_erl, bg[0], t, k, 
wx[n]);
+                       if (ge[n] < prices[a]
                            || (!an_erl && a == 0)
                            || (a == 1 && (bg[0]+t*30 > 265 || t > 4))
                            || (a == 2 && k > 9)
@@ -270,7 +270,7 @@
                }
                else if (a != FERTIG && a >= SM1 && a <= SM6)
                {
-                       ge[n] -= p[a-SM1];
+                       ge[n] -= prices[a-SM1];
                        if (a < SM5)
                        {
                                drw_all();
@@ -295,5 +295,5 @@
        }
        while (a != FERTIG);
 
-       SDL_UpdateRect(surf, 0,0, 0,0);
+       scr_update(0,0, 0,0);
 }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ballerburg-1.2.0/src/paths.c 
new/ballerburg-1.2.1/src/paths.c
--- old/ballerburg-1.2.0/src/paths.c    2015-03-29 17:04:01.000000000 +0200
+++ new/ballerburg-1.2.1/src/paths.c    2022-05-28 09:55:50.000000000 +0200
@@ -26,10 +26,6 @@
 #include "config.h"
 #include "paths.h"
 
-#if defined(WIN32) && !defined(mkdir)
-#define mkdir(name,mode) mkdir(name)
-#endif  /* WIN32 */
-
 #ifdef WIN32
 #define PATHSEP '\\'
 #else
@@ -40,9 +36,6 @@
 static char sWorkingDir[FILENAME_MAX];    /* Working directory */
 static char sDataDir[FILENAME_MAX];       /* Directory where data files can be 
found */
 static char sLocaleDir[FILENAME_MAX];     /* Directory where locale files can 
be found */
-static char sUserHomeDir[FILENAME_MAX];   /* User's home directory ($HOME) */
-static char sProgHomeDir[FILENAME_MAX];   /* Program's home directory 
($HOME/.config/ballerburg/) */
-
 
 /**
  * Return pointer to current working directory string
@@ -69,23 +62,6 @@
 }
 
 /**
- * Return pointer to user's home directory string
- */
-const char *Paths_GetUserHome(void)
-{
-       return sUserHomeDir;
-}
-
-/**
- * Return pointer to program's home directory string
- */
-const char *Paths_GetProgHome(void)
-{
-       return sProgHomeDir;
-}
-
-
-/**
  * Return TRUE if file exists, is readable or writable at least and is not
  * a directory.
  */
@@ -103,16 +79,6 @@
 
 
 /**
- * Return TRUE if directory exists.
- */
-static bool Paths_DirExists(const char *path)
-{
-       struct stat buf;
-       return (stat(path, &buf) == 0 && S_ISDIR(buf.st_mode));
-}
-
-
-/**
  * Explore the PATH environment variable to see where our executable is
  * installed.
  */
@@ -231,48 +197,6 @@
 
 
 /**
- * Initialize the users home directory string
- * and program's home directory (~/.config/xxx)
- */
-static void Paths_InitHomeDirs(void)
-{
-       char *psHome;
-
-       psHome = getenv("HOME");
-       if (!psHome)
-       {
-               /* Windows home path? */
-               psHome = getenv("HOMEPATH");
-       }
-       if (!psHome)
-       {
-               /* $HOME not set, so let's use current working dir as home */
-               strcpy(sUserHomeDir, sWorkingDir);
-               strcpy(sProgHomeDir, sWorkingDir);
-       }
-       else
-       {
-               strncpy(sUserHomeDir, psHome, FILENAME_MAX);
-               sUserHomeDir[FILENAME_MAX-1] = 0;
-
-               /* Try to use a .config directory in the users home directory */
-               snprintf(sProgHomeDir, FILENAME_MAX, "%s%c./config/ballerburg",
-                        sUserHomeDir, PATHSEP);
-               if (!Paths_DirExists(sProgHomeDir))
-               {
-                       /* Program home directory does not exists yet...
-                        * ...so let's try to create it: */
-                       if (1 /*mkdir(sProgHomeDir, 0755) != 0*/)
-                       {
-                               /* Failed to create, so use user's home dir 
instead */
-                               strcpy(sProgHomeDir, sUserHomeDir);
-                       }
-               }
-       }
-}
-
-
-/**
  * Initialize the data directory string
  */
 static void Paths_InitPackageDir(char *psPkgDir, const char *psRelPath,
@@ -327,9 +251,6 @@
                strcpy(sWorkingDir, ".");
        }
 
-       /* Init the user's home directory string */
-       Paths_InitHomeDirs();
-
        /* Get the directory where the executable resides */
        psExecDir = Paths_InitExecDir(argv0);
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ballerburg-1.2.0/src/paths.h 
new/ballerburg-1.2.1/src/paths.h
--- old/ballerburg-1.2.0/src/paths.h    2015-03-29 17:04:01.000000000 +0200
+++ new/ballerburg-1.2.1/src/paths.h    2022-05-28 09:55:50.000000000 +0200
@@ -12,7 +12,5 @@
 extern const char *Paths_GetWorkingDir(void);
 extern const char *Paths_GetDataDir(void);
 extern const char *Paths_GetLocaleDir(void);
-extern const char *Paths_GetUserHome(void);
-extern const char *Paths_GetProgHome(void);
 
 #endif
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ballerburg-1.2.0/src/screen.c 
new/ballerburg-1.2.1/src/screen.c
--- old/ballerburg-1.2.0/src/screen.c   2015-03-29 17:04:01.000000000 +0200
+++ new/ballerburg-1.2.1/src/screen.c   2022-05-28 09:55:50.000000000 +0200
@@ -17,6 +17,7 @@
     along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */
 
+#include <stdbool.h>
 #include <stdlib.h>
 #include <stdio.h>
 #include <string.h>
@@ -38,6 +39,7 @@
 #if USE_SDL2_RENDERER
 static SDL_Renderer *sdlRenderer;
 static SDL_Texture *sdlTexture;
+static bool bIsSoftwareRenderer = false;
 #else
 static SDL_Surface *windowSurf;
 #endif
@@ -60,6 +62,10 @@
 static int fullscreenflag = 0;
 static void scr_sdl2_init(void)
 {
+#if USE_SDL2_RENDERER
+       SDL_RendererInfo sRenderInfo = { 0 };
+#endif
+
        sdlWindow = SDL_CreateWindow("Ballerburg SDL",
                                     SDL_WINDOWPOS_UNDEFINED, 
SDL_WINDOWPOS_UNDEFINED,
                                     640, 480, fullscreenflag);
@@ -73,6 +79,8 @@
        SDL_RenderSetLogicalSize(sdlRenderer, 640, 480);
        sdlTexture = SDL_CreateTexture(sdlRenderer, SDL_PIXELFORMAT_RGB888,
                                        SDL_TEXTUREACCESS_STREAMING, 640, 480);
+       SDL_GetRendererInfo(sdlRenderer, &sRenderInfo);
+       bIsSoftwareRenderer = sRenderInfo.flags & SDL_RENDERER_SOFTWARE;
 #else
        windowSurf = SDL_GetWindowSurface(sdlWindow);
 #endif
@@ -132,7 +140,7 @@
 void scr_togglefullscreen(void)
 {
 #if WITH_SDL2
-#if USER_SDL2_RENDERER
+#if USE_SDL2_RENDERER
        SDL_DestroyTexture(sdlTexture);
        SDL_DestroyRenderer(sdlRenderer);
        fullscreenflag ^= SDL_WINDOW_FULLSCREEN_DESKTOP;
@@ -141,7 +149,7 @@
 #endif
        SDL_DestroyWindow(sdlWindow);
        scr_sdl2_init();
-       SDL_UpdateRect(surf, 0, 0, 640, 480);
+       scr_update(0, 0, 640, 480);
 #else
        SDL_WM_ToggleFullScreen(surf);
 #endif
@@ -209,7 +217,7 @@
 
        SDLGui_Text(x, y, text);
 
-       SDL_UpdateRects(surf, 1, &rect);
+       scr_update_rects(surf, 1, &rect);
 }
 
 /**
@@ -227,7 +235,7 @@
 
        SDLGui_Text(rect.x, rect.y, text);
 
-       SDL_UpdateRects(surf, 1, &rect);
+       scr_update_rects(surf, 1, &rect);
 }
 
 void scr_circle(int x, int y, int w)
@@ -240,7 +248,7 @@
        rect.y = max(y-w, 0);
        rect.w = min(2*w, 640-x+w);
        rect.h = min(2*w, 480-y+w);
-       SDL_UpdateRects(surf, 1, &rect);
+       scr_update_rects(surf, 1, &rect);
 }
 
 static void update_fill_color(void)
@@ -297,7 +305,7 @@
        SDL_FillRect(surf, &rect, SDL_MapRGB(surf->format,r,g,b));
        rectangleColor(surf, xy[0], xy[1], xy[2], xy[3], the_color);
 
-       SDL_UpdateRects(surf, 1, &rect);
+       scr_update_rects(surf, 1, &rect);
 }
 
 
@@ -311,7 +319,7 @@
        rect.h = h;
        SDL_FillRect(surf, &rect, SDL_MapRGB(surf->format,0xff,0xff,0xff));
 
-       SDL_UpdateRect(surf, x,y, w,h);
+       scr_update(x,y, w,h);
 }
 
 
@@ -325,7 +333,7 @@
        rect.h = h;
        SDL_FillRect(surf, &rect, bg_color);
 
-       SDL_UpdateRect(surf, x,y, w,h);
+       scr_update(x,y, w,h);
 }
 
 
@@ -334,10 +342,8 @@
        int i;
        Sint16 vx[512], vy[512];
 
-       //printf("v_fillarea %i\n", num);
-
        if (num > 512) {
-               puts("v_fillarea overlow");
+               puts("scr_fillarea overflow");
                exit(-2);
        }
 
@@ -348,7 +354,7 @@
 
        filledPolygonColor(surf, vx, vy, num, fill_color);
 
-       SDL_UpdateRect(surf, 0,0, 640,480);
+       scr_update(0,0, 640,480);
 }
 
 void scr_pline(short num, short *xy)
@@ -383,7 +389,7 @@
        if (xy[i*2+1] < miny)  miny = xy[i*2+1];
 
        //printf("blit %i %i %i %i\n", minx,miny, maxx-minx+1,maxy-miny+1);
-       SDL_UpdateRect(surf, minx,miny, maxx-minx+1,maxy-miny+1);
+       scr_update(minx,miny, maxx-minx+1,maxy-miny+1);
 }
 
 
@@ -452,7 +458,7 @@
 
        SDLGui_DrawButton(donebuttondlg, 1);
 
-       SDL_UpdateRect(surf, 0,0, 0,0);
+       scr_update(0,0, 0,0);
 }
 
 
@@ -526,49 +532,48 @@
                SDL_FreeSurface(s->bgsurf);
        }
 
-       SDL_UpdateRects(surf, 1, &s->rect);
+       scr_update_rects(surf, 1, &s->rect);
 
        free(ps);
 }
 
-#if WITH_SDL2
-void SDL_UpdateRects(SDL_Surface *screen, int numrects, SDL_Rect *rects)
+void scr_update_rects(SDL_Surface *screen, int numrects, SDL_Rect *rects)
 {
-#if USE_SDL2_RENDERER
+#if WITH_SDL2
+# if USE_SDL2_RENDERER
        SDL_UpdateTexture(sdlTexture, NULL, screen->pixels, screen->pitch);
-       SDL_RenderClear(sdlRenderer);
+       if (!bIsSoftwareRenderer)
+               SDL_RenderClear(sdlRenderer);
        SDL_RenderCopy(sdlRenderer, sdlTexture, NULL, NULL);
        SDL_RenderPresent(sdlRenderer);
-#else
+# else
        SDL_BlitSurface(surf, rects, windowSurf, rects);
        SDL_UpdateWindowSurfaceRects(sdlWindow, rects, numrects);
+# endif
+#else
+       SDL_UpdateRects(screen, numrects, rects);
 #endif
 }
 
-void SDL_UpdateRect(SDL_Surface *screen, Sint32 x, Sint32 y, Sint32 w, Sint32 
h)
+void scr_update(int x, int y, int w, int h)
 {
        SDL_Rect rect;
-       if (w == 0 && h == 0) {
-               w = 640;
-               h = 480;
-       }
-       rect.x = x; rect.y = y;
-       rect.w = w; rect.h = h;
-       SDL_UpdateRects(screen, 1, &rect);
-}
-#endif
 
-void scr_update(int x, int y, int w, int h)
-{
        if (x >= 640 || y >= 480)
                return;
        if (x < 0)
                x = 0;
        if (y < 0)
                y = 0;
+       if (w == 0 && h == 0) {
+               w = 640;
+               h = 480;
+       }
        if (x + w > 640)
                w = 640 - x;
        if (y + h > 480)
                h = 480 - y;
-       SDL_UpdateRect(surf, x, y, w, h);
+       rect.x = x; rect.y = y;
+       rect.w = w; rect.h = h;
+       scr_update_rects(surf, 1, &rect);
 }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ballerburg-1.2.0/src/screen.h 
new/ballerburg-1.2.1/src/screen.h
--- old/ballerburg-1.2.0/src/screen.h   2015-03-29 17:04:01.000000000 +0200
+++ new/ballerburg-1.2.1/src/screen.h   2022-05-28 09:55:50.000000000 +0200
@@ -46,11 +46,7 @@
 void *scr_save_bg(int x, int y, int w, int h);
 void scr_restore_bg(void *ps);
 void scr_update(int x, int y, int w, int h);
+void scr_update_rects(SDL_Surface *screen, int numrects, SDL_Rect *rects);
 
 int DlgAlert_Notice(const char *text, const char *button);
 int DlgAlert_Query(const char *text, const char *button1, const char *button2);
-
-#if WITH_SDL2
-void SDL_UpdateRects(SDL_Surface *screen, int numrects, SDL_Rect *rects);
-void SDL_UpdateRect(SDL_Surface *screen, Sint32 x, Sint32 y, Sint32 w, Sint32 
h);
-#endif
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ballerburg-1.2.0/src/sdlgui.c 
new/ballerburg-1.2.1/src/sdlgui.c
--- old/ballerburg-1.2.0/src/sdlgui.c   2015-03-29 17:04:01.000000000 +0200
+++ new/ballerburg-1.2.1/src/sdlgui.c   2022-05-28 09:55:50.000000000 +0200
@@ -27,7 +27,7 @@
 
 #include "font8x16.h"
 
-#if WITH_SDL2
+#if WITH_SDL2 && !defined(SDL_SRCCOLORKEY)
 #define SDL_SRCCOLORKEY SDL_TRUE
 #endif
 
@@ -41,14 +41,16 @@
 static int current_object = 0;              /* Current selected object */
 static bool has_utf8;
 
-#if WITH_SDL2
-static inline int SDL_SetColors(SDL_Surface *surface, SDL_Color *colors,
+static inline int SDLGui_SetColors(SDL_Surface *surface, SDL_Color *colors,
                                 int firstcolor, int ncolors)
 {
+#if WITH_SDL2
        return SDL_SetPaletteColors(surface->format->palette, colors,
                                    firstcolor, ncolors);
-}
+#else
+       return SDL_SetColors(surface, colors, firstcolor, ncolors);
 #endif
+}
 
 /**
  * Load an 1 plane XBM into a 8 planes SDL_Surface.
@@ -110,7 +112,6 @@
        }
 
        /* Initialize the font graphics: */
-//     pSmallFontGfx = SDLGui_LoadXBM(font5x8_width, font5x8_height, 
font5x8_bits);
        pBigFontGfx = SDLGui_LoadXBM(font8x16_width, font8x16_height, 
font8x16_bits);
        if (/*pSmallFontGfx == NULL ||*/ pBigFontGfx == NULL)
        {
@@ -119,11 +120,9 @@
        }
 
        /* Set color palette of the font graphics: */
-       //SDL_SetColors(pSmallFontGfx, blackWhiteColors, 0, 2);
-       SDL_SetColors(pBigFontGfx, blackWhiteColors, 0, 2);
+       SDLGui_SetColors(pBigFontGfx, blackWhiteColors, 0, 2);
 
        /* Set font color 0 as transparent: */
-       //SDL_SetColorKey(pSmallFontGfx, SDL_SRCCOLORKEY, 0);
        SDL_SetColorKey(pBigFontGfx, SDL_SRCCOLORKEY, 0);
 
        /* Check for UTF-8 locale */
@@ -191,7 +190,7 @@
 
        if (pFontGfx == NULL)
        {
-               fprintf(stderr, "Error: A problem with the font occured!\n");
+               fprintf(stderr, "Error: A problem with the font occurred!\n");
                return -1;
        }
 
@@ -240,7 +239,7 @@
                return c;
        }
 
-       /* Quick and dirty convertion for latin1 characters only... */
+       /* Quick and dirty conversion for latin1 characters only... */
        if ((c & 0xc0) == 0xc0)
        {
                c = c << 6;
@@ -661,7 +660,7 @@
                        SDL_FillRect(pSdlGuiScrn, &cursorrect, cursorCol);
                }
                SDLGui_Text(rect.x, rect.y, dlg[objnum].txt);  /* Draw text */
-               SDL_UpdateRects(pSdlGuiScrn, 1, &rect);
+               scr_update_rects(pSdlGuiScrn, 1, &rect);
        }
        while (!bStopEditing);
 
@@ -738,7 +737,7 @@
                        break;
                }
        }
-       SDL_UpdateRect(pSdlGuiScrn, 0,0,0,0);
+       scr_update(0,0,0,0);
 }
 
 
@@ -805,8 +804,8 @@
 /*-----------------------------------------------------------------------*/
 /**
  * Show and process a dialog. Returns the button number that has been
- * pressed or SDLGUI_UNKNOWNEVENT if an unsupported event occured (will be
- * stored in parameter pEventOut).
+ * pressed or SDLGUI_UNKNOWNEVENT if an unsupported event occurred (will
+ * be stored in parameter pEventOut).
  */
 int SDLGui_DoDialog(SGOBJ *dlg, SDL_Event *pEventOut)
 {
@@ -842,7 +841,8 @@
                                          pSdlGuiScrn->format->Rmask, 
pSdlGuiScrn->format->Gmask, pSdlGuiScrn->format->Bmask, 
pSdlGuiScrn->format->Amask);
        if (pSdlGuiScrn->format->palette != NULL)
        {
-               SDL_SetColors(pBgSurface, pSdlGuiScrn->format->palette->colors, 
0, pSdlGuiScrn->format->palette->ncolors-1);
+               SDLGui_SetColors(pBgSurface, 
pSdlGuiScrn->format->palette->colors, 0,
+                                pSdlGuiScrn->format->palette->ncolors-1);
        }
 
        if (pBgSurface != NULL)
@@ -920,8 +920,11 @@
                                        {
                                                dlg[obj].state |= SG_SELECTED;
                                                SDLGui_DrawButton(dlg, obj);
-                                               SDL_UpdateRect(pSdlGuiScrn, 
(dlg[0].x+dlg[obj].x)*sdlgui_fontwidth-2, 
(dlg[0].y+dlg[obj].y)*sdlgui_fontheight-2,
-                                                              
dlg[obj].w*sdlgui_fontwidth+4, dlg[obj].h*sdlgui_fontheight+4);
+                                               rct.x = (dlg[0].x + dlg[obj].x) 
* sdlgui_fontwidth - 2;
+                                               rct.y = (dlg[0].y + dlg[obj].y) 
* sdlgui_fontheight - 2;
+                                               rct.w = dlg[obj].w * 
sdlgui_fontwidth + 4;
+                                               rct.h = dlg[obj].h * 
sdlgui_fontheight + 4;
+                                               scr_update_rects(pSdlGuiScrn, 
1, &rct);
                                                oldbutton=obj;
                                        }
                                        if (dlg[obj].type==SGSCROLLBAR)
@@ -974,7 +977,7 @@
                                                        rct.h = 
sdlgui_fontheight;
                                                        
SDL_FillRect(pSdlGuiScrn, &rct, grey); /* Clear old */
                                                        
SDLGui_DrawRadioButton(dlg, i);
-                                                       
SDL_UpdateRects(pSdlGuiScrn, 1, &rct);
+                                                       
scr_update_rects(pSdlGuiScrn, 1, &rct);
                                                }
                                                for (i = obj+1; dlg[i].type == 
SGRADIOBUT; i++)
                                                {
@@ -985,7 +988,7 @@
                                                        rct.h = 
sdlgui_fontheight;
                                                        
SDL_FillRect(pSdlGuiScrn, &rct, grey); /* Clear old */
                                                        
SDLGui_DrawRadioButton(dlg, i);
-                                                       
SDL_UpdateRects(pSdlGuiScrn, 1, &rct);
+                                                       
scr_update_rects(pSdlGuiScrn, 1, &rct);
                                                }
                                                dlg[obj].state |= SG_SELECTED;  
/* Select this radio button */
                                                rct.x = 
(dlg[0].x+dlg[obj].x)*sdlgui_fontwidth;
@@ -994,7 +997,7 @@
                                                rct.h = sdlgui_fontheight;
                                                SDL_FillRect(pSdlGuiScrn, &rct, 
grey); /* Clear old */
                                                SDLGui_DrawRadioButton(dlg, 
obj);
-                                               SDL_UpdateRects(pSdlGuiScrn, 1, 
&rct);
+                                               scr_update_rects(pSdlGuiScrn, 
1, &rct);
                                                break;
                                         case SGCHECKBOX:
                                                dlg[obj].state ^= SG_SELECTED;
@@ -1004,13 +1007,16 @@
                                                rct.h = sdlgui_fontheight;
                                                SDL_FillRect(pSdlGuiScrn, &rct, 
grey); /* Clear old */
                                                SDLGui_DrawCheckBox(dlg, obj);
-                                               SDL_UpdateRects(pSdlGuiScrn, 1, 
&rct);
+                                               scr_update_rects(pSdlGuiScrn, 
1, &rct);
                                                break;
                                         case SGPOPUP:
                                                dlg[obj].state |= SG_SELECTED;
                                                SDLGui_DrawPopupButton(dlg, 
obj);
-                                               SDL_UpdateRect(pSdlGuiScrn, 
(dlg[0].x+dlg[obj].x)*sdlgui_fontwidth-2, 
(dlg[0].y+dlg[obj].y)*sdlgui_fontheight-2,
-                                                              
dlg[obj].w*sdlgui_fontwidth+4, dlg[obj].h*sdlgui_fontheight+4);
+                                               rct.x = (dlg[0].x + dlg[obj].x) 
* sdlgui_fontwidth - 2;
+                                               rct.y = (dlg[0].y + dlg[obj].y) 
* sdlgui_fontheight - 2;
+                                               rct.w = dlg[obj].w * 
sdlgui_fontwidth + 4;
+                                               rct.h = dlg[obj].h * 
sdlgui_fontheight + 4;
+                                               scr_update_rects(pSdlGuiScrn, 
1, &rct);
                                                retbutton=obj;
                                                break;
                                        }
@@ -1019,8 +1025,11 @@
                                {
                                        dlg[oldbutton].state &= ~SG_SELECTED;
                                        SDLGui_DrawButton(dlg, oldbutton);
-                                       SDL_UpdateRect(pSdlGuiScrn, 
(dlg[0].x+dlg[oldbutton].x)*sdlgui_fontwidth-2, 
(dlg[0].y+dlg[oldbutton].y)*sdlgui_fontheight-2,
-                                                      
dlg[oldbutton].w*sdlgui_fontwidth+4, dlg[oldbutton].h*sdlgui_fontheight+4);
+                                       rct.x = (dlg[0].x + dlg[oldbutton].x) * 
sdlgui_fontwidth - 2;
+                                       rct.y = (dlg[0].y + dlg[oldbutton].y) * 
sdlgui_fontheight - 2;
+                                       rct.w = dlg[oldbutton].w * 
sdlgui_fontwidth + 4;
+                                       rct.h = dlg[oldbutton].h * 
sdlgui_fontheight + 4;
+                                       scr_update_rects(pSdlGuiScrn, 1, &rct);
                                        oldbutton = 0;
                                }
                                if (obj >= 0 && (dlg[obj].flags&SG_EXIT))
@@ -1051,6 +1060,16 @@
                                }
                                break;
 
+#if WITH_SDL2
+                        case SDL_WINDOWEVENT:
+                               if (sdlEvent.window.event == 
SDL_WINDOWEVENT_RESTORED
+                                   || sdlEvent.window.event == 
SDL_WINDOWEVENT_EXPOSED)
+                               {
+                                       scr_update(0, 0, 0, 0);
+                               }
+                               break;
+#endif /* WITH_SDL2 */
+
                         default:
                                if (pEventOut)
                                        retbutton = SDLGUI_UNKNOWNEVENT;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ballerburg-1.2.0/src/settings.c 
new/ballerburg-1.2.1/src/settings.c
--- old/ballerburg-1.2.0/src/settings.c 2015-03-29 17:04:01.000000000 +0200
+++ new/ballerburg-1.2.1/src/settings.c 2022-05-28 09:55:50.000000000 +0200
@@ -170,7 +170,7 @@
                }
        } while (!done);
 
-       SDL_UpdateRect(surf, 0,0, 0,0);
+       scr_update(0,0, 0,0);
 
        if (settingsdlg[P1_HUMAN].state & SG_SELECTED)
        {
@@ -370,5 +370,5 @@
                bur[1]=ob1;
        }
 
-       SDL_UpdateRect(surf, 0,0, 0,0);
+       scr_update(0,0, 0,0);
 }

Reply via email to