mirror of
https://github.com/moonlight-stream/moonlight-qt.git
synced 2026-06-17 22:23:31 +00:00
Improve detection of having no clipboard text
This commit is contained in:
@@ -92,8 +92,8 @@ void SdlInputHandler::performPendingSpecialKeyCombo()
|
|||||||
{
|
{
|
||||||
SDL_LogInfo(SDL_LOG_CATEGORY_APPLICATION,
|
SDL_LogInfo(SDL_LOG_CATEGORY_APPLICATION,
|
||||||
"Detected paste text combo");
|
"Detected paste text combo");
|
||||||
const char* text = SDL_GetClipboardText();
|
const char* text;
|
||||||
if (text != nullptr) {
|
if (SDL_HasClipboardText() && (text = SDL_GetClipboardText()) != nullptr) {
|
||||||
// Reset pending key combo before pasting,
|
// Reset pending key combo before pasting,
|
||||||
// otherwise it will ignore our keypresses.
|
// otherwise it will ignore our keypresses.
|
||||||
m_PendingKeyCombo = KeyComboMax;
|
m_PendingKeyCombo = KeyComboMax;
|
||||||
|
|||||||
Reference in New Issue
Block a user