Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
Alchemy Viewer
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Releases
Package Registry
Operate
Terraform modules
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Silent mode is enabled
All outbound communications are blocked.
Learn more
.
Show more breadcrumbs
Alchemy Viewer
Alchemy Viewer
Commits
ddaec889
Commit
ddaec889
authored
3 years ago
by
Rye Mutt
Browse files
Options
Downloads
Patches
Plain Diff
Fix build errors in macos keyboard code
parent
c83a9a46
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!16
Various package rebuilds and updates including movement to zlib-ng and mac support
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
indra/llwindow/llkeyboardmacosx.cpp
+3
-4
3 additions, 4 deletions
indra/llwindow/llkeyboardmacosx.cpp
indra/llwindow/llwindowmacosx-objc.h
+2
-2
2 additions, 2 deletions
indra/llwindow/llwindowmacosx-objc.h
indra/llwindow/llwindowmacosx.cpp
+2
-2
2 additions, 2 deletions
indra/llwindow/llwindowmacosx.cpp
with
7 additions
and
8 deletions
indra/llwindow/llkeyboardmacosx.cpp
+
3
−
4
View file @
ddaec889
...
...
@@ -133,8 +133,7 @@ LLKeyboardMacOSX::LLKeyboardMacOSX()
mTranslateKeyMap
[
0x7e
]
=
KEY_UP
;
// Build inverse map
std
::
map
<
U32
,
KEY
>::
iterator
iter
;
for
(
iter
=
mTranslateKeyMap
.
begin
();
iter
!=
mTranslateKeyMap
.
end
();
iter
++
)
for
(
auto
iter
=
mTranslateKeyMap
.
begin
();
iter
!=
mTranslateKeyMap
.
end
();
iter
++
)
{
mInvTranslateKeyMap
[
iter
->
second
]
=
iter
->
first
;
}
...
...
@@ -154,7 +153,7 @@ LLKeyboardMacOSX::LLKeyboardMacOSX()
mTranslateNumpadMap
[
0x4c
]
=
KEY_PAD_RETURN
;
// keypad enter
// Build inverse numpad map
for
(
iter
=
mTranslateNumpadMap
.
begin
();
iter
!=
mTranslateNumpadMap
.
end
();
iter
++
)
for
(
auto
iter
=
mTranslateNumpadMap
.
begin
();
iter
!=
mTranslateNumpadMap
.
end
();
iter
++
)
{
mInvTranslateNumpadMap
[
iter
->
second
]
=
iter
->
first
;
}
...
...
@@ -279,7 +278,7 @@ MASK LLKeyboardMacOSX::currentMask(BOOL for_mouse_event)
void
LLKeyboardMacOSX
::
scanKeyboard
()
{
S
32
key
;
U
32
key
;
for
(
key
=
0
;
key
<
KEY_COUNT
;
key
++
)
{
// Generate callback if any event has occurred on this key this frame.
...
...
This diff is collapsed.
Click to expand it.
indra/llwindow/llwindowmacosx-objc.h
+
2
−
2
View file @
ddaec889
...
...
@@ -126,8 +126,8 @@ void setupInputWindow(NSWindowRef window, GLViewRef view);
// These are all implemented in llwindowmacosx.cpp.
// This is largely for easier interop between Obj-C and C++ (at least in the viewer's case due to the BOOL vs. BOOL conflict)
bool
callKeyUp
(
NSKeyEventRef
event
,
unsigned
shor
t
key
,
unsigned
int
mask
);
bool
callKeyDown
(
NSKeyEventRef
event
,
unsigned
shor
t
key
,
unsigned
int
mask
);
bool
callKeyUp
(
NSKeyEventRef
event
,
unsigned
in
t
key
,
unsigned
int
mask
);
bool
callKeyDown
(
NSKeyEventRef
event
,
unsigned
in
t
key
,
unsigned
int
mask
);
void
callResetKeys
();
bool
callUnicodeCallback
(
wchar_t
character
,
unsigned
int
mask
);
void
callRightMouseDown
(
float
*
pos
,
unsigned
int
mask
);
...
...
This diff is collapsed.
Click to expand it.
indra/llwindow/llwindowmacosx.cpp
+
2
−
2
View file @
ddaec889
...
...
@@ -197,7 +197,7 @@ LLWindowMacOSX::LLWindowMacOSX(LLWindowCallbacks* callbacks,
// These functions are used as wrappers for our internal event handling callbacks.
// It's a good idea to wrap these to avoid reworking more code than we need to within LLWindow.
bool
callKeyUp
(
NSKeyEventRef
event
,
unsigned
shor
t
key
,
unsigned
int
mask
)
bool
callKeyUp
(
NSKeyEventRef
event
,
unsigned
in
t
key
,
unsigned
int
mask
)
{
mRawKeyEvent
=
event
;
bool
retVal
=
gKeyboard
->
handleKeyUp
(
key
,
mask
);
...
...
@@ -205,7 +205,7 @@ bool callKeyUp(NSKeyEventRef event, unsigned short key, unsigned int mask)
return
retVal
;
}
bool
callKeyDown
(
NSKeyEventRef
event
,
unsigned
shor
t
key
,
unsigned
int
mask
)
bool
callKeyDown
(
NSKeyEventRef
event
,
unsigned
in
t
key
,
unsigned
int
mask
)
{
mRawKeyEvent
=
event
;
bool
retVal
=
gKeyboard
->
handleKeyDown
(
key
,
mask
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment