fwcd / antimicro Goto Github PK
View Code? Open in Web Editor NEWThis project forked from ymmtmdk/antimicro
Graphical program used to map keyboard buttons and mouse controls to a gamepad. Useful for playing games with no gamepad support
This project forked from ymmtmdk/antimicro
Graphical program used to map keyboard buttons and mouse controls to a gamepad. Useful for playing games with no gamepad support
I'm trying to build the project(after doing brew install qt sdl2
), but getting:
[ 17%] Building CXX object CMakeFiles/antimicro.dir/src/main.cpp.o
In file included from /Users/anton/tmp/antimicro-macos-cursor-fix/src/main.cpp:54:
/Users/anton/tmp/antimicro-macos-cursor-fix/src/inputdevice.h:28:10: fatal error: 'SDL2/SDL_joystick.h' file not found
#include <SDL2/SDL_joystick.h>
^~~~~~~~~~~~~~~~~~~~~
1 error generated.
make[2]: *** [CMakeFiles/antimicro.dir/src/main.cpp.o] Error 1
make[1]: *** [CMakeFiles/antimicro.dir/all] Error 2
make: *** [all] Error 2
Currently, to generate native mouse events, both the new position and the delta offset are assigned to a CGEvent:
antimicro/src/eventhandlers/cocoaeventhandler.mm
Lines 84 to 85 in 152f6e8
antimicro/src/eventhandlers/cocoaeventhandler.mm
Lines 93 to 94 in 152f6e8
Although the OS mouse pointer seems to respond to the absolute position, some OpenGL games (such as Minecraft) "capture" the mouse inside the window and apparently ignore the position vector. These, however, only process the delta offset, which results in the mouse pointer invisibly moving "below" the game window. This is problematic, because as soon as the user starts clicking (while the game is focused), the mouse pointer unexpectedly jumps outside of the game window to the location where the actual pointer has moved to.
The two "obvious" fixes to this problem each have their own issues:
Remove this first code snippet. The mouse pointer will work fine inside the game, but not move at all outside of it.
Remove the second code snippet. The mouse pointer will work fine on the desktop, but not move at all inside the game.
As the Quartz API does not seem to provide any lower-level support for mouse events, the best option might be to include a GUI checkbox under the mouse settings that allows the user to enable/disable this behavior if desired. This would, however, require a change to the event handling mechanism in order to deal with platform-specific settings.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.