mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2025-07-25 19:44:57 +00:00
Fix crash on Shift press.
This commit is contained in:
parent
297a17b237
commit
bc0319e7ed
@ -372,6 +372,7 @@ void ImeDialogUi::DrawKeyboard() {
|
||||
ImGui::NewLine();
|
||||
};
|
||||
|
||||
// SHIFT status label
|
||||
if (shift_enabled) {
|
||||
SetCursorPosX(20.0f);
|
||||
TextColored(ImVec4(0.2f, 0.6f, 1.0f, 1.0f), "SHIFT ENABLED");
|
||||
@ -383,14 +384,16 @@ void ImeDialogUi::DrawKeyboard() {
|
||||
|
||||
SetCursorPosX(20.0f);
|
||||
|
||||
if (shift_enabled)
|
||||
// Fix: safely push/pop style only if shift was enabled before clicking
|
||||
bool highlight = shift_enabled;
|
||||
if (highlight)
|
||||
PushStyleColor(ImGuiCol_Button, ImVec4(0.2f, 0.6f, 1.0f, 1.0f));
|
||||
|
||||
if (Button("SHIFT", ImVec2(75, 35))) {
|
||||
shift_enabled = !shift_enabled;
|
||||
}
|
||||
|
||||
if (shift_enabled)
|
||||
if (highlight)
|
||||
PopStyleColor();
|
||||
|
||||
SameLine();
|
||||
@ -425,6 +428,7 @@ void ImeDialogUi::DrawKeyboard() {
|
||||
}
|
||||
|
||||
|
||||
|
||||
int ImeDialogUi::InputTextCallback(ImGuiInputTextCallbackData* data) {
|
||||
ImeDialogUi* ui = static_cast<ImeDialogUi*>(data->UserData);
|
||||
ASSERT(ui);
|
||||
|
Loading…
Reference in New Issue
Block a user