mirror of
https://github.com/raysan5/raylib.git
synced 2025-10-15 14:26:03 +00:00
[split] rcore
, rcore_web
and rcore_desktop
changes (batch 2) (#3334)
* Fix formatting * Reapply commit9d230d7
(#3305) that was missing * Reapplies commits719365f
(#3309) and8a1779b
(#3312) that were missing * Reapply commit5c9cc3f
(#3323) that was missing * Reapply commita2b3b1e
that was missing * Revert commitcef25c6
to fix macro redefined warning * Move rcore.h #include to after config.h to fix macro redefinitions warnings
This commit is contained in:
@@ -189,11 +189,11 @@ static bool InitGraphicsDevice(int width, int height)
|
||||
CORE.Window.screen.height = height; // User desired height
|
||||
CORE.Window.screenScale = MatrixIdentity(); // No draw scaling required by default
|
||||
|
||||
// Set the window minimum and maximum default values to 0
|
||||
CORE.Window.windowMin.width = 0;
|
||||
CORE.Window.windowMin.height = 0;
|
||||
CORE.Window.windowMax.width = 0;
|
||||
CORE.Window.windowMax.height = 0;
|
||||
// Set the screen minimum and maximum default values to 0
|
||||
CORE.Window.screenMin.width = 0;
|
||||
CORE.Window.screenMin.height = 0;
|
||||
CORE.Window.screenMax.width = 0;
|
||||
CORE.Window.screenMax.height = 0;
|
||||
|
||||
// NOTE: Framebuffer (render area - CORE.Window.render.width, CORE.Window.render.height) could include black bars...
|
||||
// ...in top-down or left-right to match display aspect ratio (no weird scaling)
|
||||
@@ -1093,24 +1093,24 @@ void SetWindowMonitor(int monitor)
|
||||
// Set window minimum dimensions (FLAG_WINDOW_RESIZABLE)
|
||||
void SetWindowMinSize(int width, int height)
|
||||
{
|
||||
CORE.Window.windowMin.width = width;
|
||||
CORE.Window.windowMin.height = height;
|
||||
int minWidth = (CORE.Window.windowMin.width == 0) ? GLFW_DONT_CARE : CORE.Window.windowMin.width;
|
||||
int minHeight = (CORE.Window.windowMin.height == 0) ? GLFW_DONT_CARE : CORE.Window.windowMin.height;
|
||||
int maxWidth = (CORE.Window.windowMax.width == 0) ? GLFW_DONT_CARE : CORE.Window.windowMax.width;
|
||||
int maxHeight = (CORE.Window.windowMax.height == 0) ? GLFW_DONT_CARE : CORE.Window.windowMax.height;
|
||||
CORE.Window.screenMin.width = width;
|
||||
CORE.Window.screenMin.height = height;
|
||||
int minWidth = (CORE.Window.screenMin.width == 0) ? GLFW_DONT_CARE : CORE.Window.screenMin.width;
|
||||
int minHeight = (CORE.Window.screenMin.height == 0) ? GLFW_DONT_CARE : CORE.Window.screenMin.height;
|
||||
int maxWidth = (CORE.Window.screenMax.width == 0) ? GLFW_DONT_CARE : CORE.Window.screenMax.width;
|
||||
int maxHeight = (CORE.Window.screenMax.height == 0) ? GLFW_DONT_CARE : CORE.Window.screenMax.height;
|
||||
glfwSetWindowSizeLimits(CORE.Window.handle, minWidth, minHeight, maxWidth, maxHeight);
|
||||
}
|
||||
|
||||
// Set window maximum dimensions (FLAG_WINDOW_RESIZABLE)
|
||||
void SetWindowMaxSize(int width, int height)
|
||||
{
|
||||
CORE.Window.windowMax.width = width;
|
||||
CORE.Window.windowMax.height = height;
|
||||
int minWidth = (CORE.Window.windowMin.width == 0) ? GLFW_DONT_CARE : CORE.Window.windowMin.width;
|
||||
int minHeight = (CORE.Window.windowMin.height == 0) ? GLFW_DONT_CARE : CORE.Window.windowMin.height;
|
||||
int maxWidth = (CORE.Window.windowMax.width == 0) ? GLFW_DONT_CARE : CORE.Window.windowMax.width;
|
||||
int maxHeight = (CORE.Window.windowMax.height == 0) ? GLFW_DONT_CARE : CORE.Window.windowMax.height;
|
||||
CORE.Window.screenMax.width = width;
|
||||
CORE.Window.screenMax.height = height;
|
||||
int minWidth = (CORE.Window.screenMin.width == 0) ? GLFW_DONT_CARE : CORE.Window.screenMin.width;
|
||||
int minHeight = (CORE.Window.screenMin.height == 0) ? GLFW_DONT_CARE : CORE.Window.screenMin.height;
|
||||
int maxWidth = (CORE.Window.screenMax.width == 0) ? GLFW_DONT_CARE : CORE.Window.screenMax.width;
|
||||
int maxHeight = (CORE.Window.screenMax.height == 0) ? GLFW_DONT_CARE : CORE.Window.screenMax.height;
|
||||
glfwSetWindowSizeLimits(CORE.Window.handle, minWidth, minHeight, maxWidth, maxHeight);
|
||||
}
|
||||
|
||||
@@ -1715,4 +1715,4 @@ void PollInputEvents(void)
|
||||
|
||||
if (CORE.Window.eventWaiting) glfwWaitEvents(); // Wait for in input events before continue (drawing is paused)
|
||||
else glfwPollEvents(); // Poll input events: keyboard/mouse/window events (callbacks)
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user