mirror of
https://github.com/raysan5/raylib.git
synced 2025-09-05 19:08:13 +00:00
Fix windowMin/Max to screenMin/Max for android, drm, template (#3400)
This commit is contained in:
@@ -127,8 +127,6 @@ typedef struct CoreData {
|
|||||||
Point renderOffset; // Offset from render area (must be divided by 2)
|
Point renderOffset; // Offset from render area (must be divided by 2)
|
||||||
Size screenMin; // Screen minimum width and height (for resizable window)
|
Size screenMin; // Screen minimum width and height (for resizable window)
|
||||||
Size screenMax; // Screen maximum width and height (for resizable window)
|
Size screenMax; // Screen maximum width and height (for resizable window)
|
||||||
Size windowMin; // Window minimum width and height
|
|
||||||
Size windowMax; // Window maximum width and height
|
|
||||||
Matrix screenScale; // Matrix to scale screen (framebuffer rendering)
|
Matrix screenScale; // Matrix to scale screen (framebuffer rendering)
|
||||||
|
|
||||||
char **dropFilepaths; // Store dropped files paths pointers (provided by GLFW)
|
char **dropFilepaths; // Store dropped files paths pointers (provided by GLFW)
|
||||||
|
@@ -416,15 +416,15 @@ void SetWindowMonitor(int monitor)
|
|||||||
// Set window minimum dimensions (FLAG_WINDOW_RESIZABLE)
|
// Set window minimum dimensions (FLAG_WINDOW_RESIZABLE)
|
||||||
void SetWindowMinSize(int width, int height)
|
void SetWindowMinSize(int width, int height)
|
||||||
{
|
{
|
||||||
CORE.Window.windowMin.width = width;
|
CORE.Window.screenMin.width = width;
|
||||||
CORE.Window.windowMin.height = height;
|
CORE.Window.screenMin.height = height;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Set window maximum dimensions (FLAG_WINDOW_RESIZABLE)
|
// Set window maximum dimensions (FLAG_WINDOW_RESIZABLE)
|
||||||
void SetWindowMaxSize(int width, int height)
|
void SetWindowMaxSize(int width, int height)
|
||||||
{
|
{
|
||||||
CORE.Window.windowMax.width = width;
|
CORE.Window.screenMax.width = width;
|
||||||
CORE.Window.windowMax.height = height;
|
CORE.Window.screenMax.height = height;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Set window dimensions
|
// Set window dimensions
|
||||||
@@ -1198,7 +1198,7 @@ static int32_t AndroidInputCallback(struct android_app *app, AInputEvent *event)
|
|||||||
|
|
||||||
if (CORE.Input.Touch.pointCount > 0) CORE.Input.Touch.currentTouchState[MOUSE_BUTTON_LEFT] = 1;
|
if (CORE.Input.Touch.pointCount > 0) CORE.Input.Touch.currentTouchState[MOUSE_BUTTON_LEFT] = 1;
|
||||||
else CORE.Input.Touch.currentTouchState[MOUSE_BUTTON_LEFT] = 0;
|
else CORE.Input.Touch.currentTouchState[MOUSE_BUTTON_LEFT] = 0;
|
||||||
|
|
||||||
// Map touch[0] as mouse input for convenience
|
// Map touch[0] as mouse input for convenience
|
||||||
CORE.Input.Mouse.currentPosition = CORE.Input.Touch.position[0];
|
CORE.Input.Mouse.currentPosition = CORE.Input.Touch.position[0];
|
||||||
CORE.Input.Mouse.currentWheelMove = (Vector2){ 0.0f, 0.0f };
|
CORE.Input.Mouse.currentWheelMove = (Vector2){ 0.0f, 0.0f };
|
||||||
|
@@ -281,7 +281,7 @@ void InitWindow(int width, int height, const char *title)
|
|||||||
InitGamepad(); // Gamepad init
|
InitGamepad(); // Gamepad init
|
||||||
InitKeyboard(); // Keyboard init (stdin)
|
InitKeyboard(); // Keyboard init (stdin)
|
||||||
//--------------------------------------------------------------
|
//--------------------------------------------------------------
|
||||||
|
|
||||||
TRACELOG(LOG_INFO, "PLATFORM: DRM: Application initialized successfully");
|
TRACELOG(LOG_INFO, "PLATFORM: DRM: Application initialized successfully");
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -517,15 +517,15 @@ void SetWindowMonitor(int monitor)
|
|||||||
// Set window minimum dimensions (FLAG_WINDOW_RESIZABLE)
|
// Set window minimum dimensions (FLAG_WINDOW_RESIZABLE)
|
||||||
void SetWindowMinSize(int width, int height)
|
void SetWindowMinSize(int width, int height)
|
||||||
{
|
{
|
||||||
CORE.Window.windowMin.width = width;
|
CORE.Window.screenMin.width = width;
|
||||||
CORE.Window.windowMin.height = height;
|
CORE.Window.screenMin.height = height;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Set window maximum dimensions (FLAG_WINDOW_RESIZABLE)
|
// Set window maximum dimensions (FLAG_WINDOW_RESIZABLE)
|
||||||
void SetWindowMaxSize(int width, int height)
|
void SetWindowMaxSize(int width, int height)
|
||||||
{
|
{
|
||||||
CORE.Window.windowMax.width = width;
|
CORE.Window.screenMax.width = width;
|
||||||
CORE.Window.windowMax.height = height;
|
CORE.Window.screenMax.height = height;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Set window dimensions
|
// Set window dimensions
|
||||||
@@ -841,10 +841,10 @@ static bool InitGraphicsDevice(int width, int height)
|
|||||||
CORE.Window.screenScale = MatrixIdentity(); // No draw scaling required by default
|
CORE.Window.screenScale = MatrixIdentity(); // No draw scaling required by default
|
||||||
|
|
||||||
// Set the window minimum and maximum default values to 0
|
// Set the window minimum and maximum default values to 0
|
||||||
CORE.Window.windowMin.width = 0;
|
CORE.Window.screenMin.width = 0;
|
||||||
CORE.Window.windowMin.height = 0;
|
CORE.Window.screenMin.height = 0;
|
||||||
CORE.Window.windowMax.width = 0;
|
CORE.Window.screenMax.width = 0;
|
||||||
CORE.Window.windowMax.height = 0;
|
CORE.Window.screenMax.height = 0;
|
||||||
|
|
||||||
// NOTE: Framebuffer (render area - CORE.Window.render.width, CORE.Window.render.height) could include black bars...
|
// 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)
|
// ...in top-down or left-right to match display aspect ratio (no weird scaling)
|
||||||
|
@@ -141,7 +141,7 @@ void InitWindow(int width, int height, const char *title)
|
|||||||
|
|
||||||
// If graphic device is no properly initialized, we end program
|
// If graphic device is no properly initialized, we end program
|
||||||
if (!CORE.Window.ready) { TRACELOG(LOG_FATAL, "PLATFORM: Failed to initialize graphic device"); return; }
|
if (!CORE.Window.ready) { TRACELOG(LOG_FATAL, "PLATFORM: Failed to initialize graphic device"); return; }
|
||||||
|
|
||||||
// Initialize hi-res timer
|
// Initialize hi-res timer
|
||||||
InitTimer();
|
InitTimer();
|
||||||
|
|
||||||
@@ -150,7 +150,7 @@ void InitWindow(int width, int height, const char *title)
|
|||||||
|
|
||||||
// Initialize base path for storage
|
// Initialize base path for storage
|
||||||
CORE.Storage.basePath = GetWorkingDirectory();
|
CORE.Storage.basePath = GetWorkingDirectory();
|
||||||
|
|
||||||
#if defined(SUPPORT_MODULE_RTEXT) && defined(SUPPORT_DEFAULT_FONT)
|
#if defined(SUPPORT_MODULE_RTEXT) && defined(SUPPORT_DEFAULT_FONT)
|
||||||
// Load default font
|
// Load default font
|
||||||
// WARNING: External function: Module required: rtext
|
// WARNING: External function: Module required: rtext
|
||||||
@@ -344,15 +344,15 @@ void SetWindowMonitor(int monitor)
|
|||||||
// Set window minimum dimensions (FLAG_WINDOW_RESIZABLE)
|
// Set window minimum dimensions (FLAG_WINDOW_RESIZABLE)
|
||||||
void SetWindowMinSize(int width, int height)
|
void SetWindowMinSize(int width, int height)
|
||||||
{
|
{
|
||||||
CORE.Window.windowMin.width = width;
|
CORE.Window.screenMin.width = width;
|
||||||
CORE.Window.windowMin.height = height;
|
CORE.Window.screenMin.height = height;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Set window maximum dimensions (FLAG_WINDOW_RESIZABLE)
|
// Set window maximum dimensions (FLAG_WINDOW_RESIZABLE)
|
||||||
void SetWindowMaxSize(int width, int height)
|
void SetWindowMaxSize(int width, int height)
|
||||||
{
|
{
|
||||||
CORE.Window.windowMax.width = width;
|
CORE.Window.screenMax.width = width;
|
||||||
CORE.Window.windowMax.height = height;
|
CORE.Window.screenMax.height = height;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Set window dimensions
|
// Set window dimensions
|
||||||
|
Reference in New Issue
Block a user