Bring back the main modifier, get rid of _impl

This commit is contained in:
Ilia Demianenko 2023-08-22 09:42:08 -07:00 committed by MartinFouilleul
parent a6f81a1320
commit 2c07c9b665
5 changed files with 5 additions and 16 deletions

View File

@ -212,6 +212,7 @@ extern "C"
OC_KEYMOD_SHIFT = 0x02,
OC_KEYMOD_CTRL = 0x04,
OC_KEYMOD_CMD = 0x08,
OC_KEYMOD_MAIN_MODIFIER = 0x16 /* CMD on Mac, CTRL on Win32 */
} oc_keymod_flags;
typedef enum

View File

@ -215,6 +215,7 @@ static oc_keymod_flags oc_convert_osx_mods(NSUInteger nsFlags)
if(nsFlags & NSEventModifierFlagCommand)
{
mods |= OC_KEYMOD_CMD;
mods |= OC_KEYMOD_MAIN_MODIFIER;
}
return (mods);
}

View File

@ -196,6 +196,7 @@ static oc_keymod_flags oc_get_mod_keys()
if(GetKeyState(VK_CONTROL) & 0x8000)
{
mods |= OC_KEYMOD_CTRL;
mods |= OC_KEYMOD_MAIN_MODIFIER;
}
if(GetKeyState(VK_MENU) & 0x8000)
{

View File

@ -1,17 +1,3 @@
#include "platform.h"
oc_host_platform ORCA_IMPORT(oc_get_host_platform_impl)();
#ifdef __cplusplus
extern "C"
{
#endif
oc_host_platform oc_get_host_platform()
{
return oc_get_host_platform_impl();
}
#ifdef __cplusplus
} // extern "C"
#endif
oc_host_platform ORCA_IMPORT(oc_get_host_platform)();

View File

@ -59,7 +59,7 @@
]
},
{
"name": "oc_get_host_platform_impl",
"name": "oc_get_host_platform",
"cname": "oc_get_host_platform",
"ret": {"name": "int", "tag": "i"},
"args": []