mirror of
https://github.com/glfw/glfw.git
synced 2024-11-26 12:02:00 +00:00
commit
e9694cca47
@ -97,8 +97,8 @@ static GLboolean modeIsGood(CGDisplayModeRef mode)
|
|||||||
static GLFWvidmode vidmodeFromCGDisplayMode(CGDisplayModeRef mode)
|
static GLFWvidmode vidmodeFromCGDisplayMode(CGDisplayModeRef mode)
|
||||||
{
|
{
|
||||||
GLFWvidmode result;
|
GLFWvidmode result;
|
||||||
result.width = CGDisplayModeGetWidth(mode);
|
result.width = (int) CGDisplayModeGetWidth(mode);
|
||||||
result.height = CGDisplayModeGetHeight(mode);
|
result.height = (int) CGDisplayModeGetHeight(mode);
|
||||||
result.refreshRate = (int) CGDisplayModeGetRefreshRate(mode);
|
result.refreshRate = (int) CGDisplayModeGetRefreshRate(mode);
|
||||||
|
|
||||||
CFStringRef format = CGDisplayModeCopyPixelEncoding(mode);
|
CFStringRef format = CGDisplayModeCopyPixelEncoding(mode);
|
||||||
|
@ -519,7 +519,7 @@ static int translateKey(unsigned int key)
|
|||||||
- (void)otherMouseDown:(NSEvent *)event
|
- (void)otherMouseDown:(NSEvent *)event
|
||||||
{
|
{
|
||||||
_glfwInputMouseClick(window,
|
_glfwInputMouseClick(window,
|
||||||
[event buttonNumber],
|
(int) [event buttonNumber],
|
||||||
GLFW_PRESS,
|
GLFW_PRESS,
|
||||||
translateFlags([event modifierFlags]));
|
translateFlags([event modifierFlags]));
|
||||||
}
|
}
|
||||||
@ -532,7 +532,7 @@ static int translateKey(unsigned int key)
|
|||||||
- (void)otherMouseUp:(NSEvent *)event
|
- (void)otherMouseUp:(NSEvent *)event
|
||||||
{
|
{
|
||||||
_glfwInputMouseClick(window,
|
_glfwInputMouseClick(window,
|
||||||
[event buttonNumber],
|
(int) [event buttonNumber],
|
||||||
GLFW_RELEASE,
|
GLFW_RELEASE,
|
||||||
translateFlags([event modifierFlags]));
|
translateFlags([event modifierFlags]));
|
||||||
}
|
}
|
||||||
@ -783,7 +783,8 @@ static void createMenuBar(void)
|
|||||||
|
|
||||||
// Prior to Snow Leopard, we need to use this oddly-named semi-private API
|
// Prior to Snow Leopard, we need to use this oddly-named semi-private API
|
||||||
// to get the application menu working properly.
|
// to get the application menu working properly.
|
||||||
[NSApp performSelector:@selector(setAppleMenu:) withObject:appMenu];
|
SEL setAppleMenuSelector = NSSelectorFromString(@"setAppleMenu:");
|
||||||
|
[NSApp performSelector:setAppleMenuSelector withObject:appMenu];
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif /* _GLFW_USE_MENUBAR */
|
#endif /* _GLFW_USE_MENUBAR */
|
||||||
|
Loading…
Reference in New Issue
Block a user