From e4495be42238fcbd6711e0c145a2a8f4570e87ff Mon Sep 17 00:00:00 2001
From: RichardG867 <richardg867@gmail.com>
Date: Sun, 28 Nov 2021 14:07:15 -0300
Subject: [PATCH 01/10] Add stripping to currently-unused Dev Jenkins preset

---
 .ci/Jenkinsfile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/.ci/Jenkinsfile b/.ci/Jenkinsfile
index 240b72b09..55f1311d7 100644
--- a/.ci/Jenkinsfile
+++ b/.ci/Jenkinsfile
@@ -75,7 +75,7 @@ def presetSlugs = [
 def presetFlags = [
 	'Regular': '-t --preset=regular',
 	'Debug': '--preset=debug',
-	'Dev': '--preset=experimental -D VNC=OFF'
+	'Dev': '-t --preset=experimental -D VNC=OFF'
 ]
 
 def anyFailure = false

From 99b3414fea7b63fb419cca8228047163e87914d5 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?David=20Hrdli=C4=8Dka?= <dhrdlicka@users.noreply.github.com>
Date: Wed, 1 Dec 2021 12:51:12 +0100
Subject: [PATCH 02/10] Update bug report template; normalize case

---
 .github/{FUNDING.yml => funding.yml}                          | 0
 .github/{ISSUE_TEMPLATE => issue_template}/bug_report.md      | 4 ++--
 .github/{ISSUE_TEMPLATE => issue_template}/config.yml         | 0
 .github/{ISSUE_TEMPLATE => issue_template}/feature_request.md | 0
 4 files changed, 2 insertions(+), 2 deletions(-)
 rename .github/{FUNDING.yml => funding.yml} (100%)
 rename .github/{ISSUE_TEMPLATE => issue_template}/bug_report.md (84%)
 rename .github/{ISSUE_TEMPLATE => issue_template}/config.yml (100%)
 rename .github/{ISSUE_TEMPLATE => issue_template}/feature_request.md (100%)

diff --git a/.github/FUNDING.yml b/.github/funding.yml
similarity index 100%
rename from .github/FUNDING.yml
rename to .github/funding.yml
diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/issue_template/bug_report.md
similarity index 84%
rename from .github/ISSUE_TEMPLATE/bug_report.md
rename to .github/issue_template/bug_report.md
index 72fca815d..340d89500 100644
--- a/.github/ISSUE_TEMPLATE/bug_report.md
+++ b/.github/issue_template/bug_report.md
@@ -25,8 +25,8 @@ If applicable, add screenshots to help explain your problem.
 
 **Desktop (please complete the following information):**
  - OS: [e.g. Windows 10]
- - 86Box version: [e.g. v2.06 build 2007, saying "Latest from Jenkins" isn't helpful]
- - Build type: [i.e. regular, optimized, or dev]
+ - 86Box version: [e.g. v3.00 build 3333; saying "Latest from Jenkins" isn't helpful]
+ - Build information: [i.e. new/old dynarec, architecture and build type]
 
 **Additional context**
 Add any other context about the problem here. If you are using an Optimized build, make sure to try the regular build too before filing a bug report!
diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/issue_template/config.yml
similarity index 100%
rename from .github/ISSUE_TEMPLATE/config.yml
rename to .github/issue_template/config.yml
diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/issue_template/feature_request.md
similarity index 100%
rename from .github/ISSUE_TEMPLATE/feature_request.md
rename to .github/issue_template/feature_request.md

From e88c91eddcebe550d8c2ae84715a17e1515d0b1e Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?David=20Hrdli=C4=8Dka?= <dhrdlicka@users.noreply.github.com>
Date: Wed, 1 Dec 2021 12:54:15 +0100
Subject: [PATCH 03/10] Looks like GitHub is not consistent at case sensitivity
 :^)

---
 .github/{issue_template => ISSUE_TEMPLATE}/bug_report.md      | 0
 .github/{issue_template => ISSUE_TEMPLATE}/config.yml         | 0
 .github/{issue_template => ISSUE_TEMPLATE}/feature_request.md | 0
 3 files changed, 0 insertions(+), 0 deletions(-)
 rename .github/{issue_template => ISSUE_TEMPLATE}/bug_report.md (100%)
 rename .github/{issue_template => ISSUE_TEMPLATE}/config.yml (100%)
 rename .github/{issue_template => ISSUE_TEMPLATE}/feature_request.md (100%)

diff --git a/.github/issue_template/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md
similarity index 100%
rename from .github/issue_template/bug_report.md
rename to .github/ISSUE_TEMPLATE/bug_report.md
diff --git a/.github/issue_template/config.yml b/.github/ISSUE_TEMPLATE/config.yml
similarity index 100%
rename from .github/issue_template/config.yml
rename to .github/ISSUE_TEMPLATE/config.yml
diff --git a/.github/issue_template/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md
similarity index 100%
rename from .github/issue_template/feature_request.md
rename to .github/ISSUE_TEMPLATE/feature_request.md

From 55149c7866e9acd770d164667cbb63585b978327 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?David=20Hrdli=C4=8Dka?= <dhrdlicka@users.noreply.github.com>
Date: Wed, 1 Dec 2021 18:05:17 +0100
Subject: [PATCH 04/10] Fix the Media menu not updating after mounting media

---
 src/win/win_ui.c | 13 +++----------
 1 file changed, 3 insertions(+), 10 deletions(-)

diff --git a/src/win/win_ui.c b/src/win/win_ui.c
index 55591f7af..b6a22fe50 100644
--- a/src/win/win_ui.c
+++ b/src/win/win_ui.c
@@ -1315,9 +1315,6 @@ ui_init(int nCmdShow)
     if (! RegisterClassEx(&wincl))
 			return(2);
 
-    /* Load the Window Menu(s) from the resources. */
-    menuMain = LoadMenu(hinstance, MENU_NAME);
-
     /* Now create our main window. */
     mbstowcs(title, emu_version, sizeof_w(title));
     hwnd = CreateWindowEx (
@@ -1330,7 +1327,7 @@ ui_init(int nCmdShow)
 		scrnsz_x+(GetSystemMetrics(SM_CXFIXEDFRAME)*2),	/* width */
 		scrnsz_y+(GetSystemMetrics(SM_CYFIXEDFRAME)*2)+GetSystemMetrics(SM_CYMENUSIZE)+GetSystemMetrics(SM_CYCAPTION)+1,	/* and height in pixels */
 		HWND_DESKTOP,		/* window is a child to desktop */
-		menuMain,		/* menu */
+		NULL,			/* no menu (yet) */
 		hinstance,		/* Program Instance handler */
 		NULL);			/* no Window Creation data */
     hwndMain = tdconfig.hwndParent = hwnd;
@@ -1380,14 +1377,10 @@ ui_init(int nCmdShow)
 		ResizeWindowByClientArea(hwndMain, scrnsz_x, scrnsz_y + sbar_height);
     }
 
-  /* Load the desired language, and reset all menus to their defaults */
+    /* Load the desired language */
     uint32_t helper_lang = lang_id;
     lang_id = 0;
-    set_language(helper_lang);	
-
-    /* Reset all menus to their defaults. */
-    ResetAllMenus();
-    media_menu_init();
+    set_language(helper_lang);
 	
     /* Make the window visible on the screen. */
     ShowWindow(hwnd, nCmdShow);

From 03cae5c6683033fb16d7ab0c4da8d281b0d12019 Mon Sep 17 00:00:00 2001
From: TC1995 <mariogplayer90@gmail.com>
Date: Wed, 1 Dec 2021 18:49:53 +0100
Subject: [PATCH 05/10] Removed excess logs of the tgui9440/96x0.

---
 src/video/vid_tgui9440.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/src/video/vid_tgui9440.c b/src/video/vid_tgui9440.c
index 579e9f93f..4c081e1a7 100644
--- a/src/video/vid_tgui9440.c
+++ b/src/video/vid_tgui9440.c
@@ -465,7 +465,6 @@ tgui_out(uint16_t addr, uint8_t val, void *p)
 								tgui->linear_size = (val & 0x10) ? 0x200000 : 0x100000;
 								svga->decode_mask = (val & 0x10) ? 0x1fffff : 0xfffff;
 							}
-							pclog("Linear base = %08x, size = %08x, mask = %08x\n", tgui->linear_base, tgui->linear_size, svga->decode_mask);
 							tgui_recalcmapping(tgui);
 						}
 						break;
@@ -1379,7 +1378,6 @@ tgui_accel_command(int count, uint32_t cpu_dat, tgui_t *tgui)
 	}
 
 	/*Other than mode stuff, this bit is undocumented*/
-	pclog("TGUI ger22 = %04x, cmd = %i, hdisp = %i, svga = %i, bpp = %i\n", tgui->accel.ger22, tgui->accel.command, svga->hdisp, svga->bpp, tgui->accel.bpp);
 	switch (tgui->accel.ger22 & 0xff) {
 		case 0:
 			switch (tgui->accel.ger22 >> 8) {

From 3fd4f496955540216eceba20f90d610adcbc1cd7 Mon Sep 17 00:00:00 2001
From: RichardG867 <richardg867@gmail.com>
Date: Wed, 1 Dec 2021 15:18:36 -0300
Subject: [PATCH 06/10] Fix small detail in versioninfo

---
 src/win/86Box.rc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/win/86Box.rc b/src/win/86Box.rc
index bf8b9cfbb..dfbcabd54 100644
--- a/src/win/86Box.rc
+++ b/src/win/86Box.rc
@@ -332,7 +332,7 @@ BEGIN
             VALUE "FileVersion", EMU_VERSION "\0"
             VALUE "InternalName", EMU_NAME "\0"
             VALUE "LegalCopyright", "Copyright \xa9 2007-" COPYRIGHT_YEAR " " EMU_NAME " contributors\0"
-            VALUE "OriginalFilename", "86box.exe\0"
+            VALUE "OriginalFilename", EMU_NAME ".exe\0"
             VALUE "ProductName", EMU_NAME "\0"
             VALUE "ProductVersion", EMU_VERSION "\0"
         END

From 7f0533fc9ae5d234f90afcb79c8377e3b1e4ede7 Mon Sep 17 00:00:00 2001
From: OBattler <oubattler@gmail.com>
Date: Wed, 1 Dec 2021 20:35:29 +0100
Subject: [PATCH 07/10] Ignore status bar icon timer callback if the status bar
 has reset itself in between.

---
 src/win/win_stbar.c | 18 ++++++++++++------
 1 file changed, 12 insertions(+), 6 deletions(-)

diff --git a/src/win/win_stbar.c b/src/win/win_stbar.c
index c980253e0..e9c2028ad 100644
--- a/src/win/win_stbar.c
+++ b/src/win/win_stbar.c
@@ -60,7 +60,7 @@
 
 
 HWND		hwndSBAR;
-int		update_icons = 1;
+int		update_icons = 1, reset_occurred = 1;
 
 
 static LONG_PTR	OriginalProcedure;
@@ -122,12 +122,15 @@ hdd_count(int bus)
 void
 ui_sb_timer_callback(int pane)
 {
-    sb_part_icons[pane] &= ~1;
+    if (!(reset_occurred & 1)) {
+	sb_part_icons[pane] &= ~1;
 
-    if (sb_part_icons && sb_part_icons[pane]) {
-	SendMessage(hwndSBAR, SB_SETICON, pane,
-		    (LPARAM)hIcon[sb_part_icons[pane]]);
-    }
+	if (sb_part_icons && sb_part_icons[pane]) {
+		SendMessage(hwndSBAR, SB_SETICON, pane,
+			    (LPARAM)hIcon[sb_part_icons[pane]]);
+	}
+    } else
+	reset_occurred &= ~1;
 }
 
 
@@ -152,6 +155,7 @@ ui_sb_update_icon(int tag, int active)
 	PostMessage(hwndSBAR, SB_SETICON, found,
 		    (LPARAM)hIcon[sb_part_icons[found]]);
 
+	reset_occurred = 2;
 	SetTimer(hwndMain, 0x8000 | found, 75, NULL);
     }
 }
@@ -832,6 +836,8 @@ ui_sb_update_panes(void)
     }
 
     sb_ready = 1;
+    if (reset_occurred & 2)
+	reset_occurred |= 1;
 }
 
 

From 8fb29ad031d5a65ddf8b6dc00c180f1372d66401 Mon Sep 17 00:00:00 2001
From: OBattler <oubattler@gmail.com>
Date: Wed, 1 Dec 2021 21:06:50 +0100
Subject: [PATCH 08/10] Unfudged the status bar fix.

---
 src/win/win_stbar.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/win/win_stbar.c b/src/win/win_stbar.c
index e9c2028ad..17178a6bf 100644
--- a/src/win/win_stbar.c
+++ b/src/win/win_stbar.c
@@ -131,6 +131,8 @@ ui_sb_timer_callback(int pane)
 	}
     } else
 	reset_occurred &= ~1;
+
+    reset_occurred &= ~2;
 }
 
 

From a128a518650839b51bb724043a114ccc1c17f463 Mon Sep 17 00:00:00 2001
From: RichardG867 <richardg867@gmail.com>
Date: Wed, 1 Dec 2021 17:32:53 -0300
Subject: [PATCH 09/10] Point readme link to v3.0

---
 README.md | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/README.md b/README.md
index a573f38f9..cfadfe55f 100644
--- a/README.md
+++ b/README.md
@@ -30,7 +30,7 @@ However, it is also possible to use 86Box on its own with the `--vmpath`/`-P` co
 
 Downloads
 ---------
-The latest stable version of 86Box is version 2.07, which was released on November 20, 2019, and is available from our [GitHub repository](https://github.com/86Box/86Box/releases/tag/v2.07).
+The latest stable version of 86Box is **v3.0**, which was released on December 1, 2021, and is available from our [GitHub repository](https://github.com/86Box/86Box/releases/tag/v3.0).
 
 ### Automatic builds
 We also offer automatic builds, which are built from the latest source code and contain the latest bugfixes and improvements, but may not be as stable and/or optimized as stable builds.

From 67df8cd8c6da0eccbb3acf878cc7231d5c1074af Mon Sep 17 00:00:00 2001
From: RichardG867 <richardg867@gmail.com>
Date: Wed, 1 Dec 2021 17:39:09 -0300
Subject: [PATCH 10/10] Build script: Fix strip flag being lost across MSYSTEMs

---
 .ci/build.sh | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/.ci/build.sh b/.ci/build.sh
index 6cb5467f3..b0c22f671 100644
--- a/.ci/build.sh
+++ b/.ci/build.sh
@@ -190,7 +190,9 @@ then
 			# Call build with the correct MSYSTEM.
 			echo [-] Switching to MSYSTEM [$msys]
 			cd "$cwd"
-			CHERE_INVOKING=yes MSYSTEM="$msys" bash -lc 'exec "'"$0"'" -b "'"$package_name"'" "'"$arch"'" '"$cmake_flags"
+			strip_arg=
+			[ $strip -ne 0 ] && strip_arg="-t "
+			CHERE_INVOKING=yes MSYSTEM="$msys" bash -lc 'exec "'"$0"'" -b "'"$package_name"'" "'"$arch"'" '"$strip_arg""$cmake_flags"
 			exit $?
 		fi
 	else