|
|
|
@ -992,7 +992,7 @@ const char *GetClipboardText(void) |
|
|
|
return RGFW_readClipboard(NULL); |
|
|
|
} |
|
|
|
|
|
|
|
#if defined(SUPPORT_CLIPBOARD_IMAGE)
|
|
|
|
#if SUPPORT_CLIPBOARD_IMAGE
|
|
|
|
#if defined(_WIN32)
|
|
|
|
#define WIN32_CLIPBOARD_IMPLEMENTATION
|
|
|
|
#define WINUSER_ALREADY_INCLUDED
|
|
|
|
@ -1006,8 +1006,11 @@ const char *GetClipboardText(void) |
|
|
|
Image GetClipboardImage(void) |
|
|
|
{ |
|
|
|
Image image = { 0 }; |
|
|
|
#if defined(SUPPORT_CLIPBOARD_IMAGE)
|
|
|
|
#if SUPPORT_CLIPBOARD_IMAGE
|
|
|
|
#if SUPPORT_MODULE_RTEXTURES
|
|
|
|
#if defined(_WIN32)
|
|
|
|
|
|
|
|
#if SUPPORT_FILEFORMAT_BMP
|
|
|
|
unsigned long long int dataSize = 0; // moved into _WIN32 scope until other platforms gain support
|
|
|
|
void *fileData = NULL; // moved into _WIN32 scope until other platforms gain support
|
|
|
|
|
|
|
|
@ -1017,9 +1020,15 @@ Image GetClipboardImage(void) |
|
|
|
|
|
|
|
if (fileData == NULL) TRACELOG(LOG_WARNING, "Clipboard image: Couldn't get clipboard data"); |
|
|
|
else image = LoadImageFromMemory(".bmp", (const unsigned char *)fileData, dataSize); |
|
|
|
#else
|
|
|
|
TRACELOG(LOG_WARNING, "WARNING: Enabling SUPPORT_CLIPBOARD_IMAGE requires SUPPORT_FILEFORMAT_BMP, specially on Windows"); |
|
|
|
#endif // SUPPORT_FILEFORMAT_BMP
|
|
|
|
#else
|
|
|
|
TRACELOG(LOG_WARNING, "Clipboard image: PLATFORM_DESKTOP_RGFW doesn't implement GetClipboardImage() for this OS"); |
|
|
|
#endif
|
|
|
|
#endif // defined(_WIN32)
|
|
|
|
#else // !SUPPORT_MODULE_RTEXTURES
|
|
|
|
TRACELOG(LOG_WARNING, "Enabling SUPPORT_CLIPBOARD_IMAGE requires SUPPORT_MODULE_RTEXTURES to work properly"); |
|
|
|
#endif // SUPPORT_MODULE_RTEXTURES
|
|
|
|
#endif // SUPPORT_CLIPBOARD_IMAGE
|
|
|
|
|
|
|
|
return image; |
|
|
|
@ -1142,7 +1151,7 @@ const char *GetKeyName(int key) |
|
|
|
// Register all input events
|
|
|
|
void PollInputEvents(void) |
|
|
|
{ |
|
|
|
#if defined(SUPPORT_GESTURES_SYSTEM)
|
|
|
|
#if SUPPORT_GESTURES_SYSTEM
|
|
|
|
// NOTE: Gestures update must be called every frame to reset gestures correctly
|
|
|
|
// because ProcessGestureEvent() is just called on an event, not every frame
|
|
|
|
UpdateGestures(); |
|
|
|
@ -1408,7 +1417,7 @@ void PollInputEvents(void) |
|
|
|
default: break; |
|
|
|
} |
|
|
|
|
|
|
|
#if defined(SUPPORT_GESTURES_SYSTEM)
|
|
|
|
#if SUPPORT_GESTURES_SYSTEM
|
|
|
|
if (touchAction > -1) |
|
|
|
{ |
|
|
|
// Process mouse events as touches to be able to use mouse-gestures
|
|
|
|
|