Fix save list, delete save, exit without saving, and blank username on Windows64 (#539)
* Fix world save rename not applying new name
KeyboardCompleteWorldNameCallback had no _WINDOWS64 branch, so the
typed name was validated then silently discarded on every rename attempt.
Write the new name to a worldname.txt sidecar file next to the save
(Windows64\GameHDD\{folder}\worldname.txt) and update the in-memory
display name immediately. ReadLevelNameFromSaveFile now checks for this
sidecar first so renamed saves persist correctly across restarts.
* Fixed gamertag being blank upon renaming and re-joining a save
* Save deletion fix, exiting without saving fix
* Add native in-game keyboard UI for world naming and renaming
This commit is contained in:
@@ -55,6 +55,8 @@ void KeyboardMouseInput::Init()
|
||||
m_hasInput = false;
|
||||
m_kbmActive = true;
|
||||
m_screenWantsCursorHidden = false;
|
||||
m_charBufferHead = 0;
|
||||
m_charBufferTail = 0;
|
||||
|
||||
RAWINPUTDEVICE rid;
|
||||
rid.usUsagePage = 0x01; // HID_USAGE_PAGE_GENERIC
|
||||
@@ -381,4 +383,29 @@ float KeyboardMouseInput::GetLookY(float sensitivity) const
|
||||
return (float)(-m_mouseDeltaY) * sensitivity;
|
||||
}
|
||||
|
||||
void KeyboardMouseInput::OnChar(wchar_t c)
|
||||
{
|
||||
int next = (m_charBufferHead + 1) % CHAR_BUFFER_SIZE;
|
||||
if (next != m_charBufferTail)
|
||||
{
|
||||
m_charBuffer[m_charBufferHead] = c;
|
||||
m_charBufferHead = next;
|
||||
}
|
||||
}
|
||||
|
||||
bool KeyboardMouseInput::ConsumeChar(wchar_t &outChar)
|
||||
{
|
||||
if (m_charBufferTail == m_charBufferHead)
|
||||
return false;
|
||||
outChar = m_charBuffer[m_charBufferTail];
|
||||
m_charBufferTail = (m_charBufferTail + 1) % CHAR_BUFFER_SIZE;
|
||||
return true;
|
||||
}
|
||||
|
||||
void KeyboardMouseInput::ClearCharBuffer()
|
||||
{
|
||||
m_charBufferHead = 0;
|
||||
m_charBufferTail = 0;
|
||||
}
|
||||
|
||||
#endif // _WINDOWS64
|
||||
|
||||
Reference in New Issue
Block a user