mirror of
https://github.com/1dot13/source.git
synced 2026-08-26 14:30:26 +02:00
Fix the issue of garbled UTF-8 text in the szTileSetDisplayName field of the StructureMove.xml file in the game's "Drag" menu.(Method provided by @Learner)
This commit is contained in:
@@ -909,7 +909,9 @@ DragSelection::Setup( UINT32 aVal )
|
|||||||
|
|
||||||
if ( xmlentry >= 0 )
|
if ( xmlentry >= 0 )
|
||||||
{
|
{
|
||||||
swprintf( pStr, L"%hs (%s)", gStructureMovePossible[xmlentry].szTileSetDisplayName, FaceDirs[gOneCDirection[ubDirection]] );
|
WCHAR buf[256];
|
||||||
|
MultiByteToWideChar(CP_UTF8, 0, gStructureMovePossible[xmlentry].szTileSetDisplayName, -1, buf, 256);
|
||||||
|
swprintf(pStr, L"%s (%s)", buf, FaceDirs[gOneCDirection[ubDirection]]);
|
||||||
|
|
||||||
// we have to use an offset of NOBODY in order to differentiate between person and corpse
|
// we have to use an offset of NOBODY in order to differentiate between person and corpse
|
||||||
pOption = new POPUP_OPTION( &std::wstring( pStr ), new popupCallbackFunction<void, UINT32>( &Wrapper_Function_DragSelection_GridNo, sTempGridNo ) );
|
pOption = new POPUP_OPTION( &std::wstring( pStr ), new popupCallbackFunction<void, UINT32>( &Wrapper_Function_DragSelection_GridNo, sTempGridNo ) );
|
||||||
|
|||||||
Reference in New Issue
Block a user