mirror of https://github.com/libsdl-org/SDL.git
Get the initial clipboard state at startup
This commit is contained in:
parent
6575b8157b
commit
54d4e48539
|
|
@ -145,7 +145,7 @@ void Cocoa_CheckClipboardUpdate(SDL_CocoaVideoData *data)
|
|||
pasteboard = [NSPasteboard generalPasteboard];
|
||||
count = [pasteboard changeCount];
|
||||
if (count != data.clipboard_count) {
|
||||
if (data.clipboard_count) {
|
||||
if (count) {
|
||||
int nformats = 0;
|
||||
char **new_mime_types = GetMimeTypes(&nformats);
|
||||
if (new_mime_types) {
|
||||
|
|
|
|||
|
|
@ -426,17 +426,16 @@ static char **GetMimeTypes(int *pnformats)
|
|||
|
||||
void WIN_CheckClipboardUpdate(struct SDL_VideoData *data)
|
||||
{
|
||||
const DWORD seq = GetClipboardSequenceNumber();
|
||||
if (seq != data->clipboard_count) {
|
||||
if (data->clipboard_count) {
|
||||
DWORD count = GetClipboardSequenceNumber();
|
||||
if (count != data->clipboard_count) {
|
||||
if (count) {
|
||||
int nformats = 0;
|
||||
char **new_mime_types = GetMimeTypes(&nformats);
|
||||
if (new_mime_types) {
|
||||
SDL_SendClipboardUpdate(false, new_mime_types, nformats);
|
||||
}
|
||||
}
|
||||
|
||||
data->clipboard_count = seq;
|
||||
data->clipboard_count = count;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue