Fixed #158 key press typo in GLFW backends

This commit is contained in:
vurtun 2016-06-01 13:35:01 +02:00
parent 3f935941f8
commit 66c2ac72d6
2 changed files with 6 additions and 6 deletions

View File

@ -188,7 +188,7 @@ nk_gflw3_scroll_callback(GLFWwindow *win, double xoff, double yoff)
glfw.scroll += (float)yoff;
}
static void
NK_INTERN void
nk_glfw3_clipbard_paste(nk_handle usr, struct nk_text_edit *edit)
{
const char *text = glfwGetClipboardString(glfw.win);
@ -196,7 +196,7 @@ nk_glfw3_clipbard_paste(nk_handle usr, struct nk_text_edit *edit)
(void)usr;
}
static void
NK_INTERN void
nk_glfw3_clipbard_copy(nk_handle usr, const char *text, int len)
{
char *str = 0;
@ -281,7 +281,7 @@ nk_glfw3_new_frame(void)
glfwGetKey(win, GLFW_KEY_RIGHT_SHIFT) == GLFW_PRESS);
if (glfwGetKey(win, GLFW_KEY_LEFT_CONTROL) == GLFW_PRESS ||
glfwGetKey(win, GLFW_KEY_RIGHT_CONTROL)) {
glfwGetKey(win, GLFW_KEY_RIGHT_CONTROL) == GLFW_PRESS) {
nk_input_key(ctx, NK_KEY_COPY, glfwGetKey(win, GLFW_KEY_C) == GLFW_PRESS);
nk_input_key(ctx, NK_KEY_PASTE, glfwGetKey(win, GLFW_KEY_P) == GLFW_PRESS);
nk_input_key(ctx, NK_KEY_CUT, glfwGetKey(win, GLFW_KEY_X) == GLFW_PRESS);

View File

@ -296,7 +296,7 @@ nk_gflw3_scroll_callback(GLFWwindow *win, double xoff, double yoff)
glfw.scroll += (float)yoff;
}
static void
NK_INTERN void
nk_glfw3_clipbard_paste(nk_handle usr, struct nk_text_edit *edit)
{
const char *text = glfwGetClipboardString(glfw.win);
@ -304,7 +304,7 @@ nk_glfw3_clipbard_paste(nk_handle usr, struct nk_text_edit *edit)
(void)usr;
}
static void
NK_INTERN void
nk_glfw3_clipbard_copy(nk_handle usr, const char *text, int len)
{
char *str = 0;
@ -389,7 +389,7 @@ nk_glfw3_new_frame(void)
glfwGetKey(win, GLFW_KEY_RIGHT_SHIFT) == GLFW_PRESS);
if (glfwGetKey(win, GLFW_KEY_LEFT_CONTROL) == GLFW_PRESS ||
glfwGetKey(win, GLFW_KEY_RIGHT_CONTROL)) {
glfwGetKey(win, GLFW_KEY_RIGHT_CONTROL == GLFW_PRESS)) {
nk_input_key(ctx, NK_KEY_COPY, glfwGetKey(win, GLFW_KEY_C) == GLFW_PRESS);
nk_input_key(ctx, NK_KEY_PASTE, glfwGetKey(win, GLFW_KEY_P) == GLFW_PRESS);
nk_input_key(ctx, NK_KEY_CUT, glfwGetKey(win, GLFW_KEY_X) == GLFW_PRESS);