Removed additional code
GLFW has been updated to latest version, probably this code is not required any more due to already been integrated into library... but it needs to be tested...
This commit is contained in:
parent
3b4a64f2d6
commit
85850a955a
1 changed files with 2 additions and 17 deletions
15
src/core.c
15
src/core.c
|
@ -752,12 +752,8 @@ int GetScreenHeight(void)
|
|||
void ShowCursor()
|
||||
{
|
||||
#if defined(PLATFORM_DESKTOP)
|
||||
#if defined(__linux__) && defined(_GLFW_X11)
|
||||
XUndefineCursor(glfwGetX11Display(), glfwGetX11Window(window));
|
||||
#else
|
||||
glfwSetInputMode(window, GLFW_CURSOR, GLFW_CURSOR_NORMAL);
|
||||
#endif
|
||||
#endif
|
||||
cursorHidden = false;
|
||||
}
|
||||
|
||||
|
@ -765,19 +761,8 @@ void ShowCursor()
|
|||
void HideCursor()
|
||||
{
|
||||
#if defined(PLATFORM_DESKTOP)
|
||||
#if defined(__linux__) && defined(_GLFW_X11)
|
||||
XColor col;
|
||||
const char nil[] = {0};
|
||||
|
||||
Pixmap pix = XCreateBitmapFromData(glfwGetX11Display(), glfwGetX11Window(window), nil, 1, 1);
|
||||
Cursor cur = XCreatePixmapCursor(glfwGetX11Display(), pix, pix, &col, &col, 0, 0);
|
||||
|
||||
XDefineCursor(glfwGetX11Display(), glfwGetX11Window(window), cur);
|
||||
XFreeCursor(glfwGetX11Display(), cur);
|
||||
#else
|
||||
glfwSetInputMode(window, GLFW_CURSOR, GLFW_CURSOR_HIDDEN);
|
||||
#endif
|
||||
#endif
|
||||
cursorHidden = true;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue