Merge branch 'raysan5:master' into new-example-shaders-lights-bloom
This commit is contained in:
commit
461d6e0040
5 changed files with 42 additions and 10 deletions
|
|
@ -36,6 +36,7 @@ Some people ported raylib to other languages in the form of bindings or wrappers
|
|||
| [raylib-elfscript](https://github.com/ohmtal/raylib-elfscript) | 6.0 | [ElfScript](https://github.com/ohmtal/ElfScript) | MIT |
|
||||
| [raylib-elle](https://github.com/acquitelol/elle/blob/rewrite/std/raylib.le) | **5.5** | [Elle](https://github.com/acquitelol/elle) | GPL-3.0 |
|
||||
| [raylib-factor](https://github.com/factor/factor/blob/master/extra/raylib/raylib.factor) | 5.5 | [Factor](https://factorcode.org) | BSD |
|
||||
| [raystar](https://github.com/RobertFlexx/raystar) | **6.0** | [F*](https://www.fstar-lang.org/) | EPL-2.0 |
|
||||
| [raylib4fb](https://github.com/mudhairless/raylib4fb) | **6.0** | [FreeBASIC](https://www.freebasic.net) | Zlib |
|
||||
| [raylib-freebasic](https://github.com/WIITD/raylib-freebasic) | **5.0** | [FreeBASIC](https://www.freebasic.net) | MIT |
|
||||
| [raylib.f](https://github.com/cthulhuology/raylib.f) | **5.5** | [Forth](https://forth.com) | Zlib |
|
||||
|
|
@ -59,6 +60,7 @@ Some people ported raylib to other languages in the form of bindings or wrappers
|
|||
| [raylib-luajit](https://github.com/homma/raylib-luajit) | 5.5 | [Lua](http://www.lua.org) | MIT |
|
||||
| [raylib-luajit-generated](https://github.com/james2doyle/raylib-luajit-generated) | 5.5 | [Lua](http://www.lua.org) | MIT |
|
||||
| [raylib-matte](https://github.com/jcorks/raylib-matte) | 4.6-dev | [Matte](https://github.com/jcorks/matte) | **???** |
|
||||
| [raymojo](https://github.com/RobertFlexx/raymojo) | **6.0** | [Mojo](https://www.modular.com/mojo) | GPLv3 |
|
||||
| [raymod](https://github.com/RobertFlexx/raymod) | **6.0** | [Modula-2](https://en.wikipedia.org/wiki/Modula-2) / [Modula-3](https://en.wikipedia.org/wiki/Modula-3) | Apache-2.0 |
|
||||
| [Raylib.nelua](https://github.com/AuzFox/Raylib.nelua) | **5.5** | [nelua](https://nelua.io) | Zlib |
|
||||
| [raylib-bindings](https://github.com/vaiorabbit/raylib-bindings) | 5.6-dev | [Ruby](https://www.ruby-lang.org/en) | Zlib |
|
||||
|
|
|
|||
11
README.md
11
README.md
|
|
@ -54,6 +54,17 @@ features
|
|||
- Bindings to [+70 programming languages](https://github.com/raysan5/raylib/blob/master/BINDINGS.md)!
|
||||
- **Free and open source**
|
||||
|
||||
limitations
|
||||
-----------
|
||||
|
||||
raylib presents some limitation by design for code simplicity, some forks, alternatives and samples are available to overcome most of them but it's up to the users to modify the library for their specific needs.
|
||||
|
||||
- Single window with single OpenGL context by default, no multi-window support
|
||||
- Window resize and move stops the rendering loop on platforms supporting a window
|
||||
- `RenderTextures` are flipped vertically, as provided by OpenGL, it's up to user to draw then flipped to screen
|
||||
- Font rasterization has lower quality than alternatives using `Freetype2`, `HarfBuzz` or `Slug`
|
||||
- Text drawing does not support RTL, ligatures or emojis
|
||||
|
||||
basic example
|
||||
--------------
|
||||
This is a basic raylib example, it creates a window and draws the text `"Congrats! You created your first window!"` in the middle of the screen. Check this example [running live on web here](https://www.raylib.com/examples/core/loader.html?name=core_basic_window).
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@
|
|||
# > PLATFORM_DESKTOP_RGFW (RGFW backend):
|
||||
# - Windows (Win32, Win64)
|
||||
# - Linux (X11 desktop mode)
|
||||
# - macOS/OSX (x64, arm64 (not tested))
|
||||
# - macOS/OSX (x64, arm64)
|
||||
# - Others (not tested)
|
||||
# > PLATFORM_DESKTOP_WIN32 (native Win32):
|
||||
# - Windows (Win32, Win64)
|
||||
|
|
@ -314,6 +314,9 @@ ifeq ($(TARGET_PLATFORM),PLATFORM_DESKTOP_GLFW)
|
|||
ifeq ($(PLATFORM_OS),BSD)
|
||||
LDFLAGS += -Lsrc -L$(RAYLIB_LIB_PATH)
|
||||
endif
|
||||
ifeq ($(PLATFORM_OS),OSX)
|
||||
LDFLAGS += -L/opt/homebrew/lib -L$(RAYLIB_LIB_PATH)
|
||||
endif
|
||||
endif
|
||||
ifeq ($(TARGET_PLATFORM),PLATFORM_DESKTOP_SDL)
|
||||
ifeq ($(PLATFORM_OS),WINDOWS)
|
||||
|
|
|
|||
|
|
@ -287,8 +287,14 @@ void ToggleBorderlessWindowed(void)
|
|||
CORE.Window.screen.height = mode->height;
|
||||
|
||||
// Set screen position and size
|
||||
#if defined(_WIN32)
|
||||
// NOTE: To prevent the fullscreen window from always staying on top, don't pass a monitor at this point.
|
||||
glfwSetWindowMonitor(platform.handle, NULL, CORE.Window.position.x, CORE.Window.position.y,
|
||||
CORE.Window.screen.width, CORE.Window.screen.height, mode->refreshRate);
|
||||
#else
|
||||
glfwSetWindowMonitor(platform.handle, monitors[monitor], CORE.Window.position.x, CORE.Window.position.y,
|
||||
CORE.Window.screen.width, CORE.Window.screen.height, mode->refreshRate);
|
||||
#endif
|
||||
|
||||
// Refocus window
|
||||
glfwFocusWindow(platform.handle);
|
||||
|
|
@ -1024,6 +1030,8 @@ const char *GetMonitorName(int monitor)
|
|||
// Get window position XY on monitor
|
||||
Vector2 GetWindowPosition(void)
|
||||
{
|
||||
glfwGetWindowPos(platform.handle, &CORE.Window.position.x, &CORE.Window.position.y);
|
||||
|
||||
return (Vector2){ (float)CORE.Window.position.x, (float)CORE.Window.position.y };
|
||||
}
|
||||
|
||||
|
|
|
|||
24
src/rcore.c
24
src/rcore.c
|
|
@ -2583,19 +2583,27 @@ const char *GetPrevDirectoryPath(const char *dirPath)
|
|||
{
|
||||
static char prevDirPath[MAX_FILEPATH_LENGTH] = { 0 };
|
||||
memset(prevDirPath, 0, MAX_FILEPATH_LENGTH);
|
||||
int dirPathLength = (int)strlen(dirPath);
|
||||
|
||||
if (dirPathLength <= 3) snprintf(prevDirPath, MAX_FILEPATH_LENGTH, "%s", dirPath);
|
||||
|
||||
for (int i = (dirPathLength - 1); (i >= 0) && (dirPathLength > 3); i--)
|
||||
const int lastIndex = (int)strlen(dirPath) - 1;
|
||||
bool isFile = IsPathFile(dirPath);
|
||||
for (int i = lastIndex; i >= 0; i--)
|
||||
{
|
||||
// If the character is a path separator.
|
||||
if ((dirPath[i] == '\\') || (dirPath[i] == '/'))
|
||||
{
|
||||
// Check for root: "C:\" or "/"
|
||||
if (((i == 2) && (dirPath[1] ==':')) || (i == 0)) i++;
|
||||
// If this character is a leading '/' (e.g. the '/' in "/usr") or
|
||||
// part of a drive root (e.g. "C:\"), include it with the result.
|
||||
if ((i == 0) || ((i == 2) && (dirPath[1] == ':'))) i += 1;
|
||||
// If this character is a trailing path separator (e.g. the last
|
||||
// '/' in "/usr/bin/" or the last '\' in "C:\raylib\"), continue.
|
||||
else if (i == lastIndex) continue;
|
||||
|
||||
memcpy(prevDirPath, dirPath, i);
|
||||
break;
|
||||
if (!isFile)
|
||||
{
|
||||
memcpy(prevDirPath, dirPath, i);
|
||||
break;
|
||||
}
|
||||
else isFile = false;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue