Skip to content

Commit

Permalink
Add missing documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
Crayon2000 committed Mar 18, 2024
1 parent d0b37c0 commit 3e46451
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 5 deletions.
4 changes: 2 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

All notable changes to this project will be documented in this file.

## [1.3.0] - 2024-03-17
## [1.3.0] - 2024-03-18

- Send USB Gamecube Controller Adapter button states to UsendMii.
- Remove code for emulated buttons.
Expand Down Expand Up @@ -47,7 +47,7 @@ All notable changes to this project will be documented in this file.

- Initial release.

[1.3.0]: https://github.com/Crayon2000/MiisendU-Wii-U/compare/v1.2.0...HEAD
[1.3.0]: https://github.com/Crayon2000/MiisendU-Wii-U/compare/v1.2.0...v1.3.0
[1.2.0]: https://github.com/Crayon2000/MiisendU-Wii-U/compare/v1.1.0...v1.2.0
[1.1.0]: https://github.com/Crayon2000/MiisendU-Wii-U/compare/v1.0.0...v1.1.0
[1.0.0]: https://github.com/Crayon2000/MiisendU-Wii-U/compare/v0.3.0...v1.0.0
Expand Down
2 changes: 1 addition & 1 deletion meta/meta.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<name>MiisendU Wii U</name>
<coder>Crayon</coder>
<version>1.3.0</version>
<release_date>20240317000000</release_date>
<release_date>20240318000000</release_date>
<short_description>A UsendMii client</short_description>
<long_description>A UsendMii client for Wii U.

Expand Down
1 change: 1 addition & 0 deletions source/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ static void ResetOrientation()
* Entry point.
* @param argc An integer that contains the count of arguments.
* @param argv An array of null-terminated strings representing command-line arguments.
* @return Returns zero on success, nonzero on error.
*/
int main(int argc, char **argv)
{
Expand Down
13 changes: 12 additions & 1 deletion source/udp.c
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,11 @@
static int udp_socket = -1;
static volatile bool udp_lock = false;


/**
* Initialize the UDP socket.
* @param ipString The IP address to connect to.
* @param ipport The port to connect to.
*/
void udp_init(const char * ipString, unsigned short ipport)
{
udp_socket = socket(AF_INET, SOCK_DGRAM, IPPROTO_UDP);
Expand All @@ -37,6 +41,9 @@ void udp_init(const char * ipString, unsigned short ipport)
}
}

/**
* Deinitialize the UDP socket.
*/
void udp_deinit(void)
{
if(udp_socket >= 0)
Expand All @@ -46,6 +53,10 @@ void udp_deinit(void)
}
}

/**
* Print a string to the UDP socket.
* @param str The string to send.
*/
void udp_print(const char *str)
{
// socket is always 0 initially as it is in the BSS
Expand Down
8 changes: 7 additions & 1 deletion source/vpad_to_json.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,13 @@ static const std::map gcmask = {
};

/**
* Change the range.
* Change a value from one range to another.
* @param[in] value Value to change.
* @param[in] oldMin Old minimum value.
* @param[in] oldMax Old maximum value.
* @param[in] newMin New minimum value.
* @param[in] newMax New maximum value.
* @return Value in the new range.
*/
[[nodiscard]] static constexpr int change_range(int value, int oldMin, int oldMax, int newMin, int newMax)
{
Expand Down

0 comments on commit 3e46451

Please sign in to comment.