mirror of
https://github.com/raysan5/raylib.git
synced 2026-04-10 01:09:10 -04:00
required change for ESP-IDF 6 (#5674)
This commit is contained in:
10
src/external/rlsw.h
vendored
10
src/external/rlsw.h
vendored
@ -689,6 +689,7 @@ SWAPI void swClear(uint32_t bitmask);
|
|||||||
SWAPI void swBlendFunc(SWfactor sfactor, SWfactor dfactor);
|
SWAPI void swBlendFunc(SWfactor sfactor, SWfactor dfactor);
|
||||||
SWAPI void swPolygonMode(SWpoly mode);
|
SWAPI void swPolygonMode(SWpoly mode);
|
||||||
SWAPI void swCullFace(SWface face);
|
SWAPI void swCullFace(SWface face);
|
||||||
|
SWAPI void *swGetColorBuffer(int *width, int *height); // Restored for ESP-IDF compatibility
|
||||||
|
|
||||||
SWAPI void swPointSize(float size);
|
SWAPI void swPointSize(float size);
|
||||||
SWAPI void swLineWidth(float width);
|
SWAPI void swLineWidth(float width);
|
||||||
@ -4200,6 +4201,15 @@ void swCullFace(SWface face)
|
|||||||
RLSW.cullFace = face;
|
RLSW.cullFace = face;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Get direct pointer to the default framebuffer's pixel data
|
||||||
|
// Restored for ESP-IDF compatibility - removed in Raylib 6.0 PR #5655
|
||||||
|
void *swGetColorBuffer(int *width, int *height)
|
||||||
|
{
|
||||||
|
if (width) *width = RLSW.colorBuffer->width;
|
||||||
|
if (height) *height = RLSW.colorBuffer->height;
|
||||||
|
return RLSW.colorBuffer->pixels;
|
||||||
|
}
|
||||||
|
|
||||||
void swPointSize(float size)
|
void swPointSize(float size)
|
||||||
{
|
{
|
||||||
RLSW.pointRadius = floorf(size*0.5f);
|
RLSW.pointRadius = floorf(size*0.5f);
|
||||||
|
|||||||
12
src/rcore.c
12
src/rcore.c
@ -682,6 +682,18 @@ void InitWindow(int width, int height, const char *title)
|
|||||||
TRACELOG(LOG_WARNING, "SYSTEM: Failed to initialize platform");
|
TRACELOG(LOG_WARNING, "SYSTEM: Failed to initialize platform");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// FIX: Initialize render dimensions for embedded platforms
|
||||||
|
// On desktop platforms (GLFW, SDL, etc.), CORE.Window.render.width/height are
|
||||||
|
// set during window creation. On embedded platforms with no window manager,
|
||||||
|
// InitPlatform() doesn't set these values, so we initialize them here from
|
||||||
|
// the screen dimensions (which are set from the InitWindow parameters).
|
||||||
|
// This fix is required for embedded platforms.
|
||||||
|
if (CORE.Window.render.width == 0 || CORE.Window.render.height == 0)
|
||||||
|
{
|
||||||
|
CORE.Window.render.width = CORE.Window.screen.width;
|
||||||
|
CORE.Window.render.height = CORE.Window.screen.height;
|
||||||
|
}
|
||||||
//--------------------------------------------------------------
|
//--------------------------------------------------------------
|
||||||
|
|
||||||
// Initialize rlgl default data (buffers and shaders)
|
// Initialize rlgl default data (buffers and shaders)
|
||||||
|
|||||||
Reference in New Issue
Block a user