summaryrefslogtreecommitdiffhomepage
path: root/examples/core/core_custom_logging.c
diff options
context:
space:
mode:
authorRay <[email protected]>2022-06-21 19:53:18 +0200
committerRay <[email protected]>2022-06-21 19:53:18 +0200
commitc1b01c0d5d2f2bb5108df910b2376d45314e7335 (patch)
tree02b65387eacae0324a3ff28851fa43d78cd6fb09 /examples/core/core_custom_logging.c
parent8bd3ecaa66a2a13dca9f7b3532b2c8b1298b206b (diff)
downloadraylib-c1b01c0d5d2f2bb5108df910b2376d45314e7335.tar.gz
raylib-c1b01c0d5d2f2bb5108df910b2376d45314e7335.zip
Added new comment to examples
Diffstat (limited to 'examples/core/core_custom_logging.c')
-rw-r--r--examples/core/core_custom_logging.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/examples/core/core_custom_logging.c b/examples/core/core_custom_logging.c
index 56e168ee..5b39f428 100644
--- a/examples/core/core_custom_logging.c
+++ b/examples/core/core_custom_logging.c
@@ -17,7 +17,7 @@
#include <time.h> // Required for: time_t, tm, time(), localtime(), strftime()
// Custom logging funtion
-void LogCustom(int msgType, const char *text, va_list args)
+void CustomLog(int msgType, const char *text, va_list args)
{
char timeStr[64] = { 0 };
time_t now = time(NULL);
@@ -39,16 +39,18 @@ void LogCustom(int msgType, const char *text, va_list args)
printf("\n");
}
-int main(int argc, char* argv[])
+//------------------------------------------------------------------------------------
+// Program main entry point
+//------------------------------------------------------------------------------------
+int main(void)
{
// Initialization
//--------------------------------------------------------------------------------------
const int screenWidth = 800;
const int screenHeight = 450;
- // First thing we do is setting our custom logger to ensure everything raylib logs
- // will use our own logger instead of its internal one
- SetTraceLogCallback(LogCustom);
+ // Set custom logger
+ SetTraceLogCallback(CustomLog);
InitWindow(screenWidth, screenHeight, "raylib [core] example - custom logging");