diff --git a/common/include/km_types.h b/common/include/km_types.h index 05bc0aa432..cd0ca7f8d0 100644 --- a/common/include/km_types.h +++ b/common/include/km_types.h @@ -11,12 +11,20 @@ #if defined(__LP64__) || defined(_LP64) /* 64-bit, g++ */ -#define KMX_64BIT +#define KMX_REQUIRES_REALIGNMENT #endif #if defined(_WIN64) && !defined(USE_64) /* 64-bit, Windows */ -#define KMX_64BIT +#define KMX_REQUIRES_REALIGNMENT +#endif + +#if defined(__EMSCRIPTEN__) +// Emscripten/WASM. Emscripten even though it uses 32-bit (and not 64-bit +// pointers like the 64-bit architectures above) requires 32-bit alignment +// for pointers which we don't always have in the KMX data from file +// (see #12844). +#define KMX_REQUIRES_REALIGNMENT #endif typedef uint32_t KMX_DWORD; diff --git a/core/include/keyman/keyman_core_api.h b/core/include/keyman/keyman_core_api.h index 7863689296..6ed5847894 100644 --- a/core/include/keyman/keyman_core_api.h +++ b/core/include/keyman/keyman_core_api.h @@ -302,11 +302,15 @@ typedef uint8_t (*km_core_keyboard_imx_platform)(km_core_state*, uint32_t, void* ## Description -An error code mechanism similar to COM’s `HRESULT` scheme (unlike COM, any +An error code mechanism similar to COM's `HRESULT` scheme (unlike COM, any non-zero value is an error). ## Specification +--> +// keep in sync with web/src/engine/core-processor/src/core-factory.ts +// (see https://github.com/emscripten-core/emscripten/issues/18585) + + + +
This page is designed to stress-test the loading a KMX keyboard from blob. It will repeatedly load a .kmx using the KM_Core loader.
+Be sure to reference the developer console for additional feedback.
+ +