mirror of https://github.com/encounter/SDL.git
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;
|
SDL_VideoData *pVData = (SDL_VideoData *)_this->driverdata;
|
||||||
PSZ pszClipboard;
|
PSZ pszClipboard;
|
||||||
|
SDL_bool result;
|
||||||
|
|
||||||
if (!WinOpenClipbrd(pVData->hab)) {
|
if (!WinOpenClipbrd(pVData->hab)) {
|
||||||
debug_os2("WinOpenClipbrd() failed");
|
debug_os2("WinOpenClipbrd() failed");
|
||||||
|
@ -1409,9 +1410,10 @@ static SDL_bool OS2_HasClipboardText(_THIS)
|
||||||
}
|
}
|
||||||
|
|
||||||
pszClipboard = (PSZ)WinQueryClipbrdData(pVData->hab, CF_TEXT);
|
pszClipboard = (PSZ)WinQueryClipbrdData(pVData->hab, CF_TEXT);
|
||||||
|
result = (pszClipboard && *pszClipboard) ? SDL_TRUE : SDL_FALSE;
|
||||||
WinCloseClipbrd(pVData->hab);
|
WinCloseClipbrd(pVData->hab);
|
||||||
|
|
||||||
return (pszClipboard && *pszClipboard) ? SDL_TRUE : SDL_FALSE;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue