mirror of
https://github.com/glfw/glfw.git
synced 2024-11-22 21:14:35 +00:00
parent
90e22947c6
commit
cf79f06257
@ -61,6 +61,9 @@
|
|||||||
// GLFW uses DirectInput8 interfaces
|
// GLFW uses DirectInput8 interfaces
|
||||||
#define DIRECTINPUT_VERSION 0x0800
|
#define DIRECTINPUT_VERSION 0x0800
|
||||||
|
|
||||||
|
// Enable standard cursors images defines
|
||||||
|
#define OEMRESOURCE
|
||||||
|
|
||||||
#include <wctype.h>
|
#include <wctype.h>
|
||||||
#include <windows.h>
|
#include <windows.h>
|
||||||
#include <dinput.h>
|
#include <dinput.h>
|
||||||
|
@ -1999,24 +1999,25 @@ int _glfwPlatformCreateCursor(_GLFWcursor* cursor,
|
|||||||
|
|
||||||
int _glfwPlatformCreateStandardCursor(_GLFWcursor* cursor, int shape)
|
int _glfwPlatformCreateStandardCursor(_GLFWcursor* cursor, int shape)
|
||||||
{
|
{
|
||||||
LPCWSTR name = NULL;
|
int id = 0;
|
||||||
|
|
||||||
if (shape == GLFW_ARROW_CURSOR)
|
if (shape == GLFW_ARROW_CURSOR)
|
||||||
name = IDC_ARROW;
|
id = OCR_NORMAL;
|
||||||
else if (shape == GLFW_IBEAM_CURSOR)
|
else if (shape == GLFW_IBEAM_CURSOR)
|
||||||
name = IDC_IBEAM;
|
id = OCR_IBEAM;
|
||||||
else if (shape == GLFW_CROSSHAIR_CURSOR)
|
else if (shape == GLFW_CROSSHAIR_CURSOR)
|
||||||
name = IDC_CROSS;
|
id = OCR_CROSS;
|
||||||
else if (shape == GLFW_HAND_CURSOR)
|
else if (shape == GLFW_HAND_CURSOR)
|
||||||
name = IDC_HAND;
|
id = OCR_HAND;
|
||||||
else if (shape == GLFW_HRESIZE_CURSOR)
|
else if (shape == GLFW_HRESIZE_CURSOR)
|
||||||
name = IDC_SIZEWE;
|
id = OCR_SIZEWE;
|
||||||
else if (shape == GLFW_VRESIZE_CURSOR)
|
else if (shape == GLFW_VRESIZE_CURSOR)
|
||||||
name = IDC_SIZENS;
|
id = OCR_SIZENS;
|
||||||
else
|
else
|
||||||
return GLFW_FALSE;
|
return GLFW_FALSE;
|
||||||
|
|
||||||
cursor->win32.handle = CopyCursor(LoadCursorW(NULL, name));
|
cursor->win32.handle =
|
||||||
|
(HCURSOR)LoadImage(NULL, MAKEINTRESOURCE(id), IMAGE_CURSOR, 0, 0, LR_DEFAULTSIZE | LR_SHARED);
|
||||||
if (!cursor->win32.handle)
|
if (!cursor->win32.handle)
|
||||||
{
|
{
|
||||||
_glfwInputErrorWin32(GLFW_PLATFORM_ERROR,
|
_glfwInputErrorWin32(GLFW_PLATFORM_ERROR,
|
||||||
|
Loading…
Reference in New Issue
Block a user