Merge branch 'raysan5:master' into fix-ToggleBorderlessWindowed
This commit is contained in:
commit
2d225145d7
|
|
@ -21,7 +21,7 @@ Some people ported raylib to other languages in the form of bindings or wrappers
|
||||||
| [ray-cyber](https://github.com/fubark/ray-cyber) | **5.0** | [Cyber](https://cyberscript.dev) | MIT |
|
| [ray-cyber](https://github.com/fubark/ray-cyber) | **5.0** | [Cyber](https://cyberscript.dev) | MIT |
|
||||||
| [dart-raylib](https://gitlab.com/wolfenrain/dart-raylib) | 4.0 | [Dart](https://dart.dev) | MIT |
|
| [dart-raylib](https://gitlab.com/wolfenrain/dart-raylib) | 4.0 | [Dart](https://dart.dev) | MIT |
|
||||||
| [bindbc-raylib3](https://github.com/o3o/bindbc-raylib3) | **5.0** | [D](https://dlang.org) | BSL-1.0 |
|
| [bindbc-raylib3](https://github.com/o3o/bindbc-raylib3) | **5.0** | [D](https://dlang.org) | BSL-1.0 |
|
||||||
| [dray](https://github.com/redthing1/dray) | 4.2 | [D](https://dlang.org) | Apache-2.0 |
|
| [dray](https://github.com/redthing1/dray) | **5.0** | [D](https://dlang.org) | Apache-2.0 |
|
||||||
| [raylib-d](https://github.com/schveiguy/raylib-d) | **5.0** | [D](https://dlang.org) | Zlib |
|
| [raylib-d](https://github.com/schveiguy/raylib-d) | **5.0** | [D](https://dlang.org) | Zlib |
|
||||||
| [rayex](https://github.com/shiryel/rayex) | 3.7 | [elixir](https://elixir-lang.org) | Apache-2.0 |
|
| [rayex](https://github.com/shiryel/rayex) | 3.7 | [elixir](https://elixir-lang.org) | Apache-2.0 |
|
||||||
| [raylib-factor](https://github.com/factor/factor/blob/master/extra/raylib/raylib.factor) | 4.5 | [Factor](https://factorcode.org) | BSD |
|
| [raylib-factor](https://github.com/factor/factor/blob/master/extra/raylib/raylib.factor) | 4.5 | [Factor](https://factorcode.org) | BSD |
|
||||||
|
|
|
||||||
|
|
@ -11,7 +11,6 @@ endfunction()
|
||||||
|
|
||||||
if(${CUSTOMIZE_BUILD})
|
if(${CUSTOMIZE_BUILD})
|
||||||
target_compile_definitions("raylib" PRIVATE EXTERNAL_CONFIG_FLAGS)
|
target_compile_definitions("raylib" PRIVATE EXTERNAL_CONFIG_FLAGS)
|
||||||
define_if("raylib" USE_AUDIO)
|
|
||||||
|
|
||||||
foreach(FLAG IN LISTS CONFIG_HEADER_FLAGS)
|
foreach(FLAG IN LISTS CONFIG_HEADER_FLAGS)
|
||||||
string(REGEX MATCH "([^=]+)=(.+)" _ ${FLAG})
|
string(REGEX MATCH "([^=]+)=(.+)" _ ${FLAG})
|
||||||
|
|
|
||||||
|
|
@ -29,6 +29,7 @@ set(raylib_public_headers
|
||||||
|
|
||||||
# Sources to be compiled
|
# Sources to be compiled
|
||||||
set(raylib_sources
|
set(raylib_sources
|
||||||
|
raudio.c
|
||||||
rcore.c
|
rcore.c
|
||||||
rmodels.c
|
rmodels.c
|
||||||
rshapes.c
|
rshapes.c
|
||||||
|
|
@ -47,14 +48,12 @@ endif ()
|
||||||
# Produces a variable LIBS_PRIVATE that will be used later
|
# Produces a variable LIBS_PRIVATE that will be used later
|
||||||
include(LibraryConfigurations)
|
include(LibraryConfigurations)
|
||||||
|
|
||||||
if (USE_AUDIO)
|
if (SUPPORT_MODULE_RAUDIO)
|
||||||
MESSAGE(STATUS "Audio Backend: miniaudio")
|
MESSAGE(STATUS "Audio Backend: miniaudio")
|
||||||
list(APPEND raylib_sources raudio.c)
|
|
||||||
else ()
|
else ()
|
||||||
MESSAGE(STATUS "Audio Backend: None (-DUSE_AUDIO=OFF)")
|
MESSAGE(STATUS "Audio Backend: None (-DCUSTOMIZE_BUILD=ON -DSUPPORT_MODULE_RAUDIO=OFF)")
|
||||||
endif ()
|
endif ()
|
||||||
|
|
||||||
|
|
||||||
add_library(raylib ${raylib_sources} ${raylib_public_headers})
|
add_library(raylib ${raylib_sources} ${raylib_public_headers})
|
||||||
|
|
||||||
if (NOT BUILD_SHARED_LIBS)
|
if (NOT BUILD_SHARED_LIBS)
|
||||||
|
|
|
||||||
|
|
@ -117,13 +117,13 @@ fn compileRaylib(b: *std.Build, target: std.Build.ResolvedTarget, optimize: std.
|
||||||
|
|
||||||
raylib.addLibraryPath(.{ .cwd_relative = "/usr/lib" });
|
raylib.addLibraryPath(.{ .cwd_relative = "/usr/lib" });
|
||||||
raylib.addIncludePath(.{ .cwd_relative = "/usr/include" });
|
raylib.addIncludePath(.{ .cwd_relative = "/usr/include" });
|
||||||
|
if (options.linux_display_backend == .X11 or options.linux_display_backend == .Both) {
|
||||||
|
|
||||||
switch (options.linux_display_backend) {
|
|
||||||
.X11 => {
|
|
||||||
raylib.defineCMacro("_GLFW_X11", null);
|
raylib.defineCMacro("_GLFW_X11", null);
|
||||||
raylib.linkSystemLibrary("X11");
|
raylib.linkSystemLibrary("X11");
|
||||||
},
|
}
|
||||||
.Wayland => {
|
|
||||||
|
if (options.linux_display_backend == .Wayland or options.linux_display_backend == .Both) {
|
||||||
raylib.defineCMacro("_GLFW_WAYLAND", null);
|
raylib.defineCMacro("_GLFW_WAYLAND", null);
|
||||||
raylib.linkSystemLibrary("wayland-client");
|
raylib.linkSystemLibrary("wayland-client");
|
||||||
raylib.linkSystemLibrary("wayland-cursor");
|
raylib.linkSystemLibrary("wayland-cursor");
|
||||||
|
|
@ -139,9 +139,7 @@ fn compileRaylib(b: *std.Build, target: std.Build.ResolvedTarget, optimize: std.
|
||||||
waylandGenerate(b, raylib, "fractional-scale-v1.xml", "fractional-scale-v1-client-protocol");
|
waylandGenerate(b, raylib, "fractional-scale-v1.xml", "fractional-scale-v1-client-protocol");
|
||||||
waylandGenerate(b, raylib, "xdg-activation-v1.xml", "xdg-activation-v1-client-protocol");
|
waylandGenerate(b, raylib, "xdg-activation-v1.xml", "xdg-activation-v1-client-protocol");
|
||||||
waylandGenerate(b, raylib, "idle-inhibit-unstable-v1.xml", "idle-inhibit-unstable-v1-client-protocol");
|
waylandGenerate(b, raylib, "idle-inhibit-unstable-v1.xml", "idle-inhibit-unstable-v1-client-protocol");
|
||||||
},
|
|
||||||
}
|
}
|
||||||
|
|
||||||
raylib.defineCMacro("PLATFORM_DESKTOP", null);
|
raylib.defineCMacro("PLATFORM_DESKTOP", null);
|
||||||
} else {
|
} else {
|
||||||
if (options.opengl_version == .auto) {
|
if (options.opengl_version == .auto) {
|
||||||
|
|
@ -253,7 +251,7 @@ pub const Options = struct {
|
||||||
raygui: bool = false,
|
raygui: bool = false,
|
||||||
platform_drm: bool = false,
|
platform_drm: bool = false,
|
||||||
shared: bool = false,
|
shared: bool = false,
|
||||||
linux_display_backend: LinuxDisplayBackend = .X11,
|
linux_display_backend: LinuxDisplayBackend = .Both,
|
||||||
opengl_version: OpenglVersion = .auto,
|
opengl_version: OpenglVersion = .auto,
|
||||||
|
|
||||||
raygui_dependency_name: []const u8 = "raygui",
|
raygui_dependency_name: []const u8 = "raygui",
|
||||||
|
|
@ -284,6 +282,7 @@ pub const OpenglVersion = enum {
|
||||||
pub const LinuxDisplayBackend = enum {
|
pub const LinuxDisplayBackend = enum {
|
||||||
X11,
|
X11,
|
||||||
Wayland,
|
Wayland,
|
||||||
|
Both,
|
||||||
};
|
};
|
||||||
|
|
||||||
pub fn build(b: *std.Build) !void {
|
pub fn build(b: *std.Build) !void {
|
||||||
|
|
|
||||||
2
src/external/miniaudio.h
vendored
2
src/external/miniaudio.h
vendored
|
|
@ -21473,7 +21473,9 @@ static ma_result ma_context_get_MMDevice__wasapi(ma_context* pContext, ma_device
|
||||||
MA_ASSERT(pContext != NULL);
|
MA_ASSERT(pContext != NULL);
|
||||||
MA_ASSERT(ppMMDevice != NULL);
|
MA_ASSERT(ppMMDevice != NULL);
|
||||||
|
|
||||||
|
ma_CoInitializeEx(pContext, NULL, MA_COINIT_VALUE);
|
||||||
hr = ma_CoCreateInstance(pContext, &MA_CLSID_MMDeviceEnumerator, NULL, CLSCTX_ALL, &MA_IID_IMMDeviceEnumerator, (void**)&pDeviceEnumerator);
|
hr = ma_CoCreateInstance(pContext, &MA_CLSID_MMDeviceEnumerator, NULL, CLSCTX_ALL, &MA_IID_IMMDeviceEnumerator, (void**)&pDeviceEnumerator);
|
||||||
|
ma_CoUninitialize(pContext);
|
||||||
if (FAILED(hr)) {
|
if (FAILED(hr)) {
|
||||||
ma_log_postf(ma_context_get_log(pContext), MA_LOG_LEVEL_ERROR, "[WASAPI] Failed to create IMMDeviceEnumerator.\n");
|
ma_log_postf(ma_context_get_log(pContext), MA_LOG_LEVEL_ERROR, "[WASAPI] Failed to create IMMDeviceEnumerator.\n");
|
||||||
return ma_result_from_HRESULT(hr);
|
return ma_result_from_HRESULT(hr);
|
||||||
|
|
|
||||||
|
|
@ -632,6 +632,13 @@ void SetMouseCursor(int cursor)
|
||||||
TRACELOG(LOG_WARNING, "SetMouseCursor() not implemented on target platform");
|
TRACELOG(LOG_WARNING, "SetMouseCursor() not implemented on target platform");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Get physical key name.
|
||||||
|
const char *GetKeyName(int key)
|
||||||
|
{
|
||||||
|
TRACELOG(LOG_WARNING, "GetKeyName() not implemented on target platform");
|
||||||
|
return "";
|
||||||
|
}
|
||||||
|
|
||||||
// Register all input events
|
// Register all input events
|
||||||
void PollInputEvents(void)
|
void PollInputEvents(void)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -1094,6 +1094,12 @@ void SetMouseCursor(int cursor)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Get physical key name.
|
||||||
|
const char *GetKeyName(int key)
|
||||||
|
{
|
||||||
|
return glfwGetKeyName(key, glfwGetKeyScancode(key));
|
||||||
|
}
|
||||||
|
|
||||||
// Register all input events
|
// Register all input events
|
||||||
void PollInputEvents(void)
|
void PollInputEvents(void)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -756,6 +756,13 @@ void SetMouseCursor(int cursor)
|
||||||
RGFW_window_setMouseStandard(platform.window, cursor);
|
RGFW_window_setMouseStandard(platform.window, cursor);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Get physical key name.
|
||||||
|
const char *GetKeyName(int key)
|
||||||
|
{
|
||||||
|
TRACELOG(LOG_WARNING, "GetKeyName() not implemented on target platform");
|
||||||
|
return "";
|
||||||
|
}
|
||||||
|
|
||||||
static KeyboardKey ConvertScancodeToKey(u32 keycode);
|
static KeyboardKey ConvertScancodeToKey(u32 keycode);
|
||||||
|
|
||||||
// TODO: Review function to avoid duplicate with RSGL
|
// TODO: Review function to avoid duplicate with RSGL
|
||||||
|
|
|
||||||
|
|
@ -966,6 +966,12 @@ void SetMouseCursor(int cursor)
|
||||||
CORE.Input.Mouse.cursor = cursor;
|
CORE.Input.Mouse.cursor = cursor;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Get physical key name.
|
||||||
|
const char *GetKeyName(int key)
|
||||||
|
{
|
||||||
|
return SDL_GetKeyName(key);
|
||||||
|
}
|
||||||
|
|
||||||
static void UpdateTouchPointsSDL(SDL_TouchFingerEvent event)
|
static void UpdateTouchPointsSDL(SDL_TouchFingerEvent event)
|
||||||
{
|
{
|
||||||
CORE.Input.Touch.pointCount = SDL_GetNumTouchFingers(event.touchId);
|
CORE.Input.Touch.pointCount = SDL_GetNumTouchFingers(event.touchId);
|
||||||
|
|
|
||||||
|
|
@ -628,6 +628,13 @@ void SetMouseCursor(int cursor)
|
||||||
TRACELOG(LOG_WARNING, "SetMouseCursor() not implemented on target platform");
|
TRACELOG(LOG_WARNING, "SetMouseCursor() not implemented on target platform");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Get physical key name.
|
||||||
|
const char *GetKeyName(int key)
|
||||||
|
{
|
||||||
|
TRACELOG(LOG_WARNING, "GetKeyName() not implemented on target platform");
|
||||||
|
return "";
|
||||||
|
}
|
||||||
|
|
||||||
// Register all input events
|
// Register all input events
|
||||||
void PollInputEvents(void)
|
void PollInputEvents(void)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -384,6 +384,13 @@ void SetMouseCursor(int cursor)
|
||||||
TRACELOG(LOG_WARNING, "SetMouseCursor() not implemented on target platform");
|
TRACELOG(LOG_WARNING, "SetMouseCursor() not implemented on target platform");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Get physical key name.
|
||||||
|
const char *GetKeyName(int key)
|
||||||
|
{
|
||||||
|
TRACELOG(LOG_WARNING, "GetKeyName() not implemented on target platform");
|
||||||
|
return "";
|
||||||
|
}
|
||||||
|
|
||||||
// Register all input events
|
// Register all input events
|
||||||
void PollInputEvents(void)
|
void PollInputEvents(void)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -884,6 +884,13 @@ void SetMouseCursor(int cursor)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Get physical key name.
|
||||||
|
const char *GetKeyName(int key)
|
||||||
|
{
|
||||||
|
TRACELOG(LOG_WARNING, "GetKeyName() not implemented on target platform");
|
||||||
|
return "";
|
||||||
|
}
|
||||||
|
|
||||||
// Register all input events
|
// Register all input events
|
||||||
void PollInputEvents(void)
|
void PollInputEvents(void)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -4401,7 +4401,7 @@ unsigned int rlGetShaderBufferSize(unsigned int id)
|
||||||
|
|
||||||
#if defined(GRAPHICS_API_OPENGL_43)
|
#if defined(GRAPHICS_API_OPENGL_43)
|
||||||
glBindBuffer(GL_SHADER_STORAGE_BUFFER, id);
|
glBindBuffer(GL_SHADER_STORAGE_BUFFER, id);
|
||||||
glGetInteger64v(GL_SHADER_STORAGE_BUFFER_SIZE, &size);
|
glGetBufferParameteri64v(GL_SHADER_STORAGE_BUFFER, GL_BUFFER_SIZE, &size);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
return (size > 0)? (unsigned int)size : 0;
|
return (size > 0)? (unsigned int)size : 0;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user