Skip to content
This repository has been archived by the owner on Feb 6, 2025. It is now read-only.

Commit

Permalink
[menu] fix #96 config name missing chars
Browse files Browse the repository at this point in the history
  • Loading branch information
maecry committed Jun 26, 2024
1 parent 5465e51 commit 4918a54
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions cstrike/core/menu.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -506,8 +506,12 @@ void T::Miscellaneous()
for (std::size_t i = 0U; i < C::vecFileNames.size(); i++)
{
// @todo: imgui cant work with wstring
CRT::String_t<MAX_PATH> szFileName(C::vecFileNames[i]);
if (ImGui::Selectable(szFileName.Data(), (nSelectedConfig == i)))
const wchar_t* wszFileName = C::vecFileNames[i];

char szFileName[MAX_PATH] = {};
CRT::StringUnicodeToMultiByte(szFileName, CS_ARRAYSIZE(szFileName), wszFileName);

if (ImGui::Selectable(szFileName, (nSelectedConfig == i)))
nSelectedConfig = i;
}

Expand Down

0 comments on commit 4918a54

Please sign in to comment.