Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix "Savestate Slot" string #18891

Merged
merged 2 commits into from
Feb 26, 2024
Merged

Fix "Savestate Slot" string #18891

merged 2 commits into from
Feb 26, 2024

Conversation

LunaMoo
Copy link
Collaborator

@LunaMoo LunaMoo commented Feb 25, 2024

Not sure how long it was broken nor if there are any similar to fix, very minor thing that nobody notices.

UI/NativeApp.cpp Outdated
@@ -1200,7 +1200,7 @@ bool HandleGlobalMessage(UIMessage message, const std::string &value) {
return true;
} else if (message == UIMessage::SAVESTATE_DISPLAY_SLOT) {
auto sy = GetI18NCategory(I18NCat::SYSTEM);
std::string msg = StringFromFormat("%s: %d", sy->T("Savestate Slot"), SaveState::GetCurrentSlot() + 1);
std::string msg = StringFromFormat("%s: %d", std::string(sy->T("Savestate Slot")), SaveState::GetCurrentSlot() + 1);
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch, but that's not gonna work, can't pass an std::string as a format parameter.

Either use T_cstr() which remains for this use, or .c_str() after constructing the std::string.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well, it's only for ("Savestate Slot") part and works as such, but ok, I'll change it.

@hrydgard hrydgard merged commit 7049946 into hrydgard:master Feb 26, 2024
18 checks passed
@LunaMoo LunaMoo deleted the Fix_string branch February 26, 2024 12:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants