Minor fixes
This commit is contained in:
parent
3128e0282f
commit
ff34e6ac3d
@ -104,13 +104,15 @@ bool Hotkey::DrawUI(const char* label)
|
|||||||
bool Hotkey::Pressed()
|
bool Hotkey::Pressed()
|
||||||
{
|
{
|
||||||
if (KeyPressed(m_key1) && KeyPressed(m_key2))
|
if (KeyPressed(m_key1) && KeyPressed(m_key2))
|
||||||
|
{
|
||||||
m_bPressed = true;
|
m_bPressed = true;
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (m_bPressed)
|
if (m_bPressed)
|
||||||
{
|
{
|
||||||
m_bPressed = false;
|
m_bPressed = false;
|
||||||
return m_CurrentHotkey == "";
|
return (m_CurrentHotkey == "");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
|
@ -96,9 +96,10 @@ static void SetHelpMessage(const char *message, bool b1, bool b2, bool b3)
|
|||||||
#elif GTAVC
|
#elif GTAVC
|
||||||
CHud::SetHelpMessage(message, b1, b2);
|
CHud::SetHelpMessage(message, b1, b2);
|
||||||
#else // GTA3
|
#else // GTA3
|
||||||
const size_t cSize = strlen(message)+1;
|
const size_t size = strlen(message)+1;
|
||||||
wchar_t* wc = new wchar_t[cSize];
|
wchar_t* wc = new wchar_t[size];
|
||||||
mbstowcs (wc, message, cSize);
|
mbstowcs(wc, message, size);
|
||||||
CHud::SetHelpMessage((wchar_t*)wc, b1);
|
CHud::SetHelpMessage(wc, b1);
|
||||||
|
delete wc;
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
Loading…
Reference in New Issue
Block a user