Fixed clipboard test OS X modifier.
This commit is contained in:
parent
5b6e67119f
commit
9021e52a6f
@ -34,6 +34,12 @@
|
||||
|
||||
#include "getopt.h"
|
||||
|
||||
#if defined(__APPLE__)
|
||||
#define MODIFIER GLFW_MOD_SUPER
|
||||
#else
|
||||
#define MODIFIER GLFW_MOD_CONTROL
|
||||
#endif
|
||||
|
||||
static void usage(void)
|
||||
{
|
||||
printf("Usage: clipboard [-h]\n");
|
||||
@ -56,7 +62,7 @@ static void key_callback(GLFWwindow* window, int key, int scancode, int action,
|
||||
break;
|
||||
|
||||
case GLFW_KEY_V:
|
||||
if (mods == GLFW_MOD_CONTROL)
|
||||
if (mods == MODIFIER)
|
||||
{
|
||||
const char* string;
|
||||
|
||||
@ -69,7 +75,7 @@ static void key_callback(GLFWwindow* window, int key, int scancode, int action,
|
||||
break;
|
||||
|
||||
case GLFW_KEY_C:
|
||||
if (mods == GLFW_MOD_CONTROL)
|
||||
if (mods == MODIFIER)
|
||||
{
|
||||
const char* string = "Hello GLFW World!";
|
||||
glfwSetClipboardString(window, string);
|
||||
|
Loading…
Reference in New Issue
Block a user