Skip to content

Commit

Permalink
fix(SynthPointer): Fix ScreenCount return type
Browse files Browse the repository at this point in the history
The `ScreenCount` function in `SynthPointer.c` now takes a pointer to an integer as a parameter and assigns the number of screens to the dereferenced value. This fixes the return type of the function.
  • Loading branch information
dikkadev committed Aug 6, 2023
1 parent bd8c881 commit 373a509
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
4 changes: 2 additions & 2 deletions SynthPointer.c
Original file line number Diff line number Diff line change
Expand Up @@ -93,8 +93,8 @@ void Up(HSYNTHETICPOINTERDEVICE device, POINTER_TYPE_INFO *info) {
_injectPointer(device, info);
}

int ScreenCount() {
return GetSystemMetrics(SM_CMONITORS);
void ScreenCount(int *count) {
*count = GetSystemMetrics(SM_CMONITORS);
}

typedef struct {
Expand Down
6 changes: 3 additions & 3 deletions SynthPointer.h
Original file line number Diff line number Diff line change
Expand Up @@ -97,11 +97,11 @@ void Up(HSYNTHETICPOINTERDEVICE device, POINTER_TYPE_INFO *info);
/** (ScreenCount)
* Get the number of screens.
*
* # Return value
* # Parameters
*
* Returns the number of screens.
* - `count` - Pointer to the number of screens.
*/
int ScreenCount();
void ScreenCount(int* count);

/**
* ## Internal Functions
Expand Down
8 changes: 4 additions & 4 deletions docs.md
Original file line number Diff line number Diff line change
Expand Up @@ -112,17 +112,17 @@ Enter the up state of the pen.
- `info` - Pointer to the POINTER_TYPE_INFO structure.
<a name="line-97"></a><a name="ScreenCount"></a>
### 🔹 int ScreenCount()
### 🔹 void ScreenCount(int* count)
```cpp
int ScreenCount()
void ScreenCount(int* count)
```

Get the number of screens.

#### Return value
#### Parameters

Returns the number of screens.
- `count` - Pointer to the number of screens.

<a name="line-106"></a>
## Internal Functions
Expand Down

0 comments on commit 373a509

Please sign in to comment.