Merge branch 'master' of https://github.com/raysan5/raylib
This commit is contained in:
commit
200d344dee
|
|
@ -106,6 +106,7 @@ Some people ported raylib to other languages in the form of bindings or wrappers
|
||||||
| [fnl-raylib](https://github.com/0riginaln0/fnl-raylib) | **5.5** | [Fennel](https://fennel-lang.org/) | MIT |
|
| [fnl-raylib](https://github.com/0riginaln0/fnl-raylib) | **5.5** | [Fennel](https://fennel-lang.org/) | MIT |
|
||||||
| [Rayua](https://github.com/uiua-lang/rayua) | **5.5** | [Uiua](https://www.uiua.org/) | **???** |
|
| [Rayua](https://github.com/uiua-lang/rayua) | **5.5** | [Uiua](https://www.uiua.org/) | **???** |
|
||||||
| [Target](https://github.com/FinnDemonCat/Target/tree/main/libs/raylib) | **5.5** | [Dart](https://dart.dev/) | Apache-2.0 license |
|
| [Target](https://github.com/FinnDemonCat/Target/tree/main/libs/raylib) | **5.5** | [Dart](https://dart.dev/) | Apache-2.0 license |
|
||||||
|
| [gclang-raylib](https://github.com/gnuchanos/gcLang_Compiler/tree/main/windows_version/raylib_version)| **6.0** | [gclang](https://github.com/gnuchanos/gcLang_Compiler) | AGPL-3.0 |
|
||||||
|
|
||||||
|
|
||||||
### Utility Wrapers
|
### Utility Wrapers
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,7 @@ if(EMSCRIPTEN)
|
||||||
# When configuring web builds with "emcmake cmake -B build -S .", set PLATFORM to Web by default
|
# When configuring web builds with "emcmake cmake -B build -S .", set PLATFORM to Web by default
|
||||||
SET(PLATFORM Web CACHE STRING "Platform to build for.")
|
SET(PLATFORM Web CACHE STRING "Platform to build for.")
|
||||||
endif()
|
endif()
|
||||||
enum_option(PLATFORM "Desktop;Web;WebRGFW;Android;Raspberry Pi;DRM;SDL;RGFW;Memory" "Platform to build for.")
|
enum_option(PLATFORM "Desktop;Win32;Web;WebRGFW;Android;Raspberry Pi;DRM;SDL;RGFW;Memory" "Platform to build for.")
|
||||||
|
|
||||||
enum_option(OPENGL_VERSION "OFF;4.3;3.3;2.1;1.1;ES 2.0;ES 3.0;Software" "Force a specific OpenGL Version?")
|
enum_option(OPENGL_VERSION "OFF;4.3;3.3;2.1;1.1;ES 2.0;ES 3.0;Software" "Force a specific OpenGL Version?")
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -91,6 +91,21 @@ if (${PLATFORM} STREQUAL "Desktop")
|
||||||
endif ()
|
endif ()
|
||||||
endif ()
|
endif ()
|
||||||
|
|
||||||
|
elseif (${PLATFORM} STREQUAL "Win32")
|
||||||
|
if ((NOT WIN32) AND (NOT CMAKE_C_COMPILER MATCHES "mingw|mingw32|mingw64"))
|
||||||
|
message(FATAL_ERROR "Win32 platform requires Windows or a cross compiler.")
|
||||||
|
endif ()
|
||||||
|
|
||||||
|
set(PLATFORM_CPP "PLATFORM_DESKTOP_WIN32")
|
||||||
|
add_definitions(-D_CRT_SECURE_NO_WARNINGS)
|
||||||
|
|
||||||
|
if (${OPENGL_VERSION} MATCHES "Software")
|
||||||
|
set(GRAPHICS "GRAPHICS_API_OPENGL_SOFTWARE")
|
||||||
|
endif ()
|
||||||
|
|
||||||
|
find_package(OpenGL QUIET)
|
||||||
|
set(LIBS_PRIVATE ${OPENGL_LIBRARIES} winmm)
|
||||||
|
|
||||||
elseif (${PLATFORM} STREQUAL "Web")
|
elseif (${PLATFORM} STREQUAL "Web")
|
||||||
set(PLATFORM_CPP "PLATFORM_WEB")
|
set(PLATFORM_CPP "PLATFORM_WEB")
|
||||||
if(NOT GRAPHICS)
|
if(NOT GRAPHICS)
|
||||||
|
|
|
||||||
|
|
@ -20,6 +20,8 @@
|
||||||
# - Linux (X11 desktop mode)
|
# - Linux (X11 desktop mode)
|
||||||
# - macOS/OSX (x64, arm64 (not tested))
|
# - macOS/OSX (x64, arm64 (not tested))
|
||||||
# - Others (not tested)
|
# - Others (not tested)
|
||||||
|
# > PLATFORM_DESKTOP_WIN32 (native Win32):
|
||||||
|
# - Windows (Win32, Win64)
|
||||||
# > PLATFORM_WEB_RGFW:
|
# > PLATFORM_WEB_RGFW:
|
||||||
# - HTML5 (WebAssembly)
|
# - HTML5 (WebAssembly)
|
||||||
# > PLATFORM_WEB:
|
# > PLATFORM_WEB:
|
||||||
|
|
@ -794,6 +796,23 @@ ifeq ($(TARGET_PLATFORM),PLATFORM_DESKTOP_GLFW)
|
||||||
rm -f *.o
|
rm -f *.o
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
ifeq ($(TARGET_PLATFORM),PLATFORM_DESKTOP_WIN32)
|
||||||
|
ifeq ($(PLATFORM_OS),WINDOWS)
|
||||||
|
del *.o *.exe /s
|
||||||
|
endif
|
||||||
|
ifeq ($(PLATFORM_OS),BSD)
|
||||||
|
find . -type f -perm -ugo+x -delete
|
||||||
|
rm -fv *.o
|
||||||
|
endif
|
||||||
|
ifeq ($(PLATFORM_OS),LINUX)
|
||||||
|
find . -type f -executable -delete
|
||||||
|
rm -fv *.o
|
||||||
|
endif
|
||||||
|
ifeq ($(PLATFORM_OS),OSX)
|
||||||
|
find . -type f -perm +ugo+x -delete
|
||||||
|
rm -f *.o
|
||||||
|
endif
|
||||||
|
endif
|
||||||
ifeq ($(TARGET_PLATFORM),PLATFORM_DRM)
|
ifeq ($(TARGET_PLATFORM),PLATFORM_DRM)
|
||||||
find . -type f -executable -delete
|
find . -type f -executable -delete
|
||||||
rm -fv *.o
|
rm -fv *.o
|
||||||
|
|
|
||||||
4
src/external/jar_mod.h
vendored
4
src/external/jar_mod.h
vendored
|
|
@ -1538,10 +1538,10 @@ mulong jar_mod_load_file(jar_mod_context_t * modctx, const char* filename)
|
||||||
modctx->modfile = (muchar *) JARMOD_MALLOC(fsize);
|
modctx->modfile = (muchar *) JARMOD_MALLOC(fsize);
|
||||||
modctx->modfilesize = fsize;
|
modctx->modfilesize = fsize;
|
||||||
memset(modctx->modfile, 0, fsize);
|
memset(modctx->modfile, 0, fsize);
|
||||||
fread(modctx->modfile, fsize, 1, f);
|
if(fread(modctx->modfile, fsize, 1, f) != 1) fsize = 0;
|
||||||
fclose(f);
|
fclose(f);
|
||||||
|
|
||||||
if(!jar_mod_load(modctx, (void *)modctx->modfile, fsize)) fsize = 0;
|
if(fsize && !jar_mod_load(modctx, (void *)modctx->modfile, fsize)) fsize = 0;
|
||||||
} else fsize = 0;
|
} else fsize = 0;
|
||||||
}
|
}
|
||||||
return fsize;
|
return fsize;
|
||||||
|
|
|
||||||
|
|
@ -1273,20 +1273,19 @@ static int32_t AndroidInputCallback(struct android_app *app, AInputEvent *event)
|
||||||
int32_t keycode = AKeyEvent_getKeyCode(event);
|
int32_t keycode = AKeyEvent_getKeyCode(event);
|
||||||
//int32_t AKeyEvent_getMetaState(event);
|
//int32_t AKeyEvent_getMetaState(event);
|
||||||
|
|
||||||
// Handle gamepad button presses and releases
|
// Handle gamepad button presses and releases. AOSP stamps the
|
||||||
// NOTE: Skip gamepad handling if this is a keyboard event, as some devices
|
// KEYBOARD source bit on every key event from a gamepad, so
|
||||||
// report both AINPUT_SOURCE_KEYBOARD and AINPUT_SOURCE_GAMEPAD flags
|
// discriminate on the keycode rather than gating on source bits.
|
||||||
if ((FLAG_IS_SET(source, AINPUT_SOURCE_JOYSTICK) ||
|
if (FLAG_IS_SET(source, AINPUT_SOURCE_JOYSTICK) ||
|
||||||
FLAG_IS_SET(source, AINPUT_SOURCE_GAMEPAD)) &&
|
FLAG_IS_SET(source, AINPUT_SOURCE_GAMEPAD))
|
||||||
!FLAG_IS_SET(source, AINPUT_SOURCE_KEYBOARD))
|
{
|
||||||
|
GamepadButton button = AndroidTranslateGamepadButton(keycode);
|
||||||
|
|
||||||
|
if (button != GAMEPAD_BUTTON_UNKNOWN)
|
||||||
{
|
{
|
||||||
// Assuming a single gamepad, "detected" on its input event
|
// Assuming a single gamepad, "detected" on its input event
|
||||||
CORE.Input.Gamepad.ready[0] = true;
|
CORE.Input.Gamepad.ready[0] = true;
|
||||||
|
|
||||||
GamepadButton button = AndroidTranslateGamepadButton(keycode);
|
|
||||||
|
|
||||||
if (button == GAMEPAD_BUTTON_UNKNOWN) return 1;
|
|
||||||
|
|
||||||
if (AKeyEvent_getAction(event) == AKEY_EVENT_ACTION_DOWN)
|
if (AKeyEvent_getAction(event) == AKEY_EVENT_ACTION_DOWN)
|
||||||
{
|
{
|
||||||
CORE.Input.Gamepad.currentButtonState[0][button] = 1;
|
CORE.Input.Gamepad.currentButtonState[0][button] = 1;
|
||||||
|
|
@ -1295,6 +1294,8 @@ static int32_t AndroidInputCallback(struct android_app *app, AInputEvent *event)
|
||||||
|
|
||||||
return 1; // Handled gamepad button
|
return 1; // Handled gamepad button
|
||||||
}
|
}
|
||||||
|
// Unknown keycode: fall through to the keyboard handler below.
|
||||||
|
}
|
||||||
|
|
||||||
KeyboardKey key = ((keycode > 0) && (keycode < KEYCODE_MAP_SIZE))? mapKeycode[keycode] : KEY_NULL;
|
KeyboardKey key = ((keycode > 0) && (keycode < KEYCODE_MAP_SIZE))? mapKeycode[keycode] : KEY_NULL;
|
||||||
if (key != KEY_NULL)
|
if (key != KEY_NULL)
|
||||||
|
|
|
||||||
|
|
@ -1048,6 +1048,7 @@ void UnloadSoundAlias(Sound alias)
|
||||||
{
|
{
|
||||||
UntrackAudioBuffer(alias.stream.buffer);
|
UntrackAudioBuffer(alias.stream.buffer);
|
||||||
ma_data_converter_uninit(&alias.stream.buffer->converter, NULL);
|
ma_data_converter_uninit(&alias.stream.buffer->converter, NULL);
|
||||||
|
RL_FREE(alias.stream.buffer->converterResidual);
|
||||||
RL_FREE(alias.stream.buffer);
|
RL_FREE(alias.stream.buffer);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user