File tree Expand file tree Collapse file tree 4 files changed +25
-61
lines changed
GeneralsMD/Code/GameEngine/Source/GameClient
Generals/Code/GameEngine/Source/GameClient Expand file tree Collapse file tree 4 files changed +25
-61
lines changed Original file line number Diff line number Diff line change @@ -136,22 +136,14 @@ HeaderTemplateManager::~HeaderTemplateManager( void )
136136
137137void HeaderTemplateManager::init ( void )
138138{
139- INI ini;
140- AsciiString fname;
141- fname.format (" Data\\ %s\\ HeaderTemplate" , GetRegistryLanguage ().str ());
142- OSVERSIONINFO osvi;
143- osvi.dwOSVersionInfoSize =sizeof (OSVERSIONINFO);
144- if (GetVersionEx (&osvi))
145- { // check if we're running Win9x variant since they may need different fonts
146- if (osvi.dwPlatformId == VER_PLATFORM_WIN32_WINDOWS)
147- { AsciiString tempName;
148-
149- tempName.format (" Data\\ %s\\ HeaderTemplate9x.ini" , GetRegistryLanguage ().str ());
150- if (TheFileSystem->doesFileExist (tempName.str ()))
151- fname = tempName;
152- }
139+ {
140+ AsciiString fname;
141+ fname.format (" Data\\ %s\\ HeaderTemplate" , GetRegistryLanguage ().str ());
142+
143+ INI ini;
144+ ini.loadFileDirectory ( fname, INI_LOAD_OVERWRITE, NULL );
153145 }
154- ini. loadFileDirectory ( fname, INI_LOAD_OVERWRITE, NULL );
146+
155147 populateGameFonts ();
156148}
157149
Original file line number Diff line number Diff line change @@ -133,23 +133,14 @@ GlobalLanguage::~GlobalLanguage()
133133
134134void GlobalLanguage::init ( void )
135135{
136+ {
137+ AsciiString fname;
138+ fname.format (" Data\\ %s\\ Language" , GetRegistryLanguage ().str ());
136139
137- INI ini;
138- AsciiString fname;
139- fname.format (" Data\\ %s\\ Language" , GetRegistryLanguage ().str ());
140-
141- OSVERSIONINFO osvi;
142- osvi.dwOSVersionInfoSize =sizeof (OSVERSIONINFO);
143- // GS NOTE: Must call doesFileExist in either case so that NameKeyGenerator will stay in sync
144- AsciiString tempName;
145- tempName.format (" Data\\ %s\\ Language9x.ini" , GetRegistryLanguage ().str ());
146- bool isExist = TheFileSystem->doesFileExist (tempName.str ());
147- if (GetVersionEx (&osvi) && osvi.dwPlatformId == VER_PLATFORM_WIN32_WINDOWS && isExist)
148- { // check if we're running Win9x variant since they may need different fonts
149- fname = tempName;
150- }
140+ INI ini;
141+ ini.loadFileDirectory ( fname, INI_LOAD_OVERWRITE, NULL );
142+ }
151143
152- ini.loadFileDirectory ( fname, INI_LOAD_OVERWRITE, NULL );
153144 StringListIt it = m_localFonts.begin ();
154145 while ( it != m_localFonts.end ())
155146 {
Original file line number Diff line number Diff line change @@ -136,22 +136,14 @@ HeaderTemplateManager::~HeaderTemplateManager( void )
136136
137137void HeaderTemplateManager::init ( void )
138138{
139- INI ini;
140- AsciiString fname;
141- fname.format (" Data\\ %s\\ HeaderTemplate" , GetRegistryLanguage ().str ());
142- OSVERSIONINFO osvi;
143- osvi.dwOSVersionInfoSize =sizeof (OSVERSIONINFO);
144- if (GetVersionEx (&osvi))
145- { // check if we're running Win9x variant since they may need different fonts
146- if (osvi.dwPlatformId == VER_PLATFORM_WIN32_WINDOWS)
147- { AsciiString tempName;
148-
149- tempName.format (" Data\\ %s\\ HeaderTemplate9x.ini" , GetRegistryLanguage ().str ());
150- if (TheFileSystem->doesFileExist (tempName.str ()))
151- fname = tempName;
152- }
139+ {
140+ AsciiString fname;
141+ fname.format (" Data\\ %s\\ HeaderTemplate" , GetRegistryLanguage ().str ());
142+
143+ INI ini;
144+ ini.loadFileDirectory ( fname, INI_LOAD_OVERWRITE, NULL );
153145 }
154- ini. loadFileDirectory ( fname, INI_LOAD_OVERWRITE, NULL );
146+
155147 populateGameFonts ();
156148}
157149
Original file line number Diff line number Diff line change @@ -135,25 +135,14 @@ GlobalLanguage::~GlobalLanguage()
135135
136136void GlobalLanguage::init ( void )
137137{
138+ {
139+ AsciiString fname;
140+ fname.format (" Data\\ %s\\ Language" , GetRegistryLanguage ().str ());
138141
139- INI ini;
140- AsciiString fname;
141- fname.format (" Data\\ %s\\ Language" , GetRegistryLanguage ().str ());
142-
143- OSVERSIONINFO osvi;
144- osvi.dwOSVersionInfoSize =sizeof (OSVERSIONINFO);
145-
146- // GS NOTE: Must call doesFileExist in either case so that NameKeyGenerator will stay in sync
147- AsciiString tempName;
148- tempName.format (" Data\\ %s\\ Language9x.ini" , GetRegistryLanguage ().str ());
149- bool isExist = TheFileSystem->doesFileExist (tempName.str ());
150- if (GetVersionEx (&osvi) && osvi.dwPlatformId == VER_PLATFORM_WIN32_WINDOWS && isExist)
151- { // check if we're running Win9x variant since they may need different fonts
152- fname = tempName;
142+ INI ini;
143+ ini.loadFileDirectory ( fname, INI_LOAD_OVERWRITE, NULL );
153144 }
154145
155-
156- ini.loadFileDirectory ( fname, INI_LOAD_OVERWRITE, NULL );
157146 StringListIt it = m_localFonts.begin ();
158147 while ( it != m_localFonts.end ())
159148 {
You can’t perform that action at this time.
0 commit comments