uxn

Varvara Ordinator, written in ANSI C(SDL2)
git clone https://git.eamoncaddigan.net/uxn.git
Log | Files | Refs | README | LICENSE

commit 2b1e7fe20fae1cf054d198daa6c057ce46f26bf3
parent 148dae4ebd37e9936bb4a2aec867383455b9f432
Author: Sigrid Solveig Haflínudóttir <ftrvxmtrx@gmail.com>
Date:   Wed, 29 Dec 2021 18:47:54 +0100

emu: use SDL_BUTTON macro to get bitmask from a mouse button event

Diffstat:
Msrc/uxnemu.c | 4++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/uxnemu.c b/src/uxnemu.c @@ -451,9 +451,9 @@ run(Uxn *u) clamp(event.motion.x - PAD, 0, uxn_screen.width - 1), clamp(event.motion.y - PAD, 0, uxn_screen.height - 1)); else if(event.type == SDL_MOUSEBUTTONUP) - mouse_up(devmouse, 0x1 << (event.button.button - 1)); + mouse_up(devmouse, SDL_BUTTON(event.button.button)); else if(event.type == SDL_MOUSEBUTTONDOWN) - mouse_down(devmouse, 0x1 << (event.button.button - 1)); + mouse_down(devmouse, SDL_BUTTON(event.button.button)); else if(event.type == SDL_MOUSEWHEEL) mouse_scroll(devmouse, event.wheel.x, event.wheel.y); /* Controller */