1kc / librazermacos

GNU General Public License v2.0
18 stars 47 forks source link

Generate code from `openrazer` #4

Open edualm opened 3 years ago

edualm commented 3 years ago

I've had a go at automatically converting the code from the openrazer code to macOS calls. I think it would be too finicky honestly.

The only reasonable way I see now of automatically using openrazer's code on macOS would be to make the driver itself platform-agnostic which would require upstream changes.

@1kc Do you think this is something we should propose and invest time into, or should we just continue porting changes from openrazer manually? I can create a spike to show the openrazer maintainers a possible way of doing it.

hacker1024 commented 3 years ago

I think this would be a worthwhile thing - it would make resolving issues like #3 effortless, as well as make it easier to port openrazer to other platforms (I've been considering Android).

hacker1024 commented 3 years ago

This may be a useful reference for a wrapper approach: https://github.com/CalcProgrammer1/openrazer-win32

edualm commented 3 years ago

That's indeed an interesting approach, a shim. Hmm.

WrathofthePast commented 2 years ago

I have an idea. razerchromacommon.h & razerchromacommon.c are shared between razer-macos and openrazer without modification. We should make those into dependencies. As an added bonus, this will partially resolve #6.