Merge branch 'raysan5:master' into master

This commit is contained in:
Benjamin Schmid Ties 2023-12-11 12:23:08 +01:00 committed by GitHub
commit 311a13f707
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
8 changed files with 266 additions and 35 deletions

View File

@ -38,8 +38,7 @@ float sineIdx = 0.0f;
void AudioInputCallback(void *buffer, unsigned int frames) void AudioInputCallback(void *buffer, unsigned int frames)
{ {
audioFrequency = frequency + (audioFrequency - frequency)*0.95f; audioFrequency = frequency + (audioFrequency - frequency)*0.95f;
audioFrequency += 1.0f;
audioFrequency -= 1.0f;
float incr = audioFrequency/44100.0f; float incr = audioFrequency/44100.0f;
short *d = (short *)buffer; short *d = (short *)buffer;

View File

@ -5,7 +5,7 @@ project(example)
set(CMAKE_EXPORT_COMPILE_COMMANDS ON) set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
# Dependencies # Dependencies
set(RAYLIB_VERSION 4.5.0) set(RAYLIB_VERSION 5.0)
find_package(raylib ${RAYLIB_VERSION} QUIET) # QUIET or REQUIRED find_package(raylib ${RAYLIB_VERSION} QUIET) # QUIET or REQUIRED
if (NOT raylib_FOUND) # If there's none, fetch and build raylib if (NOT raylib_FOUND) # If there's none, fetch and build raylib
include(FetchContent) include(FetchContent)
@ -40,4 +40,4 @@ if (APPLE)
target_link_libraries(${PROJECT_NAME} "-framework IOKit") target_link_libraries(${PROJECT_NAME} "-framework IOKit")
target_link_libraries(${PROJECT_NAME} "-framework Cocoa") target_link_libraries(${PROJECT_NAME} "-framework Cocoa")
target_link_libraries(${PROJECT_NAME} "-framework OpenGL") target_link_libraries(${PROJECT_NAME} "-framework OpenGL")
endif() endif()

View File

@ -1,7 +1,7 @@
# Setup the project and settings # Setup the project and settings
project(raylib C) project(raylib C)
set(PROJECT_VERSION 4.5.0) set(PROJECT_VERSION 5.0.0)
set(API_VERSION 450) set(API_VERSION 500)
include(GNUInstallDirs) include(GNUInstallDirs)
include(JoinPaths) include(JoinPaths)

View File

@ -200,8 +200,7 @@ int *rprand_load_sequence(unsigned int count, int min, int max)
for (unsigned int i = 0; i < count;) for (unsigned int i = 0; i < count;)
{ {
value = ((int)rprand_xoshiro()%(abs(max - min) + 1)) + min; value = ((unsigned int)rprand_xoshiro()%(abs(max - min) + 1)) + min;
value_is_dup = false;
for (int j = 0; j < i; j++) for (int j = 0; j < i; j++)
{ {
@ -217,6 +216,8 @@ int *rprand_load_sequence(unsigned int count, int min, int max)
sequence[i] = value; sequence[i] = value;
i++; i++;
} }
value_is_dup = false;
} }
return sequence; return sequence;

View File

@ -996,7 +996,7 @@ void PollInputEvents(void)
CORE.Input.Touch.position[0] = CORE.Input.Mouse.currentPosition; CORE.Input.Touch.position[0] = CORE.Input.Mouse.currentPosition;
int touchAction = -1; // 0-TOUCH_ACTION_UP, 1-TOUCH_ACTION_DOWN, 2-TOUCH_ACTION_MOVE int touchAction = -1; // 0-TOUCH_ACTION_UP, 1-TOUCH_ACTION_DOWN, 2-TOUCH_ACTION_MOVE
bool gestureUpdate = false; // Flag to note gestures require to update bool realTouch = false; // Flag to differentiate real touch gestures from mouse ones
// Register previous keys states // Register previous keys states
// NOTE: Android supports up to 260 keys // NOTE: Android supports up to 260 keys
@ -1141,7 +1141,6 @@ void PollInputEvents(void)
CORE.Input.Touch.currentTouchState[btn] = 1; CORE.Input.Touch.currentTouchState[btn] = 1;
touchAction = 1; touchAction = 1;
gestureUpdate = true;
} break; } break;
case SDL_MOUSEBUTTONUP: case SDL_MOUSEBUTTONUP:
{ {
@ -1155,7 +1154,6 @@ void PollInputEvents(void)
CORE.Input.Touch.currentTouchState[btn] = 0; CORE.Input.Touch.currentTouchState[btn] = 0;
touchAction = 0; touchAction = 0;
gestureUpdate = true;
} break; } break;
case SDL_MOUSEWHEEL: case SDL_MOUSEWHEEL:
{ {
@ -1178,32 +1176,38 @@ void PollInputEvents(void)
CORE.Input.Touch.position[0] = CORE.Input.Mouse.currentPosition; CORE.Input.Touch.position[0] = CORE.Input.Mouse.currentPosition;
touchAction = 2; touchAction = 2;
gestureUpdate = true;
} break; } break;
// Check touch events // Check touch events
// NOTE: These cases need to be reviewed on a real touch screen // NOTE: These cases need to be reviewed on a real touch screen
case SDL_FINGERDOWN: case SDL_FINGERDOWN:
{ {
CORE.Input.Touch.currentTouchState[event.tfinger.fingerId] = 1; const int touchId = (int)event.tfinger.fingerId;
CORE.Input.Touch.currentTouchState[touchId] = 1;
CORE.Input.Touch.position[touchId].x = event.tfinger.x * CORE.Window.screen.width;
CORE.Input.Touch.position[touchId].y = event.tfinger.y * CORE.Window.screen.height;
touchAction = 1; touchAction = 1;
gestureUpdate = true; realTouch = true;
} break; } break;
case SDL_FINGERUP: case SDL_FINGERUP:
{ {
CORE.Input.Touch.currentTouchState[event.tfinger.fingerId] = 0; const int touchId = (int)event.tfinger.fingerId;
CORE.Input.Touch.currentTouchState[touchId] = 0;
CORE.Input.Touch.position[touchId].x = event.tfinger.x * CORE.Window.screen.width;
CORE.Input.Touch.position[touchId].y = event.tfinger.y * CORE.Window.screen.height;
touchAction = 0; touchAction = 0;
gestureUpdate = true; realTouch = true;
} break; } break;
case SDL_FINGERMOTION: case SDL_FINGERMOTION:
{ {
CORE.Input.Touch.position[event.tfinger.fingerId].x = (float)event.motion.x; const int touchId = (int)event.tfinger.fingerId;
CORE.Input.Touch.position[event.tfinger.fingerId].y = (float)event.motion.y; CORE.Input.Touch.position[touchId].x = event.tfinger.x * CORE.Window.screen.width;
CORE.Input.Touch.position[touchId].y = event.tfinger.y * CORE.Window.screen.height;
touchAction = 2; touchAction = 2;
gestureUpdate = true; realTouch = true;
} break; } break;
// Check gamepad events // Check gamepad events
@ -1228,7 +1232,7 @@ void PollInputEvents(void)
} }
#if defined(SUPPORT_GESTURES_SYSTEM) #if defined(SUPPORT_GESTURES_SYSTEM)
if (gestureUpdate) if (touchAction > -1)
{ {
// Process mouse events as touches to be able to use mouse-gestures // Process mouse events as touches to be able to use mouse-gestures
GestureEvent gestureEvent = { 0 }; GestureEvent gestureEvent = { 0 };
@ -1243,7 +1247,7 @@ void PollInputEvents(void)
gestureEvent.pointCount = 1; gestureEvent.pointCount = 1;
// Register touch points position, only one point registered // Register touch points position, only one point registered
if (touchAction == 2) gestureEvent.position[0] = CORE.Input.Touch.position[0]; if (touchAction == 2 || realTouch) gestureEvent.position[0] = CORE.Input.Touch.position[0];
else gestureEvent.position[0] = GetMousePosition(); else gestureEvent.position[0] = GetMousePosition();
// Normalize gestureEvent.position[0] for CORE.Window.screen.width and CORE.Window.screen.height // Normalize gestureEvent.position[0] for CORE.Window.screen.width and CORE.Window.screen.height
@ -1252,6 +1256,8 @@ void PollInputEvents(void)
// Gesture data is sent to gestures-system for processing // Gesture data is sent to gestures-system for processing
ProcessGestureEvent(gestureEvent); ProcessGestureEvent(gestureEvent);
touchAction = -1;
} }
#endif #endif
} }
@ -1404,6 +1410,11 @@ int InitPlatform(void)
//if (platform.gamepadgamepad == NULL) TRACELOG(LOG_WARNING, "PLATFORM: Unable to open game controller [ERROR: %s]", SDL_GetError()); //if (platform.gamepadgamepad == NULL) TRACELOG(LOG_WARNING, "PLATFORM: Unable to open game controller [ERROR: %s]", SDL_GetError());
} }
// Disable mouse events being interpreted as touch events
// NOTE: This is wanted because there are SDL_FINGER* events available which provide unique data
// Due to the way PollInputEvents() and rgestures.h are currently implemented, setting this won't break SUPPORT_MOUSE_GESTURES
SDL_SetHint(SDL_HINT_TOUCH_MOUSE_EVENTS, "0");
SDL_EventState(SDL_DROPFILE, SDL_ENABLE); SDL_EventState(SDL_DROPFILE, SDL_ENABLE);
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------

View File

@ -612,7 +612,6 @@ void PollInputEvents(void)
struct input_event event = { 0 }; struct input_event event = { 0 };
int touchAction = -1; // 0-TOUCH_ACTION_UP, 1-TOUCH_ACTION_DOWN, 2-TOUCH_ACTION_MOVE int touchAction = -1; // 0-TOUCH_ACTION_UP, 1-TOUCH_ACTION_DOWN, 2-TOUCH_ACTION_MOVE
bool gestureUpdate = false; // Flag to note gestures require to update
// Try to read data from the mouse/touch/gesture and only continue if successful // Try to read data from the mouse/touch/gesture and only continue if successful
while (read(fd, &event, sizeof(event)) == (int)sizeof(event)) while (read(fd, &event, sizeof(event)) == (int)sizeof(event))
@ -631,7 +630,6 @@ void PollInputEvents(void)
CORE.Input.Touch.position[0].x = CORE.Input.Mouse.currentPosition.x; CORE.Input.Touch.position[0].x = CORE.Input.Mouse.currentPosition.x;
touchAction = 2; // TOUCH_ACTION_MOVE touchAction = 2; // TOUCH_ACTION_MOVE
gestureUpdate = true;
} }
if (event.code == REL_Y) if (event.code == REL_Y)
@ -645,7 +643,6 @@ void PollInputEvents(void)
CORE.Input.Touch.position[0].y = CORE.Input.Mouse.currentPosition.y; CORE.Input.Touch.position[0].y = CORE.Input.Mouse.currentPosition.y;
touchAction = 2; // TOUCH_ACTION_MOVE touchAction = 2; // TOUCH_ACTION_MOVE
gestureUpdate = true;
} }
if (event.code == REL_WHEEL) platform.eventWheelMove.y += event.value; if (event.code == REL_WHEEL) platform.eventWheelMove.y += event.value;
@ -661,7 +658,6 @@ void PollInputEvents(void)
CORE.Input.Touch.position[0].x = (event.value - platform.absRange.x)*CORE.Window.screen.width/platform.absRange.width; // Scale according to absRange CORE.Input.Touch.position[0].x = (event.value - platform.absRange.x)*CORE.Window.screen.width/platform.absRange.width; // Scale according to absRange
touchAction = 2; // TOUCH_ACTION_MOVE touchAction = 2; // TOUCH_ACTION_MOVE
gestureUpdate = true;
} }
if (event.code == ABS_Y) if (event.code == ABS_Y)
@ -670,7 +666,6 @@ void PollInputEvents(void)
CORE.Input.Touch.position[0].y = (event.value - platform.absRange.y)*CORE.Window.screen.height/platform.absRange.height; // Scale according to absRange CORE.Input.Touch.position[0].y = (event.value - platform.absRange.y)*CORE.Window.screen.height/platform.absRange.height; // Scale according to absRange
touchAction = 2; // TOUCH_ACTION_MOVE touchAction = 2; // TOUCH_ACTION_MOVE
gestureUpdate = true;
} }
// Multitouch movement // Multitouch movement
@ -706,7 +701,6 @@ void PollInputEvents(void)
platform.currentButtonStateEvdev[MOUSE_BUTTON_LEFT] = 0; platform.currentButtonStateEvdev[MOUSE_BUTTON_LEFT] = 0;
touchAction = 0; // TOUCH_ACTION_UP touchAction = 0; // TOUCH_ACTION_UP
gestureUpdate = true;
} }
if (event.value && !previousMouseLeftButtonState) if (event.value && !previousMouseLeftButtonState)
@ -714,7 +708,6 @@ void PollInputEvents(void)
platform.currentButtonStateEvdev[MOUSE_BUTTON_LEFT] = 1; platform.currentButtonStateEvdev[MOUSE_BUTTON_LEFT] = 1;
touchAction = 1; // TOUCH_ACTION_DOWN touchAction = 1; // TOUCH_ACTION_DOWN
gestureUpdate = true;
} }
} }
@ -730,7 +723,6 @@ void PollInputEvents(void)
if (event.value > 0) touchAction = 1; // TOUCH_ACTION_DOWN if (event.value > 0) touchAction = 1; // TOUCH_ACTION_DOWN
else touchAction = 0; // TOUCH_ACTION_UP else touchAction = 0; // TOUCH_ACTION_UP
gestureUpdate = true;
} }
if (event.code == BTN_RIGHT) platform.currentButtonStateEvdev[MOUSE_BUTTON_RIGHT] = event.value; if (event.code == BTN_RIGHT) platform.currentButtonStateEvdev[MOUSE_BUTTON_RIGHT] = event.value;
@ -759,7 +751,7 @@ void PollInputEvents(void)
} }
#if defined(SUPPORT_GESTURES_SYSTEM) #if defined(SUPPORT_GESTURES_SYSTEM)
if (gestureUpdate) if (touchAction > -1)
{ {
GestureEvent gestureEvent = { 0 }; GestureEvent gestureEvent = { 0 };
@ -774,7 +766,7 @@ void PollInputEvents(void)
ProcessGestureEvent(gestureEvent); ProcessGestureEvent(gestureEvent);
gestureUpdate = false; touchAction = -1;
} }
#endif #endif
} }

View File

@ -211,7 +211,33 @@ void ToggleFullscreen(void)
// Toggle borderless windowed mode // Toggle borderless windowed mode
void ToggleBorderlessWindowed(void) void ToggleBorderlessWindowed(void)
{ {
TRACELOG(LOG_WARNING, "ToggleBorderlessWindowed() not available on target platform"); const bool wasFullscreen = EM_ASM_INT( { if (document.fullscreenElement) return 1; }, 0);
if (wasFullscreen)
{
EM_ASM(document.exitFullscreen(););
CORE.Window.fullscreen = false;
CORE.Window.flags &= ~FLAG_FULLSCREEN_MODE;
}
if (!IsWindowState(FLAG_BORDERLESS_WINDOWED_MODE))
{
// NOTE: 1. The setTimeouts handle the browser mode change delay
// 2. The style unset handles the possibility of a width="100%" like on the default shell.html file
EM_ASM(
setTimeout(function()
{
Module.requestFullscreen(true, true);
setTimeout(function()
{
canvas.style.width="unset";
}, 100);
}, 100);
);
CORE.Window.flags |= FLAG_BORDERLESS_WINDOWED_MODE;
}
else CORE.Window.flags &= ~FLAG_BORDERLESS_WINDOWED_MODE;
} }
// Set window state: maximized, if resizable // Set window state: maximized, if resizable
@ -235,13 +261,215 @@ void RestoreWindow(void)
// Set window configuration state using flags // Set window configuration state using flags
void SetWindowState(unsigned int flags) void SetWindowState(unsigned int flags)
{ {
TRACELOG(LOG_WARNING, "SetWindowState() not available on target platform"); // Check previous state and requested state to apply required changes
// NOTE: In most cases the functions already change the flags internally
// State change: FLAG_VSYNC_HINT
if ((flags & FLAG_VSYNC_HINT) > 0)
{
TRACELOG(LOG_WARNING, "SetWindowState(FLAG_VSYNC_HINT) not available on target platform");
}
// State change: FLAG_BORDERLESS_WINDOWED_MODE
if (((CORE.Window.flags & FLAG_BORDERLESS_WINDOWED_MODE) != (flags & FLAG_BORDERLESS_WINDOWED_MODE)) && ((flags & FLAG_BORDERLESS_WINDOWED_MODE) > 0))
{
ToggleBorderlessWindowed(); // NOTE: Window state flag updated inside function
}
// State change: FLAG_FULLSCREEN_MODE
if ((flags & FLAG_FULLSCREEN_MODE) > 0)
{
TRACELOG(LOG_WARNING, "SetWindowState(FLAG_FULLSCREEN_MODE) not available yet on target platform");
}
// State change: FLAG_WINDOW_RESIZABLE
if (((CORE.Window.flags & FLAG_WINDOW_RESIZABLE) != (flags & FLAG_WINDOW_RESIZABLE)) && ((flags & FLAG_WINDOW_RESIZABLE) > 0))
{
glfwSetWindowAttrib(platform.handle, GLFW_RESIZABLE, GLFW_TRUE);
CORE.Window.flags |= FLAG_WINDOW_RESIZABLE;
}
// State change: FLAG_WINDOW_UNDECORATED
if ((flags & FLAG_WINDOW_UNDECORATED) > 0)
{
TRACELOG(LOG_WARNING, "SetWindowState(FLAG_WINDOW_UNDECORATED) not available on target platform");
}
// State change: FLAG_WINDOW_HIDDEN
if ((flags & FLAG_WINDOW_HIDDEN) > 0)
{
TRACELOG(LOG_WARNING, "SetWindowState(FLAG_WINDOW_HIDDEN) not available on target platform");
}
// State change: FLAG_WINDOW_MINIMIZED
if ((flags & FLAG_WINDOW_MINIMIZED) > 0)
{
TRACELOG(LOG_WARNING, "SetWindowState(FLAG_WINDOW_MINIMIZED) not available on target platform");
}
// State change: FLAG_WINDOW_MAXIMIZED
if ((flags & FLAG_WINDOW_MAXIMIZED) > 0)
{
TRACELOG(LOG_WARNING, "SetWindowState(FLAG_WINDOW_MAXIMIZED) not available on target platform");
}
// State change: FLAG_WINDOW_UNFOCUSED
if ((flags & FLAG_WINDOW_UNFOCUSED) > 0)
{
TRACELOG(LOG_WARNING, "SetWindowState(FLAG_WINDOW_UNFOCUSED) not available on target platform");
}
// State change: FLAG_WINDOW_TOPMOST
if ((flags & FLAG_WINDOW_TOPMOST) > 0)
{
TRACELOG(LOG_WARNING, "SetWindowState(FLAG_WINDOW_TOPMOST) not available on target platform");
}
// State change: FLAG_WINDOW_ALWAYS_RUN
if ((flags & FLAG_WINDOW_ALWAYS_RUN) > 0)
{
TRACELOG(LOG_WARNING, "SetWindowState(FLAG_WINDOW_ALWAYS_RUN) not available on target platform");
}
// The following states can not be changed after window creation
// NOTE: Review for PLATFORM_WEB
// State change: FLAG_WINDOW_TRANSPARENT
if ((flags & FLAG_WINDOW_TRANSPARENT) > 0)
{
TRACELOG(LOG_WARNING, "SetWindowState(FLAG_WINDOW_TRANSPARENT) not available on target platform");
}
// State change: FLAG_WINDOW_HIGHDPI
if ((flags & FLAG_WINDOW_HIGHDPI) > 0)
{
TRACELOG(LOG_WARNING, "SetWindowState(FLAG_WINDOW_HIGHDPI) not available on target platform");
}
// State change: FLAG_WINDOW_MOUSE_PASSTHROUGH
if ((flags & FLAG_WINDOW_MOUSE_PASSTHROUGH) > 0)
{
TRACELOG(LOG_WARNING, "SetWindowState(FLAG_WINDOW_MOUSE_PASSTHROUGH) not available on target platform");
}
// State change: FLAG_MSAA_4X_HINT
if ((flags & FLAG_MSAA_4X_HINT) > 0)
{
TRACELOG(LOG_WARNING, "SetWindowState(FLAG_MSAA_4X_HINT) not available on target platform");
}
// State change: FLAG_INTERLACED_HINT
if ((flags & FLAG_INTERLACED_HINT) > 0)
{
TRACELOG(LOG_WARNING, "SetWindowState(FLAG_INTERLACED_HINT) not available on target platform");
}
} }
// Clear window configuration state flags // Clear window configuration state flags
void ClearWindowState(unsigned int flags) void ClearWindowState(unsigned int flags)
{ {
TRACELOG(LOG_WARNING, "ClearWindowState() not available on target platform"); // Check previous state and requested state to apply required changes
// NOTE: In most cases the functions already change the flags internally
// State change: FLAG_VSYNC_HINT
if ((flags & FLAG_VSYNC_HINT) > 0)
{
TRACELOG(LOG_WARNING, "ClearWindowState(FLAG_VSYNC_HINT) not available on target platform");
}
// State change: FLAG_BORDERLESS_WINDOWED_MODE
if (((CORE.Window.flags & FLAG_BORDERLESS_WINDOWED_MODE) > 0) && ((flags & FLAG_BORDERLESS_WINDOWED_MODE) > 0))
{
ToggleBorderlessWindowed(); // NOTE: Window state flag updated inside function
}
// State change: FLAG_FULLSCREEN_MODE
if ((flags & FLAG_FULLSCREEN_MODE) > 0)
{
TRACELOG(LOG_WARNING, "ClearWindowState(FLAG_FULLSCREEN_MODE) not available yet on target platform");
}
// State change: FLAG_WINDOW_RESIZABLE
if (((CORE.Window.flags & FLAG_WINDOW_RESIZABLE) > 0) && ((flags & FLAG_WINDOW_RESIZABLE) > 0))
{
glfwSetWindowAttrib(platform.handle, GLFW_RESIZABLE, GLFW_FALSE);
CORE.Window.flags &= ~FLAG_WINDOW_RESIZABLE;
}
// State change: FLAG_WINDOW_HIDDEN
if ((flags & FLAG_WINDOW_HIDDEN) > 0)
{
TRACELOG(LOG_WARNING, "ClearWindowState(FLAG_WINDOW_HIDDEN) not available on target platform");
}
// State change: FLAG_WINDOW_MINIMIZED
if ((flags & FLAG_WINDOW_MINIMIZED) > 0)
{
TRACELOG(LOG_WARNING, "ClearWindowState(FLAG_WINDOW_MINIMIZED) not available on target platform");
}
// State change: FLAG_WINDOW_MAXIMIZED
if ((flags & FLAG_WINDOW_MAXIMIZED) > 0)
{
TRACELOG(LOG_WARNING, "ClearWindowState(FLAG_WINDOW_MAXIMIZED) not available on target platform");
}
// State change: FLAG_WINDOW_UNDECORATED
if ((flags & FLAG_WINDOW_UNDECORATED) > 0)
{
TRACELOG(LOG_WARNING, "ClearWindowState(FLAG_WINDOW_UNDECORATED) not available on target platform");
}
// State change: FLAG_WINDOW_UNFOCUSED
if ((flags & FLAG_WINDOW_UNFOCUSED) > 0)
{
TRACELOG(LOG_WARNING, "ClearWindowState(FLAG_WINDOW_UNFOCUSED) not available on target platform");
}
// State change: FLAG_WINDOW_TOPMOST
if ((flags & FLAG_WINDOW_TOPMOST) > 0)
{
TRACELOG(LOG_WARNING, "ClearWindowState(FLAG_WINDOW_TOPMOST) not available on target platform");
}
// State change: FLAG_WINDOW_ALWAYS_RUN
if ((flags & FLAG_WINDOW_ALWAYS_RUN) > 0)
{
TRACELOG(LOG_WARNING, "ClearWindowState(FLAG_WINDOW_ALWAYS_RUN) not available on target platform");
}
// The following states can not be changed after window creation
// NOTE: Review for PLATFORM_WEB
// State change: FLAG_WINDOW_TRANSPARENT
if ((flags & FLAG_WINDOW_TRANSPARENT) > 0)
{
TRACELOG(LOG_WARNING, "ClearWindowState(FLAG_WINDOW_TRANSPARENT) not available on target platform");
}
// State change: FLAG_WINDOW_HIGHDPI
if ((flags & FLAG_WINDOW_HIGHDPI) > 0)
{
TRACELOG(LOG_WARNING, "ClearWindowState(FLAG_WINDOW_HIGHDPI) not available on target platform");
}
// State change: FLAG_WINDOW_MOUSE_PASSTHROUGH
if ((flags & FLAG_WINDOW_MOUSE_PASSTHROUGH) > 0)
{
TRACELOG(LOG_WARNING, "ClearWindowState(FLAG_WINDOW_MOUSE_PASSTHROUGH) not available on target platform");
}
// State change: FLAG_MSAA_4X_HINT
if ((flags & FLAG_MSAA_4X_HINT) > 0)
{
TRACELOG(LOG_WARNING, "ClearWindowState(FLAG_MSAA_4X_HINT) not available on target platform");
}
// State change: FLAG_INTERLACED_HINT
if ((flags & FLAG_INTERLACED_HINT) > 0)
{
TRACELOG(LOG_WARNING, "ClearWindowState(FLAG_INTERLACED_HINT) not available on target platform");
}
} }
// Set icon for window // Set icon for window

View File

@ -3706,7 +3706,7 @@ void ImageDraw(Image *dst, Image src, Rectangle srcRec, Rectangle dstRec, Color
// Draw text (default font) within an image (destination) // Draw text (default font) within an image (destination)
void ImageDrawText(Image *dst, const char *text, int posX, int posY, int fontSize, Color color) void ImageDrawText(Image *dst, const char *text, int posX, int posY, int fontSize, Color color)
{ {
#if defined(SUPPORT_MODULE_RTEXT) #if defined(SUPPORT_MODULE_RTEXT) && defined(SUPPORT_DEFAULT_FONT)
// Make sure default font is loaded to be used on image text drawing // Make sure default font is loaded to be used on image text drawing
if (GetFontDefault().texture.id == 0) LoadFontDefault(); if (GetFontDefault().texture.id == 0) LoadFontDefault();