Skip to content

Instantly share code, notes, and snippets.

View dzikoysk's full-sized avatar
🖤
ฅ^•ﻌ•^ฅ

dzikoysk

🖤
ฅ^•ﻌ•^ฅ
View GitHub Profile
@dzikoysk
dzikoysk / Lwjgl3CatchCursorAdapter.java
Last active September 8, 2020 11:51
Clip hardware cursor on Windows using libGDX with LWJGL3 backend, otherwise catch cursor with a standard API
import com.badlogic.gdx.ApplicationAdapter;
import com.badlogic.gdx.ApplicationListener;
import com.badlogic.gdx.Gdx;
import com.badlogic.gdx.backends.lwjgl3.Lwjgl3Application;
import com.badlogic.gdx.backends.lwjgl3.Lwjgl3Window;
import com.badlogic.gdx.utils.Array;
import com.sun.jna.Native;
import com.sun.jna.Pointer;
import com.sun.jna.platform.win32.User32;
import com.sun.jna.platform.win32.WinDef.HWND;
@dzikoysk
dzikoysk / Lwjgl2CatchCursorAdapter.java
Last active September 8, 2020 11:43
Clip hardware cursor on Windows using libGDX with LWJGL2 backend, otherwise catch cursor with a standard API
import com.badlogic.gdx.ApplicationAdapter;
import com.badlogic.gdx.ApplicationListener;
import com.badlogic.gdx.Gdx;
import org.lwjgl.LWJGLUtil;
import org.lwjgl.opengl.Display;
import org.panda_lang.utilities.commons.function.Lazy;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;

Keybase proof

I hereby claim:

  • I am dzikoysk on github.
  • I am dzikoysk (https://keybase.io/dzikoysk) on keybase.
  • I have a public key ASBPOv1olXSLRFQeaQFWT1KE_cws6S17T4S5CadUzUyRKAo

To claim this, I am signing this object: