void-packages/srcpkgs/stepmania/patches/newgcc.patch
Đoàn Trần Công Danh 4b97cd2fb4 srcpkgs/s*: convert patches to -Np1
```sh
git grep -l '^patch_args=-Np0' "srcpkgs/$1*/template" |
while read template; do
	for p in ${template%/template}/patches/*; do
		sed -i '
			\,^[+-][+-][+-] /dev/null,b
			/^[*-]\+ [0-9]\+\(,[0-9]\+\)\? [*-]\+$/b
			s,^[*][*][*] ,&a/,
			/^--- /{
				s,\(^--- \)\(./\)*,\1a/,
				s,[.-][Oo][Rr][Ii][Gg]\([	/]\),\1,
				s/[.-][Oo][Rr][Ii][Gg]$//
				s/[.]patched[.]\([^.]\)/.\1/
				h
			}
			/^+++ -/{
				g
				s/^--- a/+++ b/
				b
			}
			s,\(^+++ \)\(./\)*,\1b/,
		' "$p"
	done
	sed -i '/^patch_args=/d' $template
done
```
2021-06-20 13:17:29 +07:00

36 lines
1.2 KiB
Diff

Upstream: yes
https://github.com/stepmania/stepmania/commit/3f64564dd7c62a2f3d9557c1bdb8475fd953abea
--- a/src/MessageManager.cpp
+++ b/src/MessageManager.cpp
@@ -207,8 +207,7 @@ void MessageManager::Unsubscribe( IMessageSubscriber* pSubscriber, MessageID m )
void MessageManager::Broadcast( Message &msg ) const
{
- // GAMESTATE is created before MESSAGEMAN, and has several BroadcastOnChangePtr members, so they all broadcast when they're initialized.
- if(this != NULL && m_Logging)
+ if(m_Logging)
{
LOG->Trace("MESSAGEMAN:Broadcast: %s", msg.GetName().c_str());
}
--- a/src/StepMania.cpp
+++ b/src/StepMania.cpp
@@ -1041,8 +1041,10 @@ int sm_main(int argc, char* argv[])
// This needs PREFSMAN.
Dialog::Init();
- // Create game objects
+ // Set up the messaging system early to have well defined code.
+ MESSAGEMAN = new MessageManager;
+ // Create game objects
GAMESTATE = new GameState;
// This requires PREFSMAN, for PREFSMAN->m_bShowLoadingWindow.
@@ -1162,7 +1164,6 @@ int sm_main(int argc, char* argv[])
SONGMAN->UpdatePopular();
SONGMAN->UpdatePreferredSort();
NSMAN = new NetworkSyncManager( pLoadingWindow );
- MESSAGEMAN = new MessageManager;
STATSMAN = new StatsManager;
// Initialize which courses are ranking courses here.