Skip to content

Commit

Permalink
One more use of struct info in library_sdl.js. NFC (emscripten-core#2…
Browse files Browse the repository at this point in the history
…2917)

Missed this one in emscripten-core#22885.
  • Loading branch information
sbc100 authored and uysalibov committed Nov 15, 2024
1 parent 147c781 commit cefee25
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/library_sdl.js
Original file line number Diff line number Diff line change
Expand Up @@ -864,7 +864,8 @@ var LibrarySDL = {
#endif
{{{ makeSetValue('SDL.keyboardState', 'code', 'down', 'i8') }}};
// TODO: lmeta, rmeta, numlock, capslock, KMOD_MODE, KMOD_RESERVED
SDL.modState = ({{{ makeGetValue('SDL.keyboardState', '1248', 'i8') }}} ? {{{ cDefs.KMOD_LCTRL }}} : 0) |
SDL.modState =
({{{ makeGetValue('SDL.keyboardState', cDefs.SDLK_LCTRL, 'i8') }}} ? {{{ cDefs.KMOD_LCTRL }}} : 0) |
({{{ makeGetValue('SDL.keyboardState', cDefs.SDLK_LSHIFT, 'i8') }}} ? {{{ cDefs.KMOD_LSHIFT }}} : 0) |
({{{ makeGetValue('SDL.keyboardState', cDefs.SDLK_LALT, 'i8') }}} ? {{{ cDefs.KMOD_LALT }}} : 0) |
({{{ makeGetValue('SDL.keyboardState', cDefs.SDLK_RCTRL, 'i8') }}} ? {{{ cDefs.KMOD_RCTRL }}} : 0) |
Expand Down
1 change: 1 addition & 0 deletions src/struct_info.json
Original file line number Diff line number Diff line change
Expand Up @@ -773,6 +773,7 @@
"KMOD_RALT",
"KMOD_LSHIFT",
"KMOD_RSHIFT",
"SDLK_LCTRL",
"SDLK_LSHIFT",
"SDLK_LALT",
"SDLK_RCTRL",
Expand Down
1 change: 1 addition & 0 deletions src/struct_info_generated.json
Original file line number Diff line number Diff line change
Expand Up @@ -371,6 +371,7 @@
"RTLD_NOW": 2,
"R_OK": 4,
"SDLK_LALT": 1250,
"SDLK_LCTRL": 1248,
"SDLK_LSHIFT": 1249,
"SDLK_RALT": 1254,
"SDLK_RCTRL": 1252,
Expand Down
1 change: 1 addition & 0 deletions src/struct_info_generated_wasm64.json
Original file line number Diff line number Diff line change
Expand Up @@ -371,6 +371,7 @@
"RTLD_NOW": 2,
"R_OK": 4,
"SDLK_LALT": 1250,
"SDLK_LCTRL": 1248,
"SDLK_LSHIFT": 1249,
"SDLK_RALT": 1254,
"SDLK_RCTRL": 1252,
Expand Down

0 comments on commit cefee25

Please sign in to comment.