Reduce the difference of glfw to upstream

This commit is contained in:
Luflosi 2019-07-18 20:21:07 +02:00
parent 14fb7c3201
commit b8d2b76ee4
No known key found for this signature in database
GPG Key ID: 14140F703B7D8362
3 changed files with 10 additions and 14 deletions

View File

@ -715,11 +715,10 @@ static GLFWapplicationshouldhandlereopenfun handle_reopen_callback = NULL;
- (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 @@ static GLFWapplicationshouldhandlereopenfun handle_reopen_callback = NULL;
- (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
View File

@ -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
View File

@ -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();
}