8000 added loglevel to window constructor · RobLoach/raylib-cpp@f1d5514 · GitHub
[go: up one dir, main page]

Skip to content

Commit f1d5514

Browse files
committed
added loglevel to window constructor
1 parent 7305724 commit f1d5514

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

include/Window.hpp

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,14 +27,15 @@ class Window {
2727
* @param height The height of the window.
2828
* @param title The desired title of the window.
2929 * @param flags The ConfigFlags to set prior to initializing the window. See SetConfigFlags for more details.
30+
* @param logLevel The the current threshold (minimum) log level
3031
*
3132
* @see ::SetConfigFlags()
3233
* @see ConfigFlags
3334
*
3435
* @throws raylib::RaylibException Thrown if the window failed to initiate.
3536
*/
36-
Window(int width, int height, const std::string& title = "raylib", unsigned int flags = 0) {
37-
Init(width, height, title, flags);
37+
Window(int width, int height, const std::string& title = "raylib", unsigned int flags = 0, TraceLogLevel logLevel = LOG_ALL) {
38+
Init(width, height, title, flags, logLevel);
3839
}
3940

4041
/**
@@ -55,10 +56,11 @@ class Window {
5556
*
5657
* @throws raylib::RaylibException Thrown if the window failed to initiate.
5758
*/
58-
static void Init(int width = 800, int height = 450, const std::string& title = "raylib", unsigned int flags = 0) {
59+
static void Init(int width = 800, int height = 450, const std::string& title = "raylib", unsigned int flags = 0, TraceLogLevel logLevel = LOG_ALL) {
5960
if (flags != 0) {
6061
::SetConfigFlags(flags);
6162
}
63+
::SetTraceLogLevel(logLevel);
6264
::InitWindow(width, height, title.c_str());
6365
if (!::IsWindowReady()) {
6466
throw RaylibException("Failed to create Window");

0 commit comments

Comments
 (0)
0