Reduce the difference of glfw to upstream
This commit is contained in:
parent
14fb7c3201
commit
b8d2b76ee4
3 changed files with 10 additions and 14 deletions
|
|
@ -715,11 +715,10 @@ - (BOOL)acceptsFirstMouse:(NSEvent *)event
|
|||
- (void)mouseDown:(NSEvent *)event
|
||||
{
|
||||
if (!window) return;
|
||||
_glfwInputMouseClick(
|
||||
window,
|
||||
GLFW_MOUSE_BUTTON_LEFT,
|
||||
GLFW_PRESS,
|
||||
translateFlags([event modifierFlags]));
|
||||
_glfwInputMouseClick(window,
|
||||
GLFW_MOUSE_BUTTON_LEFT,
|
||||
GLFW_PRESS,
|
||||
translateFlags([event modifierFlags]));
|
||||
}
|
||||
|
||||
- (void)mouseDragged:(NSEvent *)event
|
||||
|
|
@ -730,11 +729,10 @@ - (void)mouseDragged:(NSEvent *)event
|
|||
- (void)mouseUp:(NSEvent *)event
|
||||
{
|
||||
if (!window) return;
|
||||
_glfwInputMouseClick(
|
||||
window,
|
||||
GLFW_MOUSE_BUTTON_LEFT,
|
||||
GLFW_RELEASE,
|
||||
translateFlags([event modifierFlags]));
|
||||
_glfwInputMouseClick(window,
|
||||
GLFW_MOUSE_BUTTON_LEFT,
|
||||
GLFW_RELEASE,
|
||||
translateFlags([event modifierFlags]));
|
||||
}
|
||||
|
||||
- (void)mouseMoved:(NSEvent *)event
|
||||
|
|
|
|||
4
glfw/input.c
vendored
4
glfw/input.c
vendored
|
|
@ -256,7 +256,7 @@ static bool parseMapping(_GLFWmapping* mapping, const char* string)
|
|||
////// GLFW event API //////
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
|
||||
// Notifies shared code of a key event
|
||||
// Notifies shared code of a physical key event
|
||||
//
|
||||
void _glfwInputKeyboard(_GLFWwindow* window, int key, int scancode, int action, int mods, const char* text, int state)
|
||||
{
|
||||
|
|
@ -568,7 +568,7 @@ const char* _glfwGetKeyName(int key)
|
|||
}
|
||||
}
|
||||
|
||||
// Center the cursor in the middle of the content area of the specified window
|
||||
// Center the cursor in the content area of the specified window
|
||||
//
|
||||
void _glfwCenterCursorInContentArea(_GLFWwindow* window)
|
||||
{
|
||||
|
|
|
|||
2
glfw/window.c
vendored
2
glfw/window.c
vendored
|
|
@ -183,7 +183,6 @@ void _glfwInputWindowMonitor(_GLFWwindow* window, _GLFWmonitor* monitor)
|
|||
window->monitor = monitor;
|
||||
}
|
||||
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
////// GLFW public API //////
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
|
|
@ -1167,6 +1166,5 @@ GLFWAPI GLFWwindowcontentscalefun glfwSetWindowContentScaleCallback(GLFWwindow*
|
|||
GLFWAPI void glfwPostEmptyEvent(void)
|
||||
{
|
||||
_GLFW_REQUIRE_INIT();
|
||||
|
||||
_glfwPlatformPostEmptyEvent();
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue