ソースを参照

device: avoid unaligned memory accesses

Daniele Bartolini 2 年 前
コミット
dc571a5644
3 ファイル変更3 行追加0 行削除
  1. 1 0
      src/device/main_android.cpp
  2. 1 0
      src/device/main_linux.cpp
  3. 1 0
      src/device/main_windows.cpp

+ 1 - 0
src/device/main_android.cpp

@@ -20,6 +20,7 @@
 #include <jni.h>
 #include <stdlib.h>
 #define STB_SPRINTF_IMPLEMENTATION
+#define STB_SPRINTF_NOUNALIGNED
 #include <stb_sprintf.h>
 
 extern "C"

+ 1 - 0
src/device/main_linux.cpp

@@ -33,6 +33,7 @@
 #include <X11/Xlib.h>
 #include <X11/Xutil.h>
 #define STB_SPRINTF_IMPLEMENTATION
+#define STB_SPRINTF_NOUNALIGNED
 #include <stb_sprintf.h>
 #include <signal.h>
 #include <errno.h>

+ 1 - 0
src/device/main_windows.cpp

@@ -24,6 +24,7 @@
 #include <windowsx.h> // GET_X_LPARAM, GET_Y_LPARAM
 #include <xinput.h>
 #define STB_SPRINTF_IMPLEMENTATION
+#define STB_SPRINTF_NOUNALIGNED
 #include <stb_sprintf.h>
 
 namespace crown