From 37ce63878e4f2c727e2e168a279a3288e4d00ed2 Mon Sep 17 00:00:00 2001 From: Rabia Alhaffar Date: Fri, 12 Jun 2020 20:56:01 +0300 Subject: [PATCH] Added Execute function --- src/core.c | 9 +++++++++ src/raylib.h | 1 + 2 files changed, 10 insertions(+) diff --git a/src/core.c b/src/core.c index 934113ba4..1eb39bf6c 100644 --- a/src/core.c +++ b/src/core.c @@ -1207,6 +1207,15 @@ const char *GetOS(void) #endif } +void Execute(const char *command) +{ + #ifdef __ANDROID__ || TARGET_OS_IPHONE || TARGET_IPHONE_SIMULATOR || TARGET_OS_EMBEDDED + return NULL; + #else + system(command); + #endif +} + // Show mouse cursor void ShowCursor(void) { diff --git a/src/raylib.h b/src/raylib.h index 0bc989cd9..00c640141 100644 --- a/src/raylib.h +++ b/src/raylib.h @@ -899,6 +899,7 @@ RLAPI const char *GetMonitorName(int monitor); // Get the hum RLAPI const char *GetClipboardText(void); // Get clipboard text content RLAPI void SetClipboardText(const char *text); // Set clipboard text content RLAPI const char *GetOS(void); // Get current operating system +RLAPI void Execute(const char *command); // Executes a command from batch or shell // Cursor-related functions RLAPI void ShowCursor(void); // Shows cursor