LoginSignup
1
0

Mac(M1) + Unity + joycon JoyconLibエラーについて

Last updated at Posted at 2023-07-26

めちゃくちゃ参考になる記事
https://nn-hokuson.hatenablog.com/entry/2023/02/27/164608

1点私の環境では修正が必要だったので、
書き残しておきます。

M1macだと、hidapiのリビルドが必要になります。

参考ページをもとにビルドしようとすると以下のエラーが出ます。

mac/hid.c:1532:10 Implicit conversion loses integer precision: 'size_t' (aka 'unsigned long') to 'int'

'size_t' (unsigned long) 型から 'int' 型への変換により、整数の精度情報が失われているようです。

hid.cファイルの1532行目を
return (int)copy_len;

と書き換えます。
これでビルドするとエラーが解消されるはずです。

1
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
0