Skip to content

[core] Problem with IsMouseButtonUp which always returns true #3606

@Bigfoot71

Description

@Bigfoot71

Issue description

I noticed that the IsMouseButtonUp function always returns true with PLATFORM_DESKTOP on the master branch (984e83c).

Environment

Linux Mint 21.2, 64-bit, Cinnamon

Code Example

#include "raylib.h"

int main(void)
{
    InitWindow(800, 450, "Button up test");

    while (!WindowShouldClose())
    {
        BeginDrawing();
        ClearBackground(WHITE);

        if (IsMouseButtonUp(MOUSE_LEFT_BUTTON))
        {
            DrawText("Button is UP", 10, 10, 20, BLACK);
        }
        else
        {
            DrawText("Button is DOWN", 10, 10, 20, BLACK);
        }

        EndDrawing();
    }

    CloseWindow();

    return 0;
}

Edit: Note that doing if (!IsMouseButtonDown(MOUSE_BUTTON_LEFT)) works for me

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions