diff options
author | Dirk Hohndel <dirk@hohndel.org> | 2013-09-17 07:50:54 -0400 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2013-09-17 07:58:29 -0400 |
commit | a7ceb695f57a88d280719c4763c8d5eb4b6ab03e (patch) | |
tree | a90af359451df783be6f674786f6c6f0eb1374cd /windows.c | |
parent | fb0ecf6cd60fb75e5ce481587d31d6b4a475827b (diff) | |
download | subsurface-a7ceb695f57a88d280719c4763c8d5eb4b6ab03e.tar.gz |
Fix Windows compile
When submitting commit 8f33b81de0f9 ("implement device probe in C"),
Danilo explicitly asked me to make sure this compiles / works on Windows
and Mac - and I promptly forgot to do so. Robert fixed the Mac build, this
now at least compiles under Windows (but it's still untested).
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'windows.c')
-rw-r--r-- | windows.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -351,8 +351,8 @@ int enumerate_devices (device_callback_t callback, void *userdata) RegCloseKey(hKey); return -1; } - - for (DWORD i = 0; i < count; ++i) { + DWORD i; + for (i = 0; i < count; ++i) { // Get the value name, data and type. char name[512], data[512]; DWORD name_len = sizeof (name); @@ -379,7 +379,7 @@ int enumerate_devices (device_callback_t callback, void *userdata) callback (data, userdata); index++; - if (is_default_dive_computer_device(filename)) + if (is_default_dive_computer_device(name)) index = i; } |