Feedback
This commit is contained in:
parent
8bfbabd877
commit
40906bb852
11
src/mp_app.h
11
src/mp_app.h
|
@ -190,11 +190,12 @@ typedef enum { MP_KEY_UNKNOWN = 0,
|
||||||
MP_KEY_COUNT } mp_key_code;
|
MP_KEY_COUNT } mp_key_code;
|
||||||
|
|
||||||
typedef enum {
|
typedef enum {
|
||||||
MP_KEYMOD_NONE = 0x00,
|
MP_KEYMOD_NONE = 0x00,
|
||||||
MP_KEYMOD_ALT = 0x01,
|
MP_KEYMOD_ALT = 0x01,
|
||||||
MP_KEYMOD_SHIFT = 0x02,
|
MP_KEYMOD_SHIFT = 0x02,
|
||||||
MP_KEYMOD_CTRL = 0x04,
|
MP_KEYMOD_CTRL = 0x04,
|
||||||
MP_KEYMOD_CMD = 0x08 } mp_keymod_flags;
|
MP_KEYMOD_CMD = 0x08,
|
||||||
|
MP_KEYMOD_MAIN_MODIFIER = 0x16 } mp_keymod_flags;
|
||||||
|
|
||||||
typedef enum {
|
typedef enum {
|
||||||
MP_MOUSE_LEFT = 0x00,
|
MP_MOUSE_LEFT = 0x00,
|
||||||
|
|
|
@ -253,6 +253,7 @@ static mp_keymod_flags mp_convert_osx_mods(NSUInteger nsFlags)
|
||||||
if(nsFlags & NSEventModifierFlagCommand)
|
if(nsFlags & NSEventModifierFlagCommand)
|
||||||
{
|
{
|
||||||
mods |= MP_KEYMOD_CMD;
|
mods |= MP_KEYMOD_CMD;
|
||||||
|
mods |= MP_KEYMOD_MAIN_MODIFIER;
|
||||||
}
|
}
|
||||||
return(mods);
|
return(mods);
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,6 +1,4 @@
|
||||||
#include"util/typedefs.h"
|
#include"util/typedefs.h"
|
||||||
#include"platform_clock.h"
|
#include"platform_clock.h"
|
||||||
|
|
||||||
void ORCA_IMPORT(mp_clock_init)();
|
|
||||||
|
|
||||||
f64 ORCA_IMPORT(mp_get_time)(mp_clock_kind clock);
|
f64 ORCA_IMPORT(mp_get_time)(mp_clock_kind clock);
|
||||||
|
|
14
src/ui.c
14
src/ui.c
|
@ -6,11 +6,11 @@
|
||||||
* @revision:
|
* @revision:
|
||||||
*
|
*
|
||||||
*****************************************************************/
|
*****************************************************************/
|
||||||
#include"platform.h"
|
#include"platform/platform.h"
|
||||||
#include"platform_assert.h"
|
#include"platform/platform_assert.h"
|
||||||
#include"memory.h"
|
#include"platform/platform_clock.h"
|
||||||
#include"hash.h"
|
#include"util/memory.h"
|
||||||
#include"platform_clock.h"
|
#include"util/hash.h"
|
||||||
#include"ui.h"
|
#include"ui.h"
|
||||||
|
|
||||||
static ui_style UI_STYLE_DEFAULTS =
|
static ui_style UI_STYLE_DEFAULTS =
|
||||||
|
@ -2303,10 +2303,12 @@ typedef struct ui_edit_command
|
||||||
|
|
||||||
} ui_edit_command;
|
} ui_edit_command;
|
||||||
|
|
||||||
#if PLATFORM_WINDOWS || PLATFORM_ORCA
|
#if PLATFORM_WINDOWS
|
||||||
#define OS_COPY_PASTE_MOD MP_KEYMOD_CTRL
|
#define OS_COPY_PASTE_MOD MP_KEYMOD_CTRL
|
||||||
#elif PLATFORM_MACOS
|
#elif PLATFORM_MACOS
|
||||||
#define OS_COPY_PASTE_MOD MP_KEYMOD_CMD
|
#define OS_COPY_PASTE_MOD MP_KEYMOD_CMD
|
||||||
|
#elif PLATFORM_ORCA
|
||||||
|
#define OS_COPY_PASTE_MOD MP_KEYMOD_MAIN_MODIFIER
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
const ui_edit_command UI_EDIT_COMMANDS[] = {
|
const ui_edit_command UI_EDIT_COMMANDS[] = {
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
*
|
*
|
||||||
*****************************************************************/
|
*****************************************************************/
|
||||||
#include"hash.h"
|
#include"hash.h"
|
||||||
#include"platform.h"
|
#include"platform/platform.h"
|
||||||
|
|
||||||
#if ARCH_X64
|
#if ARCH_X64
|
||||||
#include<immintrin.h>
|
#include<immintrin.h>
|
||||||
|
|
|
@ -191,6 +191,7 @@ static mp_keymod_flags mp_get_mod_keys()
|
||||||
if(GetKeyState(VK_CONTROL) & 0x8000)
|
if(GetKeyState(VK_CONTROL) & 0x8000)
|
||||||
{
|
{
|
||||||
mods |= MP_KEYMOD_CTRL;
|
mods |= MP_KEYMOD_CTRL;
|
||||||
|
mods |= MP_KEYMOD_MAIN_MODIFIER;
|
||||||
}
|
}
|
||||||
if(GetKeyState(VK_MENU) & 0x8000)
|
if(GetKeyState(VK_MENU) & 0x8000)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue