mirror of
https://github.com/Ryujinx/SDL.git
synced 2024-12-23 16:35:29 +00:00
OS2_HasClipboardText: store the boolean result before closing clipboard.
just in case..
This commit is contained in:
parent
b5614d0c6e
commit
c8cee0b8ca
|
@ -1402,6 +1402,7 @@ static SDL_bool OS2_HasClipboardText(_THIS)
|
|||
{
|
||||
SDL_VideoData *pVData = (SDL_VideoData *)_this->driverdata;
|
||||
PSZ pszClipboard;
|
||||
SDL_bool result;
|
||||
|
||||
if (!WinOpenClipbrd(pVData->hab)) {
|
||||
debug_os2("WinOpenClipbrd() failed");
|
||||
|
@ -1409,9 +1410,10 @@ static SDL_bool OS2_HasClipboardText(_THIS)
|
|||
}
|
||||
|
||||
pszClipboard = (PSZ)WinQueryClipbrdData(pVData->hab, CF_TEXT);
|
||||
result = (pszClipboard && *pszClipboard) ? SDL_TRUE : SDL_FALSE;
|
||||
WinCloseClipbrd(pVData->hab);
|
||||
|
||||
return (pszClipboard && *pszClipboard) ? SDL_TRUE : SDL_FALSE;
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue