Skip to content

Instantly share code, notes, and snippets.

@Alan-FGR
Created August 30, 2017 04:14
Show Gist options
  • Save Alan-FGR/3aa3152d00cd7aeab03babc0cf59f0ab to your computer and use it in GitHub Desktop.
Save Alan-FGR/3aa3152d00cd7aeab03babc0cf59f0ab to your computer and use it in GitHub Desktop.
Set hardware cursor in FNA
IntPtr surf = SDL2.SDL_image.IMG_Load("yourcursor.bmp"); // SDL_image supports most popular of formats
IntPtr cur = SDL2.SDL.SDL_CreateColorCursor(surf, 0, 0); // set hot spot (click pixel)
SDL2.SDL.SDL_SetCursor(cur); // actually sets the cursor
SDL2.SDL.SDL_ShowCursor(1); // just in case :P
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment