Skip to content

Commit

Permalink
Added some comments for enumerate about what happens when no devices …
Browse files Browse the repository at this point in the history
…are found.
  • Loading branch information
edorfaus committed Jun 25, 2012
1 parent 905c1c1 commit 9766de5
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions libtempered/tempered.h
Expand Up @@ -97,6 +97,7 @@ bool tempered_exit( char **error );
* @return A pointer to the first device in the enumerated list, or NULL on
* error. This list should be freed with tempered_free_device_list when you
* are done with it.
* If no devices were found, NULL is returned and the error remains unset.
*/
struct tempered_device_list* tempered_enumerate( char **error );

Expand Down
2 changes: 2 additions & 0 deletions libtempered/type_hid/common.c
Expand Up @@ -47,6 +47,8 @@ struct tempered_device_list* tempered_type_hid_enumerate( char **error )
devs = hid_enumerate( 0, 0 );
if ( devs == NULL )
{
// No HID devices were found. We unfortunately cannot know if this was
// because of an error or because there simply aren't any present.
if ( error != NULL )
{
*error = strdup( "No HID devices were found." );
Expand Down

0 comments on commit 9766de5

Please sign in to comment.