File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed
Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -10,7 +10,7 @@ class $modify(ST_MenuLayer, MenuLayer)
1010 struct Fields
1111 {
1212 std::string m_SplashStr;
13- SplashRead* m_SplashRead;
13+ static SplashRead* m_SplashRead;
1414 ScalingLabel* m_SplashText = nullptr ;
1515 };
1616
@@ -21,7 +21,7 @@ class $modify(ST_MenuLayer, MenuLayer)
2121 return false ;
2222 }
2323
24- m_fields->m_SplashRead = new SplashRead (" splash.splash" );
24+ if (!m_fields-> m_SplashRead ) m_fields->m_SplashRead = new SplashRead (" splash.splash" );
2525 m_fields->m_SplashStr = m_fields->m_SplashRead ->getRandomLine ();
2626 auto mainTitle = getChildByID (" main-title" );
2727
@@ -46,4 +46,6 @@ class $modify(ST_MenuLayer, MenuLayer)
4646 MenuLayer::onExit ();
4747 m_fields->m_SplashStr = m_fields->m_SplashRead ->getRandomLine ();
4848 }
49- };
49+ };
50+
51+ SplashRead* ST_MenuLayer::Fields::m_SplashRead = nullptr ;
You can’t perform that action at this time.
0 commit comments