save_data: Fix save data list back button. (#1003)

* save_data: Fix save data list back button.

* common: Add more null checks in CString.

Co-authored-by: Vinicius Rangel <me@viniciusrangel.dev>

---------

Co-authored-by: Vinicius Rangel <me@viniciusrangel.dev>
This commit is contained in:
squidbus 2024-09-21 00:21:53 -07:00 committed by GitHub
parent 4fe81231f6
commit 171e475f80
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 28 additions and 4 deletions

View file

@ -620,7 +620,7 @@ void SaveDialogUi::DrawList() {
SetCursorPosX(GetContentRegionAvail().x - button_size.x);
if (Button(back, button_size)) {
result->dir_name.clear();
Finish(ButtonId::INVALID);
Finish(ButtonId::INVALID, Result::USER_CANCELED);
}
if (IsKeyPressed(ImGuiKey_GamepadFaceRight)) {
SetItemCurrentNavFocus();