WIN32: Make Win32ResourceArchive UNICODE compatible
This commit is contained in:
parent
c5604b20e4
commit
eda2cc6b71
1 changed files with 5 additions and 2 deletions
|
@ -340,7 +340,8 @@ BOOL CALLBACK EnumResNameProc(HMODULE hModule, LPCTSTR lpszType, LPTSTR lpszName
|
||||||
return TRUE;
|
return TRUE;
|
||||||
|
|
||||||
Win32ResourceArchive *arch = (Win32ResourceArchive *)lParam;
|
Win32ResourceArchive *arch = (Win32ResourceArchive *)lParam;
|
||||||
arch->_files.push_back(lpszName);
|
Common::String filename = Win32::tcharToString(lpszName);
|
||||||
|
arch->_files.push_back(filename);
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -371,7 +372,9 @@ const Common::ArchiveMemberPtr Win32ResourceArchive::getMember(const Common::Str
|
||||||
}
|
}
|
||||||
|
|
||||||
Common::SeekableReadStream *Win32ResourceArchive::createReadStreamForMember(const Common::String &name) const {
|
Common::SeekableReadStream *Win32ResourceArchive::createReadStreamForMember(const Common::String &name) const {
|
||||||
HRSRC resource = FindResource(NULL, name.c_str(), MAKEINTRESOURCE(256));
|
TCHAR *tName = Win32::stringToTchar(name);
|
||||||
|
HRSRC resource = FindResource(NULL, tName, MAKEINTRESOURCE(256));
|
||||||
|
free(tName);
|
||||||
|
|
||||||
if (resource == NULL)
|
if (resource == NULL)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue