update go version and key code

This commit is contained in:
vcaesar 2020-09-16 08:36:01 -04:00
parent 38b39b0d1a
commit ec1ff45b53
4 changed files with 11 additions and 5 deletions

View File

@ -1,5 +1,5 @@
# FROM golang:1.10.1 # 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 # FROM govgo/go:1.11.1
RUN apt update && apt install -y --no-install-recommends \ RUN apt update && apt install -y --no-install-recommends \

View File

@ -34,7 +34,7 @@ environment:
PATH: C:\msys64\mingw32\bin\;C:\Program Files (x86)\NSIS\;%PATH% PATH: C:\msys64\mingw32\bin\;C:\Program Files (x86)\NSIS\;%PATH%
# - COMPILER: MINGW_W64 # - COMPILER: MINGW_W64
# ARCHITECTURE: x64 # ARCHITECTURE: x64
GOVERSION: 1.15.1 GOVERSION: 1.15.2
# GOPATH: c:\gopath # GOPATH: c:\gopath
# scripts that run after cloning repository # scripts that run after cloning repository

View File

@ -143,8 +143,10 @@ int CheckKeyCodes(char* k, MMKeyCode *key){
if (strlen(k) == 1) { if (strlen(k) == 1) {
*key = keyCodeForChar(*k); *key = keyCodeForChar(*k);
if (*key == K_NOT_A_KEY) if (*key == K_NOT_A_KEY) {
return -2; return -2;
}
return 0; return 0;
} }

View File

@ -116,8 +116,10 @@ MMKeyCode keyCodeForChar(const char c){
#elif defined(IS_WINDOWS) #elif defined(IS_WINDOWS)
MMKeyCode code; MMKeyCode code;
code = VkKeyScan(c); code = VkKeyScan(c);
if (code == 0xFFFF) if (code == 0xFFFF) {
return K_NOT_A_KEY; return K_NOT_A_KEY;
}
return code; return code;
#elif defined(USE_X11) #elif defined(USE_X11)
MMKeyCode code; MMKeyCode code;
@ -135,14 +137,16 @@ MMKeyCode keyCodeForChar(const char c){
while (xs->name) { while (xs->name) {
if (c == xs->name ) { if (c == xs->name ) {
code = xs->code; code = xs->code;
//
break; break;
} }
xs++; xs++;
} }
} }
if (code == NoSymbol) if (code == NoSymbol) {
return K_NOT_A_KEY; return K_NOT_A_KEY;
}
return code; return code;
#endif #endif