Skip to content

Commit

Permalink
Fix bug in docsparser
Browse files Browse the repository at this point in the history
  • Loading branch information
RandyGaul committed Mar 4, 2025
1 parent c666a5d commit f7cceda
Show file tree
Hide file tree
Showing 5 changed files with 46 additions and 1 deletion.
2 changes: 2 additions & 0 deletions docs/api_reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,11 @@ This is a list of all functions in Cute Framework organized by categories. This
- [cf_app_get_canvas_height](/app/cf_app_get_canvas_height.md)
- [cf_app_get_canvas_width](/app/cf_app_get_canvas_width.md)
- [cf_app_get_dpi_scale](/app/cf_app_get_dpi_scale.md)
- [cf_app_get_framerate](/app/cf_app_get_framerate.md)
- [cf_app_get_height](/app/cf_app_get_height.md)
- [cf_app_get_position](/app/cf_app_get_position.md)
- [cf_app_get_size](/app/cf_app_get_size.md)
- [cf_app_get_smoothed_framerate](/app/cf_app_get_smoothed_framerate.md)
- [cf_app_get_vsync](/app/cf_app_get_vsync.md)
- [cf_app_get_width](/app/cf_app_get_width.md)
- [cf_app_has_focus](/app/cf_app_has_focus.md)
Expand Down
20 changes: 20 additions & 0 deletions docs/app/cf_app_get_framerate.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
[//]: # (This file is automatically generated by Cute Framework's docs parser.)
[//]: # (Do not edit this file by hand!)
[//]: # (See: https://github.com/RandyGaul/cute_framework/blob/master/samples/docs_parser.cpp)
[](../header.md ':include')

# cf_app_get_framerate

Category: [app](/api_reference?id=app)
GitHub: [cute_app.h](https://github.com/RandyGaul/cute_framework/blob/master/include/cute_app.h)
---

Returns the current framerate of the application.

```cpp
float cf_app_get_framerate();
```

## Related Pages

[cf_app_get_smoothed_framerate](/app/cf_app_get_smoothed_framerate.md)
20 changes: 20 additions & 0 deletions docs/app/cf_app_get_smoothed_framerate.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
[//]: # (This file is automatically generated by Cute Framework's docs parser.)
[//]: # (Do not edit this file by hand!)
[//]: # (See: https://github.com/RandyGaul/cute_framework/blob/master/samples/docs_parser.cpp)
[](../header.md ':include')

# cf_app_get_smoothed_framerate

Category: [app](/api_reference?id=app)
GitHub: [cute_app.h](https://github.com/RandyGaul/cute_framework/blob/master/include/cute_app.h)
---

Returns the smoothed framerate of the application. Last 60 frames are averaged. This values is controlled by `CF_FRAMERATE_SMOOTHING`.

```cpp
float cf_app_get_smoothed_framerate();
```

## Related Pages

[cf_app_get_framerate](/app/cf_app_get_framerate.md)
1 change: 1 addition & 0 deletions docs/app/cf_powerstate.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ The states of power for the application.

Enum | Description
--- | ---
POWER_STATE_ERROR | error determining power status.
POWER_STATE_UNKNOWN | Cannot determine power status.
POWER_STATE_ON_BATTERY | Not plugged in and running on battery.
POWER_STATE_NO_BATTERY | Plugged in with no battery available.
Expand Down
4 changes: 3 additions & 1 deletion samples/docs_parser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ const char* get_relative_path()
if (!g_relative_path) {
CF_Path path = cf_fs_get_base_directory();
path.normalize();
CF_Path dir = path.my_directory();
String dir = path.filename();
if (siequ(dir.c_str(), "debug") || siequ(dir.c_str(), "release")) {
g_relative_path = "../../docs";
} else {
Expand Down Expand Up @@ -839,5 +839,7 @@ int main(int argc, char* argv[])
}
#endif

printf("docsparser: Success!\n");

return 0;
}

0 comments on commit f7cceda

Please sign in to comment.