From fb4561632afe38122e537eb64871ed61c2dd3756 Mon Sep 17 00:00:00 2001
From: beaglejoe <BeagleJoe13@gmail.com>
Date: Sun, 8 Aug 2021 11:07:37 -0500
Subject: Fix for building base only


diff --git a/data/config/raceman/CMakeLists.txt b/data/config/raceman/CMakeLists.txt
index 02a18e2..4b7216f 100644
--- a/data/config/raceman/CMakeLists.txt
+++ b/data/config/raceman/CMakeLists.txt
@@ -9,7 +9,7 @@ SET(_RACE_FILES practice.xml quickrace.xml
            networkrace.xml championship-mpa1.xml championship-mpa11.xml career-36GP.xml career-supercars.xml
 		   career_36GP.xmls career_MPA1.xmls
            career_supercars.xmls career_ls1.xmls)
-
+FILE(GLOB _RACE_FILES *.xml )
 SD_INSTALL_FILES(DATA config/raceman USER config/raceman FILES ${_RACE_FILES})
 
 SET(_EXTRA_FILES extra/skill.xml)
diff --git a/data/config/sound.xml b/data/config/sound.xml
index 15606e3..d69190e 100644
--- a/data/config/sound.xml
+++ b/data/config/sound.xml
@@ -20,8 +20,8 @@
 		<attnum name="volume" unit="%" val="100"/>
 	</section>
 	<section name="Music Settings">
-		<attstr name="music state" val="enabled"/>
+		<attstr name="music state" val="disabled"/>
 		<attstr name="default music" val="data/music/main.ogg"/>
 		<attnum name="music volume" unit="%" val="100"/>
 	</section>
-</params>
\ No newline at end of file
+</params>
-- 
2.30.2


From 96c779c891895cd5265b424e58de8a7397b05025 Mon Sep 17 00:00:00 2001
From: beaglejoe <BeagleJoe13@gmail.com>
Date: Wed, 8 Sep 2021 10:12:59 -0500
Subject: Set throttle and brake to mouse


diff --git a/data/drivers/human/preferences.xml b/data/drivers/human/preferences.xml
index 21bf72f..0a4404b 100644
--- a/data/drivers/human/preferences.xml
+++ b/data/drivers/human/preferences.xml
@@ -1,37 +1,19 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<!-- 
-    file                 : preferences.xml
-    created              : Mon Apr 10 18:04:38 CEST 2000
-    copyright            : (C) 2000 by Eric Espie                         
-    email                : torcs@free.fr   
-    version              : $Id: preferences.xml 6456 2016-07-11 18:51:45Z madbad $
--->
+<!DOCTYPE params SYSTEM "params.dtd">
 
-<!--    This program is free software; you can redistribute it and/or modify  -->
-<!--    it under the terms of the GNU General Public License as published by  -->
-<!--    the Free Software Foundation; either version 2 of the License, or     -->
-<!--    (at your option) any later version.                                   -->
-
-<!DOCTYPE params SYSTEM "../../libs/tgf/params.dtd">
-
-<params mode="mw" type="template" name="Player Pref" version="1.6">
 
+<params name="preferences" version="1.6">
   <section name="Preferences">
-
-    <!-- The 'profile' = sub-section below to get the default values from -->
     <attstr name="control" in="mouse,joystick" val="mouse"/>
-
     <section name="Drivers">
-
       <section name="1">
-        <!-- Initial parameters ; set to default if not specified (see above) -->
         <attstr name="transmission" in="auto,sequential,grid" val="auto"/>
         <attstr name="auto reverse" in="yes,no" val="yes"/>
         <attstr name="ABS on" in="yes,no" val="yes"/>
-        <attstr name="ASR on" in="yes,no" val="yes"/>        
+        <attstr name="ASR on" in="yes,no" val="yes"/>
         <attnum name="programmed pit stops" val="0"/>
         <attnum name="steer sensitivity" val="0.6"/>
-        <attnum name="steer dead zone" val="0.0"/>
+        <attnum name="steer dead zone" val="0"/>
         <attstr name="left steer" val="MOUSE_LEFT"/>
         <attnum name="left steer min" val="0"/>
         <attnum name="left steer max" val="319"/>
@@ -40,11 +22,11 @@
         <attnum name="right steer min" val="0"/>
         <attnum name="right steer max" val="319"/>
         <attnum name="right steer power" val="0.00315"/>
-        <attstr name="throttle" val="Up Arrow"/>
+        <attstr name="throttle" val="MOUSE_LEFT_BTN"/>
         <attnum name="throttle min" val="0"/>
         <attnum name="throttle max" val="1"/>
         <attnum name="throttle power" val="0"/>
-        <attstr name="brake" val="Down Arrow"/>
+        <attstr name="brake" val="MOUSE_RIGHT_BTN"/>
         <attnum name="brake min" val="0"/>
         <attnum name="brake max" val="1"/>
         <attnum name="brake power" val="0"/>
@@ -57,18 +39,60 @@
         <attstr name="dashboard previous item" val="j"/>
         <attstr name="dashboard increase" val="k"/>
         <attstr name="dashboard decrease" val="h"/>
-        <attnum name="WebServerId" val="none"/>
-        <attstr name="WebServerUsername" val="none"/>            
-        <attstr name="WebServerPassword" val="none"/>            
+        <attnum name="WebServerId" val="0"/>
+        <attstr name="WebServerUsername" val="none"/>
+        <attstr name="WebServerPassword" val="none"/>
+        <attstr name="sequential shifter allow neutral" val="no"/>
+        <attstr name="sequential shifter allow reverse" val="no"/>
+        <attstr name="release gear button goes neutral" val="no"/>
+        <attnum name="steer speed sensitivity" val="0.7"/>
+        <attnum name="clutch min" val="0"/>
+        <attnum name="clutch max" val="0"/>
+        <attnum name="clutch power" val="1"/>
+        <attnum name="ABS min" val="0"/>
+        <attnum name="ABS max" val="0"/>
+        <attnum name="ASR min" val="0"/>
+        <attnum name="ASR max" val="0"/>
+        <attnum name="Speed Limiter min" val="0"/>
+        <attnum name="Speed Limiter max" val="0"/>
+        <attnum name="Light1 min" val="0"/>
+        <attnum name="Light1 max" val="0"/>
+        <attnum name="reverse gear min" val="0"/>
+        <attnum name="reverse gear max" val="0"/>
+        <attnum name="neutral gear min" val="0"/>
+        <attnum name="neutral gear max" val="0"/>
+        <attnum name="down shift min" val="0"/>
+        <attnum name="down shift max" val="0"/>
+        <attnum name="up shift min" val="0"/>
+        <attnum name="up shift max" val="0"/>
+        <attnum name="ebrake min" val="0"/>
+        <attnum name="ebrake max" val="0"/>
+        <attnum name="hbox x min" val="-1"/>
+        <attnum name="hbox x max" val="1"/>
+        <attnum name="hbox y min" val="-1"/>
+        <attnum name="hbox y max" val="1"/>
+        <attnum name="left glance min" val="-1"/>
+        <attnum name="left glance max" val="-0.1"/>
+        <attnum name="right glance min" val="0.1"/>
+        <attnum name="right glance max" val="1"/>
+        <attnum name="dashboard next item min" val="0"/>
+        <attnum name="dashboard next item max" val="0"/>
+        <attnum name="dashboard previous item min" val="0"/>
+        <attnum name="dashboard previous item max" val="0"/>
+        <attnum name="dashboard increase min" val="0"/>
+        <attnum name="dashboard increase max" val="0"/>
+        <attnum name="dashboard decrease min" val="0"/>
+        <attnum name="dashboard decrease max" val="0"/>
+        <attstr name="left glance" val="z"/>
+        <attstr name="right glance" val="x"/>
       </section>
 
     </section>
 
   </section>
 
-  <!-- The default values for a 'joystick' profile -->
   <section name="joystick">
-    <attstr name="up shift"   val="BTN1-0"/>
+    <attstr name="up shift" val="BTN1-0"/>
     <attstr name="down shift" val="BTN2-0"/>
     <attstr name="ASR cmd" val="BTN6-0"/>
     <attstr name="ABS cmd" val="BTN3-0"/>
@@ -82,39 +106,32 @@
     <attstr name="6th gear" val=""/>
     <attstr name="release gear button goes neutral" in="yes,no" val="no"/>
     <attstr name="sequential shifter allow neutral" in="yes,no" val="no"/>
-
     <attnum name="steer sensitivity" val="0.8"/>
-    <attnum name="steer power" val="1.0"/>
-
+    <attnum name="steer power" val="1"/>
     <attstr name="left steer" val="AXIS0-0"/>
-    <attnum name="left steer min" val="1.0"/>
+    <attnum name="left steer min" val="1"/>
     <attnum name="left steer max" val="-1.1"/>
-
     <attstr name="right steer" val="AXIS0-0"/>
-    <attnum name="right steer min" val="1.0"/>
+    <attnum name="right steer min" val="1"/>
     <attnum name="right steer max" val="-1.1"/>
-
     <attstr name="throttle" val="AXIS1-0"/>
-    <attnum name="throttle min" val="1.0"/>
+    <attnum name="throttle min" val="1"/>
     <attnum name="throttle max" val="-1.1"/>
-    <attnum name="throttle sensitivity" val="1.0"/>
+    <attnum name="throttle sensitivity" val="1"/>
     <attnum name="throttle power" val="1.2"/>
-
     <attstr name="brake" val="AXIS4-0"/>
-    <attnum name="brake min" val="1.0"/>
+    <attnum name="brake min" val="1"/>
     <attnum name="brake max" val="-1.1"/>
     <attnum name="brake sensitivity" val="0.2"/>
     <attnum name="brake power" val="1.2"/>
     <attstr name="ebrake cmd" val=""/>
-
     <attstr name="clutch" val="AXIS4-0"/>
-    <attnum name="clutch min" val="1.0"/>
+    <attnum name="clutch min" val="1"/>
     <attnum name="clutch max" val="-1.1"/>
     <attnum name="clutch sensitivity" val="0.2"/>
     <attnum name="clutch power" val="1.2"/>
   </section>
 
-  <!-- The default values for a 'mouse' profile -->
   <section name="mouse">
     <attstr name="up shift" val=""/>
     <attstr name="down shift" val=""/>
@@ -128,106 +145,84 @@
     <attstr name="6th gear" val=""/>
     <attstr name="release gear button goes neutral" in="yes,no" val="yes"/>
     <attstr name="sequential shifter allow neutral" in="yes,no" val="no"/>
-
     <attnum name="steer sensitivity" val="0.8"/>
     <attnum name="steer speed sensitivity" val="0.7"/>
-    <attnum name="steer dead zone" unit="%" val="4.0"/>
-
+    <attnum name="steer dead zone" unit="%" val="4"/>
     <attstr name="left steer" val="MOUSE_LEFT"/>
     <attnum name="left steer min" val="0"/>
     <attnum name="left steer max" val="300"/>
     <attnum name="left steer power" val="0.0034"/>
-
     <attstr name="right steer" val="MOUSE_RIGHT"/>
     <attnum name="right steer min" val="0"/>
     <attnum name="right steer max" val="300"/>
     <attnum name="right steer power" val="0.0034"/>
-
     <attstr name="throttle" val="Up Arrow"/>
     <attnum name="throttle min" val="0"/>
     <attnum name="throttle max" val="1"/>
-    <attnum name="throttle sensitivity" val="1.0"/>
+    <attnum name="throttle sensitivity" val="1"/>
     <attnum name="throttle power" val="0"/>
-
     <attstr name="brake" val="Down Arrow"/>
     <attnum name="brake min" val="0"/>
     <attnum name="brake max" val="1"/>
-    <attnum name="brake sensitivity" val="1.0"/>
+    <attnum name="brake sensitivity" val="1"/>
     <attnum name="brake power" val="0"/>
-
     <attstr name="ebrake cmd" val="Space"/>
     <attnum name="ebrake min" val="0"/>
     <attnum name="ebrake max" val="0"/>
- 
     <attstr name="ASR cmd" val="t"/>
     <attstr name="ABS cmd" val="a"/>
     <attstr name="Light1 cmd" val="l"/>
     <attstr name="Speed Limiter" val="s"/>
-
     <attstr name="left glance" val="MOUSE_LEFT_BTN"/>
     <attnum name="left glance min" val="-1"/>
     <attnum name="left glance max" val="-0.1"/>
     <attstr name="right glance" val="MOUSE_RIGHT_BTN"/>
     <attnum name="right glance min" val="0.1"/>
     <attnum name="right glance max" val="1"/>
-    
-   </section>
+  </section>
 
-  <!-- The default values for an 'analog joystick' profile -->
   <section name="joystick analog">
-    <attstr name="up shift"    val="BTN1-0"/>
-    <attstr name="down shift"  val="BTN2-0"/>
-    <attstr name="ASR on/off"  val="BTN3-0"/>
-    <attstr name="ABS on/off"  val="BTN4-0"/>
-
+    <attstr name="up shift" val="BTN1-0"/>
+    <attstr name="down shift" val="BTN2-0"/>
+    <attstr name="ASR on/off" val="BTN3-0"/>
+    <attstr name="ABS on/off" val="BTN4-0"/>
     <attstr name="steer" val="AXIS0-0"/>
-    <attnum name="steer sensitivity" val="0.5" min="0.1" max="2.0"/>
-    <attnum name="steer power" val="1.0" min="0.5" max="4.0"/>
-
+    <attnum name="steer sensitivity" min="0.1" max="2" val="0.5"/>
+    <attnum name="steer power" min="0.5" max="4" val="1"/>
     <attstr name="throttle" val="AXIS1-0"/>
-    <attnum name="throttle min" val="0.0" min="-1.0" max="1.0"/>
-    <attnum name="throttle max" val="-1.0" min="-1.0" max="1.0"/>
-    <!-- Joystick sensitivity -->
-    <attnum name="throttle sensitivity" val="1.0" min="0.1" max="2.0"/>
-    <!-- Joystick multiplicator -->
-    <attnum name="throttle power" val="1.2" min="0.5" max="4.0"/>
-
+    <attnum name="throttle min" min="-1" max="1" val="0"/>
+    <attnum name="throttle max" max="1" val="-1"/>
+    <attnum name="throttle sensitivity" min="0.1" max="2" val="1"/>
+    <attnum name="throttle power" min="0.5" max="4" val="1.2"/>
     <attstr name="brake" val="AXIS1-0"/>
-    <attnum name="brake min" val="0.0" min="-1.0" max="1.0"/>
-    <attnum name="brake max" val="1.2" min="-1.0" max="1.0"/>
-    <attnum name="brake sensitivity" val="1.0" min="0.1" max="2.0"/>
-    <attnum name="brake power" val="1.2" min="0.5" max="4.0"/>
+    <attnum name="brake min" min="-1" max="1" val="0"/>
+    <attnum name="brake max" min="-1" val="1.2"/>
+    <attnum name="brake sensitivity" min="0.1" max="2" val="1"/>
+    <attnum name="brake power" min="0.5" max="4" val="1.2"/>
     <attstr name="ebrake cmd" val=""/>
   </section>
 
-  <!-- The default values for a 'MS FF Wheel profile -->
   <section name="joystick USB MsFFWheel">
-    <attstr name="up shift"    val="BTN8-0"/>
-    <attstr name="down shift"  val="BTN7-0"/>
-    <attstr name="ASR cmd"  val="BTN4-0"/>
-    <attstr name="ABS cmd"  val="BTN1-0"/>
-
+    <attstr name="up shift" val="BTN8-0"/>
+    <attstr name="down shift" val="BTN7-0"/>
+    <attstr name="ASR cmd" val="BTN4-0"/>
+    <attstr name="ABS cmd" val="BTN1-0"/>
     <attstr name="steer" val="AXIS0-0"/>
     <attnum name="steer sensitivity" val="0.5"/>
-    <attnum name="steer power" val="1.0"/>
-
+    <attnum name="steer power" val="1"/>
     <attstr name="throttle" val="AXIS1-0"/>
-    <attnum name="throttle min" val="1.0"/>
+    <attnum name="throttle min" val="1"/>
     <attnum name="throttle max" val="-1.1"/>
-    <!-- Joystick sensitivity -->
-    <attnum name="throttle sensitivity" val="1.0"/>
-    <!-- Joystick multiplicator -->
+    <attnum name="throttle sensitivity" val="1"/>
     <attnum name="throttle power" val="1.2"/>
-
     <attstr name="brake" val="AXIS4-0"/>
-    <attnum name="brake min" val="1.0"/>
+    <attnum name="brake min" val="1"/>
     <attnum name="brake max" val="-1.1"/>
     <attnum name="brake sensitivity" val="0.5"/>
     <attnum name="brake power" val="0.8"/>
     <attstr name="ebrake cmd" val=""/>
   </section>
 
-  <!-- The default values for a 'digital joystick' profile -->
   <section name="joystick digital (joypad)">
     <attstr name="up shift" val="BTN3-0"/>
     <attstr name="down shift" val="BTN4-0"/>
@@ -243,24 +238,23 @@
     <attstr name="6th gear" val=""/>
     <attstr name="release gear button goes neutral" val="yes"/>
     <attstr name="steer" val="AXIS0-0"/>
-    <attnum name="steer sensitivity" val="0.500000"/>
-    <attnum name="steer power" val="1.000000"/>
+    <attnum name="steer sensitivity" val="0.5"/>
+    <attnum name="steer power" val="1"/>
     <attstr name="throttle" val="BTN1-0"/>
     <attstr name="brake" val="BTN2-0"/>
-    <attnum name="steer min" val="-1.000000"/>
-    <attnum name="steer max" val="1.000000"/>
-    <attnum name="throttle min" val="0.000000"/>
-    <attnum name="throttle max" val="1.000000"/>
-    <attnum name="brake min" val="0.000000"/>
-    <attnum name="brake max" val="1.000000"/>
-    <attnum name="throttle sensitivity" val="1.0"/>
+    <attnum name="steer min" val="-1"/>
+    <attnum name="steer max" val="1"/>
+    <attnum name="throttle min" val="0"/>
+    <attnum name="throttle max" val="1"/>
+    <attnum name="brake min" val="0"/>
+    <attnum name="brake max" val="1"/>
+    <attnum name="throttle sensitivity" val="1"/>
     <attnum name="throttle power" val="1.2"/>
     <attnum name="brake sensitivity" val="0.5"/>
     <attnum name="brake power" val="1.2"/>
     <attstr name="ebrake cmd" val=""/>
   </section>
-  
-  <!-- The Force Feedback configurations -->
+
   <section name="forceFeedback">
     <section name="default">
       <section name="effectsConfig">
@@ -294,7 +288,5 @@
     </section>
 
   </section>
-  
-</params>
-
 
+</params>
-- 
2.30.2


From ffb48f340e727340ed7549c2ed853ce1428fd277 Mon Sep 17 00:00:00 2001
From: beaglejoe <BeagleJoe13@gmail.com>
Date: Sat, 11 Sep 2021 17:46:05 -0500
Subject: Fix for SDL2


diff --git a/src/libs/tgfclient/glfeatures.cpp b/src/libs/tgfclient/glfeatures.cpp
index 459c165..d140b1e 100644
--- a/src/libs/tgfclient/glfeatures.cpp
+++ b/src/libs/tgfclient/glfeatures.cpp
@@ -241,7 +241,7 @@ bool GfglFeatures::detectBestSupportSDL2(int& nWidth, int& nHeight, int& nDepth,
 	SDL_GL_SetAttribute(SDL_GL_DOUBLEBUFFER, 1);
 
 	SDL_Window* testWindow = NULL;
-	SDL_Renderer* renderer = NULL;
+//	SDL_Renderer* renderer = NULL;
 	SDL_Surface* pWinSurface = 0;
 
 	int nAlphaChannel = bAlpha ? 1 : 0;
@@ -295,9 +295,9 @@ bool GfglFeatures::detectBestSupportSDL2(int& nWidth, int& nHeight, int& nDepth,
 						//SDL_SetWindowSize(GfuiWindow, nWidth, nHeight);
 						if(testWindow)
 						{
-							renderer = SDL_CreateRenderer(testWindow, -1, 0);
-							SDL_RenderPresent(renderer);
-							if(renderer)
+							//renderer = SDL_CreateRenderer(testWindow, -1, 0);
+							//SDL_RenderPresent(renderer);
+							if(true) //(renderer)
 							{
 
 								SDL_GLContext context = 0;
@@ -334,8 +334,8 @@ bool GfglFeatures::detectBestSupportSDL2(int& nWidth, int& nHeight, int& nDepth,
 									SDL_GL_DeleteContext(context);
 									context = NULL;
 								}
-								SDL_DestroyRenderer(renderer);
-								renderer = NULL;
+								//SDL_DestroyRenderer(renderer);
+								//renderer = NULL;
 							}
 							SDL_DestroyWindow(testWindow);
 							testWindow = NULL;
@@ -360,10 +360,10 @@ bool GfglFeatures::detectBestSupportSDL2(int& nWidth, int& nHeight, int& nDepth,
 						{
 							//SDL_SetWindowSize(GfuiWindow, nWidth, nHeight);
 
-							renderer = SDL_CreateRenderer(testWindow, -1, 0);
-							if(renderer)
+							//renderer = SDL_CreateRenderer(testWindow, -1, 0);
+							if(true) //(renderer)
 							{
-								SDL_RenderPresent(renderer);
+								//SDL_RenderPresent(renderer);
 
 								SDL_GLContext context;
 								context = SDL_GL_CreateContext(testWindow);
@@ -381,8 +381,8 @@ bool GfglFeatures::detectBestSupportSDL2(int& nWidth, int& nHeight, int& nDepth,
 									SDL_GL_DeleteContext(context);
 									context = NULL;
 								}
-								SDL_DestroyRenderer(renderer);
-								renderer = NULL;
+								//SDL_DestroyRenderer(renderer);
+								//renderer = NULL;
 							}
 							SDL_DestroyWindow(testWindow);
 							testWindow = NULL;
@@ -432,10 +432,10 @@ bool GfglFeatures::detectBestSupportSDL2(int& nWidth, int& nHeight, int& nDepth,
 		nWidth, nHeight, SDL_WINDOW_HIDDEN | SDL_WINDOW_OPENGL);
 	if(testWindow)
 	{
-		renderer = SDL_CreateRenderer(testWindow, -1, 0);
-		if(renderer)
+		//renderer = SDL_CreateRenderer(testWindow, -1, 0);
+		if(true) //(renderer)
 		{
-			SDL_RenderPresent(renderer);
+			//SDL_RenderPresent(renderer);
 
 			SDL_GLContext context;
 			context = SDL_GL_CreateContext(testWindow);
@@ -472,8 +472,8 @@ bool GfglFeatures::detectBestSupportSDL2(int& nWidth, int& nHeight, int& nDepth,
 				SDL_GL_DeleteContext(context);
 				context = NULL;
 			}
-			SDL_DestroyRenderer(renderer);
-			renderer = NULL;
+			//SDL_DestroyRenderer(renderer);
+			//renderer = NULL;
 		}
 		SDL_DestroyWindow(testWindow);
 		testWindow = NULL;
@@ -546,8 +546,8 @@ bool GfglFeatures::detectBestSupport(int& nWidth, int& nHeight, int& nDepth,
 #if SDL_MAJOR_VERSION >= 2
 						SDL_SetWindowSize(GfuiWindow, nWidth, nHeight);
 
-						SDL_Renderer *renderer = SDL_CreateRenderer(GfuiWindow, -1, 0);
-						SDL_RenderPresent(renderer);
+						//SDL_Renderer *renderer = SDL_CreateRenderer(GfuiWindow, -1, 0);
+						//SDL_RenderPresent(renderer);
 
 						SDL_GL_CreateContext(GfuiWindow);
 
@@ -592,8 +592,8 @@ bool GfglFeatures::detectBestSupport(int& nWidth, int& nHeight, int& nDepth,
 #if SDL_MAJOR_VERSION >= 2
 						SDL_SetWindowSize(GfuiWindow, nWidth, nHeight);
 
-						SDL_Renderer *renderer = SDL_CreateRenderer(GfuiWindow, -1, 0);
-						SDL_RenderPresent(renderer);
+						//SDL_Renderer *renderer = SDL_CreateRenderer(GfuiWindow, -1, 0);
+						//SDL_RenderPresent(renderer);
 
 						SDL_GL_CreateContext(GfuiWindow);
 
diff --git a/src/libs/tgfclient/guiscreen.cpp b/src/libs/tgfclient/guiscreen.cpp
index 1c21c8f..b8c48b8 100644
--- a/src/libs/tgfclient/guiscreen.cpp
+++ b/src/libs/tgfclient/guiscreen.cpp
@@ -456,8 +456,8 @@ SDL_Surface* gfScrCreateWindow(int nWinWidth, int nWinHeight, int nTotalDepth,in
     }
 #endif
     // attempt to make window operational
-    SDL_Renderer *renderer = SDL_CreateRenderer(GfuiWindow, -1, 0);
-    SDL_RenderPresent(renderer);
+    //SDL_Renderer *renderer = SDL_CreateRenderer(GfuiWindow, -1, 0);
+    //SDL_RenderPresent(renderer);
 
     /* Create OpenGL context */
     SDL_GL_CreateContext(GfuiWindow);
-- 
2.30.2


From 0d490187abbf90772e3dcca1d59a56aa530df5b1 Mon Sep 17 00:00:00 2001
From: beaglejoe <BeagleJoe13@gmail.com>
Date: Tue, 21 Sep 2021 01:14:19 -0500
Subject: fix for crash at exit


diff --git a/src/libs/robottools/humandriver.h b/src/libs/robottools/humandriver.h
index 506bea3..ce24c89 100644
--- a/src/libs/robottools/humandriver.h
+++ b/src/libs/robottools/humandriver.h
@@ -24,6 +24,7 @@ class ROBOTTOOLS_API HumanDriver
 {
 public:
     HumanDriver(const char *robotname);
+    virtual ~HumanDriver() {};
 
     void shutdown(const int index);
     void init_context(int index, int updater_index=0);
diff --git a/src/libs/robottools/rthumandriver.cpp b/src/libs/robottools/rthumandriver.cpp
index 1101f60..bab4f9f 100644
--- a/src/libs/robottools/rthumandriver.cpp
+++ b/src/libs/robottools/rthumandriver.cpp
@@ -489,6 +489,7 @@ void HumanDriver::terminate()
         ++itDrvName;
     }
     VecNames.clear();
+    mapKeys.clear();
 }
 
 
-- 
2.30.2


From 9bf4e49dc36d7b7108ea080c54a1a795de543df6 Mon Sep 17 00:00:00 2001
From: beaglejoe <BeagleJoe13@gmail.com>
Date: Tue, 2 Nov 2021 10:07:05 -0500
Subject: workaround for exit crash


diff --git a/src/libs/tgfclient/guiscreen.cpp b/src/libs/tgfclient/guiscreen.cpp
index b8c48b8..fe52fba 100644
--- a/src/libs/tgfclient/guiscreen.cpp
+++ b/src/libs/tgfclient/guiscreen.cpp
@@ -52,6 +52,7 @@ static int GfViewWidth;
 static int GfViewHeight;
 static int GfScrCenX;
 static int GfScrCenY;
+static SDL_GLContext GLContext = NULL;
 
 // The screen surface.
 static SDL_Surface *PScreenSurface = NULL;
@@ -460,7 +461,7 @@ SDL_Surface* gfScrCreateWindow(int nWinWidth, int nWinHeight, int nTotalDepth,in
     //SDL_RenderPresent(renderer);
 
     /* Create OpenGL context */
-    SDL_GL_CreateContext(GfuiWindow);
+    GLContext = SDL_GL_CreateContext(GfuiWindow);
 
     // If specified, try best possible settings.
     PScreenSurface = SDL_CreateRGBSurface(0, nWinWidth, nWinHeight, nTotalDepth,
@@ -1179,6 +1180,10 @@ void GfScrShutdown(void)
 {
     GfLogTrace("Shutting down screen.\n");
 
+	SDL_GL_MakeCurrent(GfuiWindow, GLContext);
+	SDL_GL_DeleteContext(GLContext);
+	GLContext = NULL;
+
     // Shutdown SDL video sub-system.
     SDL_QuitSubSystem(SDL_INIT_VIDEO | SDL_INIT_AUDIO);
 
-- 
2.30.2

