diff options
| author | Ray <[email protected]> | 2017-09-26 09:13:16 +0200 |
|---|---|---|
| committer | GitHub <[email protected]> | 2017-09-26 09:13:16 +0200 |
| commit | 4a63e5dfb3006483cace85c8161d12057a9e8488 (patch) | |
| tree | 53f1ca68df7c2d398a157a825c21fc4ea704f07d /src/core.c | |
| parent | 7ca90d87f9fa6f399d3316df347c63baf0eb675d (diff) | |
| parent | 5ace947a809d32d0177334933b0709b3164a79d5 (diff) | |
| download | raylib-4a63e5dfb3006483cace85c8161d12057a9e8488.tar.gz raylib-4a63e5dfb3006483cace85c8161d12057a9e8488.zip | |
Merge pull request #360 from raysan5/develop
Integrate Develop branch
Diffstat (limited to 'src/core.c')
| -rw-r--r-- | src/core.c | 18 |
1 files changed, 18 insertions, 0 deletions
@@ -659,6 +659,14 @@ void SetWindowIcon(Image image) #endif } +// Set title for window (only PLATFORM_DESKTOP) +void SetWindowTitle(const char *title) +{ +#if defined(PLATFORM_DESKTOP) + glfwSetWindowTitle(window, title); +#endif +} + // Set window position on screen (windowed mode) void SetWindowPosition(int x, int y) { @@ -1152,6 +1160,16 @@ bool IsFileExtension(const char *fileName, const char *ext) return result; } +// Get the extension for a filename +const char *GetExtension(const char *fileName) +{ + const char *dot = strrchr(fileName, '.'); + + if (!dot || dot == fileName) return ""; + + return (dot + 1); +} + // Get directory for a given fileName (with path) const char *GetDirectoryPath(const char *fileName) { |
