Skip to content

Commit

Permalink
update go version and key code
Browse files Browse the repository at this point in the history
  • Loading branch information
vcaesar committed Sep 16, 2020
1 parent 38b39b0 commit ec1ff45
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .circleci/images/primary/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# FROM golang:1.10.1
FROM golang:1.15.1-stretch AS build
FROM golang:1.15.2-stretch AS build
# FROM govgo/go:1.11.1

RUN apt update && apt install -y --no-install-recommends \
Expand Down
2 changes: 1 addition & 1 deletion appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ environment:
PATH: C:\msys64\mingw32\bin\;C:\Program Files (x86)\NSIS\;%PATH%
# - COMPILER: MINGW_W64
# ARCHITECTURE: x64
GOVERSION: 1.15.1
GOVERSION: 1.15.2
# GOPATH: c:\gopath

# scripts that run after cloning repository
Expand Down
4 changes: 3 additions & 1 deletion key/goKey.h
Original file line number Diff line number Diff line change
Expand Up @@ -143,8 +143,10 @@ int CheckKeyCodes(char* k, MMKeyCode *key){

if (strlen(k) == 1) {
*key = keyCodeForChar(*k);
if (*key == K_NOT_A_KEY)
if (*key == K_NOT_A_KEY) {
return -2;
}

return 0;
}

Expand Down
8 changes: 6 additions & 2 deletions key/keycode_c.h
Original file line number Diff line number Diff line change
Expand Up @@ -116,8 +116,10 @@ MMKeyCode keyCodeForChar(const char c){
#elif defined(IS_WINDOWS)
MMKeyCode code;
code = VkKeyScan(c);
if (code == 0xFFFF)
if (code == 0xFFFF) {
return K_NOT_A_KEY;
}

return code;
#elif defined(USE_X11)
MMKeyCode code;
Expand All @@ -135,14 +137,16 @@ MMKeyCode keyCodeForChar(const char c){
while (xs->name) {
if (c == xs->name ) {
code = xs->code;
//
break;
}
xs++;
}
}

if (code == NoSymbol)
if (code == NoSymbol) {
return K_NOT_A_KEY;
}

return code;
#endif
Expand Down

0 comments on commit ec1ff45

Please sign in to comment.