Remove trail-spaces
This commit is contained in:
parent
9e4f513a43
commit
26548c1062
8 changed files with 35 additions and 35 deletions
|
@ -519,7 +519,7 @@ const char *GetClipboardText(void)
|
||||||
Image GetClipboardImage(void)
|
Image GetClipboardImage(void)
|
||||||
{
|
{
|
||||||
Image image = { 0 };
|
Image image = { 0 };
|
||||||
|
|
||||||
TRACELOG(LOG_WARNING, "GetClipboardImage() not implemented on target platform");
|
TRACELOG(LOG_WARNING, "GetClipboardImage() not implemented on target platform");
|
||||||
|
|
||||||
return image;
|
return image;
|
||||||
|
|
|
@ -68,7 +68,7 @@
|
||||||
// NOTE: Those functions require linking with winmm library
|
// NOTE: Those functions require linking with winmm library
|
||||||
//#pragma warning(disable: 4273)
|
//#pragma warning(disable: 4273)
|
||||||
__declspec(dllimport) unsigned int __stdcall timeEndPeriod(unsigned int uPeriod);
|
__declspec(dllimport) unsigned int __stdcall timeEndPeriod(unsigned int uPeriod);
|
||||||
//#pragma warning(default: 4273)
|
//#pragma warning(default: 4273)
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
#if defined(__linux__) || defined(__FreeBSD__) || defined(__OpenBSD__)
|
#if defined(__linux__) || defined(__FreeBSD__) || defined(__OpenBSD__)
|
||||||
|
@ -971,16 +971,16 @@ const char *GetClipboardText(void)
|
||||||
Image GetClipboardImage(void)
|
Image GetClipboardImage(void)
|
||||||
{
|
{
|
||||||
Image image = { 0 };
|
Image image = { 0 };
|
||||||
|
|
||||||
#if defined(SUPPORT_CLIPBOARD_IMAGE)
|
#if defined(SUPPORT_CLIPBOARD_IMAGE)
|
||||||
#if defined(_WIN32)
|
#if defined(_WIN32)
|
||||||
unsigned long long int dataSize = 0;
|
unsigned long long int dataSize = 0;
|
||||||
void *fileData = NULL;
|
void *fileData = NULL;
|
||||||
int width = 0;
|
int width = 0;
|
||||||
int height = 0;
|
int height = 0;
|
||||||
|
|
||||||
fileData = (void*)Win32GetClipboardImageData(&width, &height, &dataSize);
|
fileData = (void*)Win32GetClipboardImageData(&width, &height, &dataSize);
|
||||||
|
|
||||||
if (fileData == NULL) TRACELOG(LOG_WARNING, "Clipboard image: Couldn't get clipboard data.");
|
if (fileData == NULL) TRACELOG(LOG_WARNING, "Clipboard image: Couldn't get clipboard data.");
|
||||||
else image = LoadImageFromMemory(".bmp", fileData, (int)dataSize);
|
else image = LoadImageFromMemory(".bmp", fileData, (int)dataSize);
|
||||||
#else
|
#else
|
||||||
|
|
|
@ -246,7 +246,7 @@ bool WindowShouldClose(void)
|
||||||
|
|
||||||
// Toggle fullscreen mode
|
// Toggle fullscreen mode
|
||||||
void ToggleFullscreen(void)
|
void ToggleFullscreen(void)
|
||||||
{
|
{
|
||||||
RGFW_window_maximize(platform.window);
|
RGFW_window_maximize(platform.window);
|
||||||
ToggleBorderlessWindowed();
|
ToggleBorderlessWindowed();
|
||||||
}
|
}
|
||||||
|
@ -678,16 +678,16 @@ const char *GetClipboardText(void)
|
||||||
Image GetClipboardImage(void)
|
Image GetClipboardImage(void)
|
||||||
{
|
{
|
||||||
Image image = { 0 };
|
Image image = { 0 };
|
||||||
|
|
||||||
#if defined(SUPPORT_CLIPBOARD_IMAGE)
|
#if defined(SUPPORT_CLIPBOARD_IMAGE)
|
||||||
#if defined(_WIN32)
|
#if defined(_WIN32)
|
||||||
unsigned long long int dataSize = 0;
|
unsigned long long int dataSize = 0;
|
||||||
void *fileData = NULL;
|
void *fileData = NULL;
|
||||||
int width = 0;
|
int width = 0;
|
||||||
int height = 0;
|
int height = 0;
|
||||||
|
|
||||||
fileData = (void*)Win32GetClipboardImageData(&width, &height, &dataSize);
|
fileData = (void*)Win32GetClipboardImageData(&width, &height, &dataSize);
|
||||||
|
|
||||||
if (fileData == NULL) TRACELOG(LOG_WARNING, "Clipboard image: Couldn't get clipboard data.");
|
if (fileData == NULL) TRACELOG(LOG_WARNING, "Clipboard image: Couldn't get clipboard data.");
|
||||||
else image = LoadImageFromMemory(".bmp", fileData, (int)dataSize);
|
else image = LoadImageFromMemory(".bmp", fileData, (int)dataSize);
|
||||||
#else
|
#else
|
||||||
|
@ -1194,7 +1194,7 @@ void PollInputEvents(void)
|
||||||
int button = (axis == GAMEPAD_AXIS_LEFT_TRIGGER)? GAMEPAD_BUTTON_LEFT_TRIGGER_2 : GAMEPAD_BUTTON_RIGHT_TRIGGER_2;
|
int button = (axis == GAMEPAD_AXIS_LEFT_TRIGGER)? GAMEPAD_BUTTON_LEFT_TRIGGER_2 : GAMEPAD_BUTTON_RIGHT_TRIGGER_2;
|
||||||
int pressed = (value > 0.1f);
|
int pressed = (value > 0.1f);
|
||||||
CORE.Input.Gamepad.currentButtonState[event->joystick][button] = pressed;
|
CORE.Input.Gamepad.currentButtonState[event->joystick][button] = pressed;
|
||||||
|
|
||||||
if (pressed) CORE.Input.Gamepad.lastButtonPressed = button;
|
if (pressed) CORE.Input.Gamepad.lastButtonPressed = button;
|
||||||
else if (CORE.Input.Gamepad.lastButtonPressed == button) CORE.Input.Gamepad.lastButtonPressed = 0;
|
else if (CORE.Input.Gamepad.lastButtonPressed == button) CORE.Input.Gamepad.lastButtonPressed = 0;
|
||||||
}
|
}
|
||||||
|
@ -1286,8 +1286,8 @@ int InitPlatform(void)
|
||||||
RGFW_area screenSize = RGFW_getScreenSize();
|
RGFW_area screenSize = RGFW_getScreenSize();
|
||||||
CORE.Window.display.width = screenSize.w;
|
CORE.Window.display.width = screenSize.w;
|
||||||
CORE.Window.display.height = screenSize.h;
|
CORE.Window.display.height = screenSize.h;
|
||||||
/*
|
/*
|
||||||
I think this is needed by Raylib now ?
|
I think this is needed by Raylib now ?
|
||||||
If so, rcore_destkop_sdl should be updated too
|
If so, rcore_destkop_sdl should be updated too
|
||||||
*/
|
*/
|
||||||
SetupFramebuffer(CORE.Window.display.width, CORE.Window.display.height);
|
SetupFramebuffer(CORE.Window.display.width, CORE.Window.display.height);
|
||||||
|
|
|
@ -244,7 +244,7 @@ static const int CursorsLUT[] = {
|
||||||
// SDL3 Migration:
|
// SDL3 Migration:
|
||||||
// SDL_WINDOW_FULLSCREEN_DESKTOP has been removed,
|
// SDL_WINDOW_FULLSCREEN_DESKTOP has been removed,
|
||||||
// and you can call SDL_GetWindowFullscreenMode()
|
// and you can call SDL_GetWindowFullscreenMode()
|
||||||
// to see whether an exclusive fullscreen mode will be used
|
// to see whether an exclusive fullscreen mode will be used
|
||||||
// or the borderless fullscreen desktop mode will be used
|
// or the borderless fullscreen desktop mode will be used
|
||||||
#define SDL_WINDOW_FULLSCREEN_DESKTOP SDL_WINDOW_FULLSCREEN
|
#define SDL_WINDOW_FULLSCREEN_DESKTOP SDL_WINDOW_FULLSCREEN
|
||||||
|
|
||||||
|
@ -269,7 +269,7 @@ const char *SDL_GameControllerNameForIndex(int joystickIndex)
|
||||||
const char *name = NULL;
|
const char *name = NULL;
|
||||||
int numJoysticks = 0;
|
int numJoysticks = 0;
|
||||||
SDL_JoystickID *joysticks = SDL_GetJoysticks(&numJoysticks);
|
SDL_JoystickID *joysticks = SDL_GetJoysticks(&numJoysticks);
|
||||||
|
|
||||||
if (joysticks)
|
if (joysticks)
|
||||||
{
|
{
|
||||||
if (joystickIndex < numJoysticks)
|
if (joystickIndex < numJoysticks)
|
||||||
|
@ -277,10 +277,10 @@ const char *SDL_GameControllerNameForIndex(int joystickIndex)
|
||||||
SDL_JoystickID instance_id = joysticks[joystickIndex];
|
SDL_JoystickID instance_id = joysticks[joystickIndex];
|
||||||
name = SDL_GetGamepadNameForID(instance_id);
|
name = SDL_GetGamepadNameForID(instance_id);
|
||||||
}
|
}
|
||||||
|
|
||||||
SDL_free(joysticks);
|
SDL_free(joysticks);
|
||||||
}
|
}
|
||||||
|
|
||||||
return name;
|
return name;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -288,7 +288,7 @@ int SDL_GetNumVideoDisplays(void)
|
||||||
{
|
{
|
||||||
int monitorCount = 0;
|
int monitorCount = 0;
|
||||||
SDL_DisplayID *displays = SDL_GetDisplays(&monitorCount);
|
SDL_DisplayID *displays = SDL_GetDisplays(&monitorCount);
|
||||||
|
|
||||||
// Safe because If `mem` is NULL, SDL_free does nothing
|
// Safe because If `mem` is NULL, SDL_free does nothing
|
||||||
SDL_free(displays);
|
SDL_free(displays);
|
||||||
|
|
||||||
|
@ -300,21 +300,21 @@ int SDL_GetNumVideoDisplays(void)
|
||||||
Uint8 SDL_EventState(Uint32 type, int state)
|
Uint8 SDL_EventState(Uint32 type, int state)
|
||||||
{
|
{
|
||||||
Uint8 stateBefore = SDL_EventEnabled(type);
|
Uint8 stateBefore = SDL_EventEnabled(type);
|
||||||
|
|
||||||
switch (state)
|
switch (state)
|
||||||
{
|
{
|
||||||
case SDL_DISABLE: SDL_SetEventEnabled(type, false); break;
|
case SDL_DISABLE: SDL_SetEventEnabled(type, false); break;
|
||||||
case SDL_ENABLE: SDL_SetEventEnabled(type, true); break;
|
case SDL_ENABLE: SDL_SetEventEnabled(type, true); break;
|
||||||
default: TRACELOG(LOG_WARNING, "Event sate: unknow type");
|
default: TRACELOG(LOG_WARNING, "Event sate: unknow type");
|
||||||
}
|
}
|
||||||
|
|
||||||
return stateBefore;
|
return stateBefore;
|
||||||
}
|
}
|
||||||
|
|
||||||
void SDL_GetCurrentDisplayMode_Adapter(SDL_DisplayID displayID, SDL_DisplayMode* mode)
|
void SDL_GetCurrentDisplayMode_Adapter(SDL_DisplayID displayID, SDL_DisplayMode* mode)
|
||||||
{
|
{
|
||||||
const SDL_DisplayMode* currMode = SDL_GetCurrentDisplayMode(displayID);
|
const SDL_DisplayMode* currMode = SDL_GetCurrentDisplayMode(displayID);
|
||||||
|
|
||||||
if (currMode == NULL) TRACELOG(LOG_WARNING, "No current display mode");
|
if (currMode == NULL) TRACELOG(LOG_WARNING, "No current display mode");
|
||||||
else *mode = *currMode;
|
else *mode = *currMode;
|
||||||
}
|
}
|
||||||
|
@ -335,11 +335,11 @@ SDL_Surface *SDL_CreateRGBSurface(Uint32 flags, int width, int height, int depth
|
||||||
int SDL_GetDisplayDPI(int displayIndex, float *ddpi, float *hdpi, float *vdpi)
|
int SDL_GetDisplayDPI(int displayIndex, float *ddpi, float *hdpi, float *vdpi)
|
||||||
{
|
{
|
||||||
float dpi = SDL_GetWindowDisplayScale(platform.window)*96.0;
|
float dpi = SDL_GetWindowDisplayScale(platform.window)*96.0;
|
||||||
|
|
||||||
if (ddpi != NULL) *ddpi = dpi;
|
if (ddpi != NULL) *ddpi = dpi;
|
||||||
if (hdpi != NULL) *hdpi = dpi;
|
if (hdpi != NULL) *hdpi = dpi;
|
||||||
if (vdpi != NULL) *vdpi = dpi;
|
if (vdpi != NULL) *vdpi = dpi;
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -408,7 +408,7 @@ int SDL_GetNumTouchFingers(SDL_TouchID touchID)
|
||||||
void* SDL_GetClipboardData(const char *mime_type, size_t *size)
|
void* SDL_GetClipboardData(const char *mime_type, size_t *size)
|
||||||
{
|
{
|
||||||
TRACELOG(LOG_WARNING, "Getting clipboard data that is not text is only available in SDL3");
|
TRACELOG(LOG_WARNING, "Getting clipboard data that is not text is only available in SDL3");
|
||||||
|
|
||||||
// We could possibly implement it ourselves in this case for some easier platforms
|
// We could possibly implement it ourselves in this case for some easier platforms
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
@ -930,7 +930,7 @@ Vector2 GetMonitorPosition(int monitor)
|
||||||
if ((monitor >= 0) && (monitor < monitorCount))
|
if ((monitor >= 0) && (monitor < monitorCount))
|
||||||
{
|
{
|
||||||
SDL_Rect displayBounds;
|
SDL_Rect displayBounds;
|
||||||
|
|
||||||
#if defined(PLATFORM_DESKTOP_SDL3)
|
#if defined(PLATFORM_DESKTOP_SDL3)
|
||||||
if (SDL_GetDisplayUsableBounds(monitor, &displayBounds))
|
if (SDL_GetDisplayUsableBounds(monitor, &displayBounds))
|
||||||
#else
|
#else
|
||||||
|
@ -1124,12 +1124,12 @@ Image GetClipboardImage(void)
|
||||||
|
|
||||||
size_t dataSize = 0;
|
size_t dataSize = 0;
|
||||||
void *fileData = NULL;
|
void *fileData = NULL;
|
||||||
|
|
||||||
for (int i = 0; i < SDL_arraysize(imageFormats); ++i)
|
for (int i = 0; i < SDL_arraysize(imageFormats); ++i)
|
||||||
{
|
{
|
||||||
// NOTE: This pointer should be free with SDL_free() at some point
|
// NOTE: This pointer should be free with SDL_free() at some point
|
||||||
fileData = SDL_GetClipboardData(imageFormats[i], &dataSize);
|
fileData = SDL_GetClipboardData(imageFormats[i], &dataSize);
|
||||||
|
|
||||||
if (fileData)
|
if (fileData)
|
||||||
{
|
{
|
||||||
image = LoadImageFromMemory(imageExtensions[i], fileData, dataSize);
|
image = LoadImageFromMemory(imageExtensions[i], fileData, dataSize);
|
||||||
|
@ -1288,9 +1288,9 @@ static void UpdateTouchPointsSDL(SDL_TouchFingerEvent event)
|
||||||
CORE.Input.Touch.position[i].y = finger->y*CORE.Window.screen.height;
|
CORE.Input.Touch.position[i].y = finger->y*CORE.Window.screen.height;
|
||||||
CORE.Input.Touch.currentTouchState[i] = 1;
|
CORE.Input.Touch.currentTouchState[i] = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
SDL_free(fingers);
|
SDL_free(fingers);
|
||||||
|
|
||||||
#else // SDL2
|
#else // SDL2
|
||||||
|
|
||||||
CORE.Input.Touch.pointCount = SDL_GetNumTouchFingers(event.touchId);
|
CORE.Input.Touch.pointCount = SDL_GetNumTouchFingers(event.touchId);
|
||||||
|
@ -1395,7 +1395,7 @@ void PollInputEvents(void)
|
||||||
CORE.Window.dropFilepaths = (char **)RL_CALLOC(1024, sizeof(char *));
|
CORE.Window.dropFilepaths = (char **)RL_CALLOC(1024, sizeof(char *));
|
||||||
|
|
||||||
CORE.Window.dropFilepaths[CORE.Window.dropFileCount] = (char *)RL_CALLOC(MAX_FILEPATH_LENGTH, sizeof(char));
|
CORE.Window.dropFilepaths[CORE.Window.dropFileCount] = (char *)RL_CALLOC(MAX_FILEPATH_LENGTH, sizeof(char));
|
||||||
|
|
||||||
#if defined(PLATFORM_DESKTOP_SDL3)
|
#if defined(PLATFORM_DESKTOP_SDL3)
|
||||||
// const char *data; /**< The text for SDL_EVENT_DROP_TEXT and the file name for SDL_EVENT_DROP_FILE, NULL for other events */
|
// const char *data; /**< The text for SDL_EVENT_DROP_TEXT and the file name for SDL_EVENT_DROP_FILE, NULL for other events */
|
||||||
// Event memory is now managed by SDL, so you should not free the data in SDL_EVENT_DROP_FILE, and if you want to hold onto the text in SDL_EVENT_TEXT_EDITING and SDL_EVENT_TEXT_INPUT events, you should make a copy of it. SDL_TEXTINPUTEVENT_TEXT_SIZE is no longer necessary and has been removed.
|
// Event memory is now managed by SDL, so you should not free the data in SDL_EVENT_DROP_FILE, and if you want to hold onto the text in SDL_EVENT_TEXT_EDITING and SDL_EVENT_TEXT_INPUT events, you should make a copy of it. SDL_TEXTINPUTEVENT_TEXT_SIZE is no longer necessary and has been removed.
|
||||||
|
@ -1410,7 +1410,7 @@ void PollInputEvents(void)
|
||||||
else if (CORE.Window.dropFileCount < 1024)
|
else if (CORE.Window.dropFileCount < 1024)
|
||||||
{
|
{
|
||||||
CORE.Window.dropFilepaths[CORE.Window.dropFileCount] = (char *)RL_CALLOC(MAX_FILEPATH_LENGTH, sizeof(char));
|
CORE.Window.dropFilepaths[CORE.Window.dropFileCount] = (char *)RL_CALLOC(MAX_FILEPATH_LENGTH, sizeof(char));
|
||||||
|
|
||||||
#if defined(PLATFORM_DESKTOP_SDL3)
|
#if defined(PLATFORM_DESKTOP_SDL3)
|
||||||
strcpy(CORE.Window.dropFilepaths[CORE.Window.dropFileCount], event.drop.data);
|
strcpy(CORE.Window.dropFilepaths[CORE.Window.dropFileCount], event.drop.data);
|
||||||
#else
|
#else
|
||||||
|
|
|
@ -513,7 +513,7 @@ const char *GetClipboardText(void)
|
||||||
Image GetClipboardImage(void)
|
Image GetClipboardImage(void)
|
||||||
{
|
{
|
||||||
Image image = { 0 };
|
Image image = { 0 };
|
||||||
|
|
||||||
TRACELOG(LOG_WARNING, "GetClipboardImage() not implemented on target platform");
|
TRACELOG(LOG_WARNING, "GetClipboardImage() not implemented on target platform");
|
||||||
|
|
||||||
return image;
|
return image;
|
||||||
|
|
|
@ -296,7 +296,7 @@ const char *GetClipboardText(void)
|
||||||
Image GetClipboardImage(void)
|
Image GetClipboardImage(void)
|
||||||
{
|
{
|
||||||
Image image = { 0 };
|
Image image = { 0 };
|
||||||
|
|
||||||
TRACELOG(LOG_WARNING, "GetClipboardImage() not implemented on target platform");
|
TRACELOG(LOG_WARNING, "GetClipboardImage() not implemented on target platform");
|
||||||
|
|
||||||
return image;
|
return image;
|
||||||
|
|
|
@ -809,7 +809,7 @@ const char *GetClipboardText(void)
|
||||||
Image GetClipboardImage(void)
|
Image GetClipboardImage(void)
|
||||||
{
|
{
|
||||||
Image image = { 0 };
|
Image image = { 0 };
|
||||||
|
|
||||||
TRACELOG(LOG_WARNING, "GetClipboardImage() not implemented on target platform");
|
TRACELOG(LOG_WARNING, "GetClipboardImage() not implemented on target platform");
|
||||||
|
|
||||||
return image;
|
return image;
|
||||||
|
|
|
@ -3417,9 +3417,9 @@ unsigned int rlLoadTextureCubemap(const void *data, int size, int format, int mi
|
||||||
{
|
{
|
||||||
if (format < RL_PIXELFORMAT_COMPRESSED_DXT1_RGB)
|
if (format < RL_PIXELFORMAT_COMPRESSED_DXT1_RGB)
|
||||||
{
|
{
|
||||||
if ((format == RL_PIXELFORMAT_UNCOMPRESSED_R32) ||
|
if ((format == RL_PIXELFORMAT_UNCOMPRESSED_R32) ||
|
||||||
(format == RL_PIXELFORMAT_UNCOMPRESSED_R32G32B32A32) ||
|
(format == RL_PIXELFORMAT_UNCOMPRESSED_R32G32B32A32) ||
|
||||||
(format == RL_PIXELFORMAT_UNCOMPRESSED_R16) ||
|
(format == RL_PIXELFORMAT_UNCOMPRESSED_R16) ||
|
||||||
(format == RL_PIXELFORMAT_UNCOMPRESSED_R16G16B16A16)) TRACELOG(RL_LOG_WARNING, "TEXTURES: Cubemap requested format not supported");
|
(format == RL_PIXELFORMAT_UNCOMPRESSED_R16G16B16A16)) TRACELOG(RL_LOG_WARNING, "TEXTURES: Cubemap requested format not supported");
|
||||||
else glTexImage2D(GL_TEXTURE_CUBE_MAP_POSITIVE_X + face, mipmapLevel, glInternalFormat, mipSize, mipSize, 0, glFormat, glType, NULL);
|
else glTexImage2D(GL_TEXTURE_CUBE_MAP_POSITIVE_X + face, mipmapLevel, glInternalFormat, mipSize, mipSize, 0, glFormat, glType, NULL);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue