Bring back the main modifier, get rid of _impl
This commit is contained in:
parent
a6f81a1320
commit
2c07c9b665
|
@ -212,6 +212,7 @@ extern "C"
|
||||||
OC_KEYMOD_SHIFT = 0x02,
|
OC_KEYMOD_SHIFT = 0x02,
|
||||||
OC_KEYMOD_CTRL = 0x04,
|
OC_KEYMOD_CTRL = 0x04,
|
||||||
OC_KEYMOD_CMD = 0x08,
|
OC_KEYMOD_CMD = 0x08,
|
||||||
|
OC_KEYMOD_MAIN_MODIFIER = 0x16 /* CMD on Mac, CTRL on Win32 */
|
||||||
} oc_keymod_flags;
|
} oc_keymod_flags;
|
||||||
|
|
||||||
typedef enum
|
typedef enum
|
||||||
|
|
|
@ -215,6 +215,7 @@ static oc_keymod_flags oc_convert_osx_mods(NSUInteger nsFlags)
|
||||||
if(nsFlags & NSEventModifierFlagCommand)
|
if(nsFlags & NSEventModifierFlagCommand)
|
||||||
{
|
{
|
||||||
mods |= OC_KEYMOD_CMD;
|
mods |= OC_KEYMOD_CMD;
|
||||||
|
mods |= OC_KEYMOD_MAIN_MODIFIER;
|
||||||
}
|
}
|
||||||
return (mods);
|
return (mods);
|
||||||
}
|
}
|
||||||
|
|
|
@ -196,6 +196,7 @@ static oc_keymod_flags oc_get_mod_keys()
|
||||||
if(GetKeyState(VK_CONTROL) & 0x8000)
|
if(GetKeyState(VK_CONTROL) & 0x8000)
|
||||||
{
|
{
|
||||||
mods |= OC_KEYMOD_CTRL;
|
mods |= OC_KEYMOD_CTRL;
|
||||||
|
mods |= OC_KEYMOD_MAIN_MODIFIER;
|
||||||
}
|
}
|
||||||
if(GetKeyState(VK_MENU) & 0x8000)
|
if(GetKeyState(VK_MENU) & 0x8000)
|
||||||
{
|
{
|
||||||
|
|
|
@ -1,17 +1,3 @@
|
||||||
#include "platform.h"
|
#include "platform.h"
|
||||||
|
|
||||||
oc_host_platform ORCA_IMPORT(oc_get_host_platform_impl)();
|
oc_host_platform ORCA_IMPORT(oc_get_host_platform)();
|
||||||
|
|
||||||
#ifdef __cplusplus
|
|
||||||
extern "C"
|
|
||||||
{
|
|
||||||
#endif
|
|
||||||
|
|
||||||
oc_host_platform oc_get_host_platform()
|
|
||||||
{
|
|
||||||
return oc_get_host_platform_impl();
|
|
||||||
}
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
|
||||||
} // extern "C"
|
|
||||||
#endif
|
|
|
@ -59,7 +59,7 @@
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "oc_get_host_platform_impl",
|
"name": "oc_get_host_platform",
|
||||||
"cname": "oc_get_host_platform",
|
"cname": "oc_get_host_platform",
|
||||||
"ret": {"name": "int", "tag": "i"},
|
"ret": {"name": "int", "tag": "i"},
|
||||||
"args": []
|
"args": []
|
||||||
|
|
Loading…
Reference in New Issue