mirror of
https://github.com/hrydgard/ppsspp.git
synced 2025-04-02 11:01:50 -04:00
Merge pull request #19838 from hrydgard/sdl-imgui-keyboard-fix
SDL: Enable KEY_CHAR processing when imgui is active
This commit is contained in:
commit
5431bb35fc
3 changed files with 16 additions and 1 deletions
|
@ -497,6 +497,9 @@ void EmuScreen::dialogFinished(const Screen *dialog, DialogResult result) {
|
|||
UI::EnableFocusMovement(false);
|
||||
RecreateViews();
|
||||
SetExtraAssertInfo(extraAssertInfoStr_.c_str());
|
||||
|
||||
// Make sure we re-enable keyboard mode if it was disabled by the dialog, and if needed.
|
||||
lastImguiEnabled_ = false;
|
||||
}
|
||||
|
||||
static void AfterSaveStateAction(SaveState::Status status, std::string_view message, void *) {
|
||||
|
@ -1658,6 +1661,14 @@ ScreenRenderFlags EmuScreen::render(ScreenRenderMode mode) {
|
|||
}
|
||||
|
||||
void EmuScreen::runImDebugger() {
|
||||
if (!lastImguiEnabled_ && g_Config.bShowImDebugger) {
|
||||
System_NotifyUIEvent(UIEventNotification::TEXT_GOTFOCUS);
|
||||
INFO_LOG(Log::System, "activating keyboard");
|
||||
} else if (lastImguiEnabled_ && !g_Config.bShowImDebugger) {
|
||||
System_NotifyUIEvent(UIEventNotification::TEXT_LOSTFOCUS);
|
||||
INFO_LOG(Log::System, "deactivating keyboard");
|
||||
}
|
||||
lastImguiEnabled_ = g_Config.bShowImDebugger;
|
||||
if (g_Config.bShowImDebugger) {
|
||||
Draw::DrawContext *draw = screenManager()->getDrawContext();
|
||||
if (!imguiInited_) {
|
||||
|
|
|
@ -142,6 +142,8 @@ private:
|
|||
bool keyShiftRight_ = false;
|
||||
bool keyAltLeft_ = false;
|
||||
bool keyAltRight_ = false;
|
||||
|
||||
bool lastImguiEnabled_ = false;
|
||||
};
|
||||
|
||||
bool MustRunBehind();
|
||||
|
|
|
@ -262,7 +262,7 @@ void ImGePixelViewer::UpdateTexture(Draw::DrawContext *draw) {
|
|||
texture_ = nullptr;
|
||||
}
|
||||
if (!Memory::IsValid4AlignedAddress(addr) || width == 0 || height == 0 || stride > 1024 || stride == 0) {
|
||||
INFO_LOG(Log::GeDebugger, "PixelViewer: Bad texture params");
|
||||
// TODO: Show a warning triangle or something.
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -401,6 +401,8 @@ bool ImGeReadbackViewer::Draw(GPUDebugInterface *gpuDebug, Draw::DrawContext *dr
|
|||
readbackFmt_ = Draw::DataFormat::S8;
|
||||
rbBpp = 1;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
data_ = new uint8_t[w * h * rbBpp];
|
||||
|
|
Loading…
Add table
Reference in a new issue