Skip to content

Commit d675f8f

Browse files
committed
Replicate in Generals
1 parent 70975c9 commit d675f8f

File tree

2 files changed

+13
-30
lines changed

2 files changed

+13
-30
lines changed

Generals/Code/GameEngine/Source/GameClient/GUI/HeaderTemplate.cpp

Lines changed: 7 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -136,22 +136,14 @@ HeaderTemplateManager::~HeaderTemplateManager( void )
136136

137137
void 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

Generals/Code/GameEngine/Source/GameClient/GlobalLanguage.cpp

Lines changed: 6 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -133,23 +133,14 @@ GlobalLanguage::~GlobalLanguage()
133133

134134
void 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
{

0 commit comments

Comments
 (0)