mirror of
				https://github.com/encounter/SDL.git
				synced 2025-10-25 19:20:25 +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…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user