mirror of
https://github.com/glfw/glfw.git
synced 2024-11-22 13:04:35 +00:00
Cleanup
This commit is contained in:
parent
79eaf49ec0
commit
ce8fe645f4
@ -50,29 +50,6 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
// Returns the specified standard cursor
|
|
||||||
//
|
|
||||||
static NSCursor* getStandardCursor(int shape)
|
|
||||||
{
|
|
||||||
switch (shape)
|
|
||||||
{
|
|
||||||
case GLFW_ARROW_CURSOR:
|
|
||||||
return [NSCursor arrowCursor];
|
|
||||||
case GLFW_IBEAM_CURSOR:
|
|
||||||
return [NSCursor IBeamCursor];
|
|
||||||
case GLFW_CROSSHAIR_CURSOR:
|
|
||||||
return [NSCursor crosshairCursor];
|
|
||||||
case GLFW_HAND_CURSOR:
|
|
||||||
return [NSCursor pointingHandCursor];
|
|
||||||
case GLFW_HRESIZE_CURSOR:
|
|
||||||
return [NSCursor resizeLeftRightCursor];
|
|
||||||
case GLFW_VRESIZE_CURSOR:
|
|
||||||
return [NSCursor resizeUpDownCursor];
|
|
||||||
}
|
|
||||||
|
|
||||||
return nil;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Returns the style mask corresponding to the window settings
|
// Returns the style mask corresponding to the window settings
|
||||||
//
|
//
|
||||||
static NSUInteger getStyleMask(_GLFWwindow* window)
|
static NSUInteger getStyleMask(_GLFWwindow* window)
|
||||||
@ -1635,7 +1612,19 @@ int _glfwPlatformCreateStandardCursor(_GLFWcursor* cursor, int shape)
|
|||||||
if (!initializeAppKit())
|
if (!initializeAppKit())
|
||||||
return GLFW_FALSE;
|
return GLFW_FALSE;
|
||||||
|
|
||||||
cursor->ns.object = getStandardCursor(shape);
|
if (shape == GLFW_ARROW_CURSOR)
|
||||||
|
cursor->ns.object = [NSCursor arrowCursor];
|
||||||
|
else if (shape == GLFW_IBEAM_CURSOR)
|
||||||
|
cursor->ns.object = [NSCursor IBeamCursor];
|
||||||
|
else if (shape == GLFW_CROSSHAIR_CURSOR)
|
||||||
|
cursor->ns.object = [NSCursor crosshairCursor];
|
||||||
|
else if (shape == GLFW_HAND_CURSOR)
|
||||||
|
cursor->ns.object = [NSCursor pointingHandCursor];
|
||||||
|
else if (shape == GLFW_HRESIZE_CURSOR)
|
||||||
|
cursor->ns.object = [NSCursor resizeLeftRightCursor];
|
||||||
|
else if (shape == GLFW_VRESIZE_CURSOR)
|
||||||
|
cursor->ns.object = [NSCursor resizeUpDownCursor];
|
||||||
|
|
||||||
if (!cursor->ns.object)
|
if (!cursor->ns.object)
|
||||||
{
|
{
|
||||||
_glfwInputError(GLFW_PLATFORM_ERROR,
|
_glfwInputError(GLFW_PLATFORM_ERROR,
|
||||||
|
Loading…
Reference in New Issue
Block a user