Browse Source

Renamed n_mime_types to num_mime_types

Sam Lantinga 3 months ago
parent
commit
b902b0527b

+ 2 - 2
include/SDL3/SDL_events.h

@@ -920,8 +920,8 @@ typedef struct SDL_ClipboardEvent
     SDL_EventType type; /**< SDL_EVENT_CLIPBOARD_UPDATE */
     Uint32 reserved;
     Uint64 timestamp;   /**< In nanoseconds, populated using SDL_GetTicksNS() */
-    bool owner;       /**< are we owning the clipboard (internal update) */
-    Sint32 n_mime_types;     /**< number of mime types */
+    bool owner;         /**< are we owning the clipboard (internal update) */
+    Sint32 num_mime_types;   /**< number of mime types */
     const char **mime_types; /**< current mime types */
 } SDL_ClipboardEvent;
 

+ 3 - 2
src/events/SDL_clipboardevents.c

@@ -24,8 +24,9 @@
 
 #include "SDL_events_c.h"
 #include "SDL_clipboardevents_c.h"
+#include "../video/SDL_clipboard_c.h"
 
-void SDL_SendClipboardUpdate(bool owner, char **mime_types, size_t n_mime_types)
+void SDL_SendClipboardUpdate(bool owner, char **mime_types, size_t num_mime_types)
 {
     if (SDL_EventEnabled(SDL_EVENT_CLIPBOARD_UPDATE)) {
         SDL_Event event;
@@ -35,7 +36,7 @@ void SDL_SendClipboardUpdate(bool owner, char **mime_types, size_t n_mime_types)
         cevent->timestamp = 0;
         cevent->owner = owner;
         cevent->mime_types = (const char **)mime_types;
-        cevent->n_mime_types = (Uint32)n_mime_types;
+        cevent->num_mime_types = (Uint32)num_mime_types;
         SDL_PushEvent(&event);
     }
 }

+ 1 - 1
src/events/SDL_clipboardevents_c.h

@@ -23,6 +23,6 @@
 #ifndef SDL_clipboardevents_c_h_
 #define SDL_clipboardevents_c_h_
 
-extern void SDL_SendClipboardUpdate(bool owner, char **mime_types, size_t n_mime_types);
+extern void SDL_SendClipboardUpdate(bool owner, char **mime_types, size_t num_mime_types);
 
 #endif // SDL_clipboardevents_c_h_