Improve detection of having no clipboard text
This commit is contained in:
parent
b83c6f0c28
commit
5f3f2a96fd
1 changed files with 2 additions and 2 deletions
|
|
@ -92,8 +92,8 @@ void SdlInputHandler::performPendingSpecialKeyCombo()
|
|||
{
|
||||
SDL_LogInfo(SDL_LOG_CATEGORY_APPLICATION,
|
||||
"Detected paste text combo");
|
||||
const char* text = SDL_GetClipboardText();
|
||||
if (text != nullptr) {
|
||||
const char* text;
|
||||
if (SDL_HasClipboardText() && (text = SDL_GetClipboardText()) != nullptr) {
|
||||
// Reset pending key combo before pasting,
|
||||
// otherwise it will ignore our keypresses.
|
||||
m_PendingKeyCombo = KeyComboMax;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue