#include <9pm/windows.h>
#include <9pm/u.h>
#include <9pm/libc.h>

HCURSOR WINAPI
LoadCursor(HINSTANCE hInstance, LPCWSTR lpCursorName)
{
	char *name;
	HCURSOR h;

	if(win_useunicode)
		return LoadCursorW(hInstance, lpCursorName);
	if((int)lpCursorName < (1<<16)) {
		/* probably not a string */
		return LoadCursorA(hInstance, (char*)lpCursorName);
	}

	name = win_wstr2utf(lpCursorName);
	h = LoadCursorA(hInstance, name);
	win_free(name);
	return h;
}
