|
@@ -319,7 +319,7 @@ void ToggleBorderlessWindowed(void)
|
|
// Set window state: maximized, if resizable
|
|
// Set window state: maximized, if resizable
|
|
void MaximizeWindow(void)
|
|
void MaximizeWindow(void)
|
|
{
|
|
{
|
|
- if (glfwGetWindowAttrib(platform.handle, GLFW_RESIZABLE) == GLFW_TRUE && !(CORE.Window.flags & FLAG_WINDOW_MAXIMIZED))
|
|
|
|
|
|
+ if ((glfwGetWindowAttrib(platform.handle, GLFW_RESIZABLE) == GLFW_TRUE) && !(CORE.Window.flags & FLAG_WINDOW_MAXIMIZED))
|
|
{
|
|
{
|
|
platform.unmaximizedWidth = CORE.Window.screen.width;
|
|
platform.unmaximizedWidth = CORE.Window.screen.width;
|
|
platform.unmaximizedHeight = CORE.Window.screen.height;
|
|
platform.unmaximizedHeight = CORE.Window.screen.height;
|
|
@@ -342,7 +342,7 @@ void MinimizeWindow(void)
|
|
// Set window state: not minimized/maximized
|
|
// Set window state: not minimized/maximized
|
|
void RestoreWindow(void)
|
|
void RestoreWindow(void)
|
|
{
|
|
{
|
|
- if (glfwGetWindowAttrib(platform.handle, GLFW_RESIZABLE) == GLFW_TRUE && (CORE.Window.flags & FLAG_WINDOW_MAXIMIZED))
|
|
|
|
|
|
+ if ((glfwGetWindowAttrib(platform.handle, GLFW_RESIZABLE) == GLFW_TRUE) && (CORE.Window.flags & FLAG_WINDOW_MAXIMIZED))
|
|
{
|
|
{
|
|
if (platform.unmaximizedWidth && platform.unmaximizedHeight) glfwSetWindowSize(platform.handle, platform.unmaximizedWidth, platform.unmaximizedHeight);
|
|
if (platform.unmaximizedWidth && platform.unmaximizedHeight) glfwSetWindowSize(platform.handle, platform.unmaximizedWidth, platform.unmaximizedHeight);
|
|
|
|
|
|
@@ -1664,10 +1664,10 @@ static EM_BOOL EmscriptenResizeCallback(int eventType, const EmscriptenUiEvent *
|
|
int height = EM_ASM_INT( return window.innerHeight; );
|
|
int height = EM_ASM_INT( return window.innerHeight; );
|
|
|
|
|
|
if (width < (int)CORE.Window.screenMin.width) width = CORE.Window.screenMin.width;
|
|
if (width < (int)CORE.Window.screenMin.width) width = CORE.Window.screenMin.width;
|
|
- else if (width > (int)CORE.Window.screenMax.width && CORE.Window.screenMax.width > 0) width = CORE.Window.screenMax.width;
|
|
|
|
|
|
+ else if ((width > (int)CORE.Window.screenMax.width) && (CORE.Window.screenMax.width > 0)) width = CORE.Window.screenMax.width;
|
|
|
|
|
|
if (height < (int)CORE.Window.screenMin.height) height = CORE.Window.screenMin.height;
|
|
if (height < (int)CORE.Window.screenMin.height) height = CORE.Window.screenMin.height;
|
|
- else if (height > (int)CORE.Window.screenMax.height && CORE.Window.screenMax.height > 0) height = CORE.Window.screenMax.height;
|
|
|
|
|
|
+ else if ((height > (int)CORE.Window.screenMax.height) && (CORE.Window.screenMax.height > 0)) height = CORE.Window.screenMax.height;
|
|
|
|
|
|
emscripten_set_canvas_element_size("#canvas", width, height);
|
|
emscripten_set_canvas_element_size("#canvas", width, height);
|
|
|
|
|
|
@@ -1722,7 +1722,7 @@ static EM_BOOL EmscriptenGamepadCallback(int eventType, const EmscriptenGamepadE
|
|
for (int i = 0; i < gamepadEvent->numButtons; ++i) TRACELOGD("Button %d: Digital: %d, Analog: %g", i, gamepadEvent->digitalButton[i], gamepadEvent->analogButton[i]);
|
|
for (int i = 0; i < gamepadEvent->numButtons; ++i) TRACELOGD("Button %d: Digital: %d, Analog: %g", i, gamepadEvent->digitalButton[i], gamepadEvent->analogButton[i]);
|
|
*/
|
|
*/
|
|
|
|
|
|
- if ((gamepadEvent->connected) && (gamepadEvent->index < MAX_GAMEPADS))
|
|
|
|
|
|
+ if (gamepadEvent->connected && (gamepadEvent->index < MAX_GAMEPADS))
|
|
{
|
|
{
|
|
CORE.Input.Gamepad.ready[gamepadEvent->index] = true;
|
|
CORE.Input.Gamepad.ready[gamepadEvent->index] = true;
|
|
sprintf(CORE.Input.Gamepad.name[gamepadEvent->index], "%s", gamepadEvent->id);
|
|
sprintf(CORE.Input.Gamepad.name[gamepadEvent->index], "%s", gamepadEvent->id);
|