Skip to content

Commit

Permalink
Update gcemuhook, use MAC_UNAVAILABLE constant
Browse files Browse the repository at this point in the history
  • Loading branch information
v1993 committed Sep 23, 2023
1 parent 8f9ae50 commit 87f0dee
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/Config.vala
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ namespace Linuxmotehook {
}

var mac = uint64.parse(minfo.fetch(1), 16);
assert(mac != 0);
assert(mac != Cemuhook.MAC_UNAVAILABLE);
assert((mac >> 48) == 0);

var conf = new WiimoteConfig();
Expand Down
4 changes: 2 additions & 2 deletions src/MainDevice.vala
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ namespace Linuxmotehook {
private uint64 motion_timestamp = 0;
private Cemuhook.MotionData accelerometer = {0f, 0f, 0f};
private Cemuhook.MotionData gyroscope = {0f, 0f, 0f};
private uint64 mac = 0;
private uint64 mac = Cemuhook.MAC_UNAVAILABLE;

private const float ACCEL_UNITS_PER_G = 102.5f;
private const float GYRO_UNITS_PER_DEG_PER_SEC = 189.5f;
Expand Down Expand Up @@ -480,7 +480,7 @@ namespace Linuxmotehook {
}

private void destroy() {
if (mac != 0)
if (mac != Cemuhook.MAC_UNAVAILABLE)
print("WiiMote %s disconnected\n", format_mac(mac));

if (extension != null) {
Expand Down
2 changes: 1 addition & 1 deletion subprojects/gcemuhook.wrap
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[wrap-git]
url = https://github.com/v1993/gcemuhook.git
push-url = [email protected]:v1993/gcemuhook.git
revision = acde07238a16c78e39f4aee241ab7ae53b46cde6
revision = 91ef61cca809f5f3b9fa6e5304aba284a56c06dc
depth = 1

0 comments on commit 87f0dee

Please sign in to comment.