This commit is contained in:
IoIxD 2024-08-29 23:47:49 -07:00
commit 63a4eb8a62
2 changed files with 36 additions and 40 deletions

View file

@ -118,7 +118,9 @@ elseif (NOT SUPPORT_GESTURES_SYSTEM)
list(REMOVE_ITEM example_sources ${CMAKE_CURRENT_SOURCE_DIR}/core/core_basic_screen_manager.c)
list(REMOVE_ITEM example_sources ${CMAKE_CURRENT_SOURCE_DIR}/core/core_input_gestures_web.c)
list(REMOVE_ITEM example_sources ${CMAKE_CURRENT_SOURCE_DIR}/core/core_input_gestures.c)
elseif ("${PLATFORM}" STREQUAL "None" OR "${PLATFORM}" STREQUAL "Offscreen")
# for some reason i get an error when trying to compile this one from any platform? oh well we'll just stick it here
list(REMOVE_ITEM example_sources ${CMAKE_CURRENT_SOURCE_DIR}/others/raylib_opengl_interop.c)
endif ()
# The rlgl_standalone example only targets desktop, without shared libraries.

View file

@ -25,7 +25,13 @@
const int screenWidth = 800;
const int screenHeight = 450;
GLFWwindow *window;
bool CustomWindowShouldClose(void) {
return glfwWindowShouldClose(window);
}
int CustomInitPlatform(void) {
if (!glfwInit())
{
@ -89,10 +95,14 @@ void CustomClosePlatform(void) {
int main(void)
{
union OverridableFunctionPointer funcs;
funcs.InitPlatform = CustomInitPlatform;
funcs.ClosePlatform = CustomClosePlatform;
funcs.WindowShouldClose = CustomWindowShouldClose;
CustomInitPlatform();
OverrideInternalFunction("InitPlatform",&funcs);
//OverrideInternalFunction("InitPlatform",&funcs);
OverrideInternalFunction("ClosePlatform",&funcs);
OverrideInternalFunction("WindowShouldClose",&funcs);
RenderTexture2D fb = LoadRenderTexture(80,24);
@ -114,6 +124,6 @@ int main(void)
glfwPollEvents();
}
CustomClosePlatform();
//CustomClosePlatform();
return 0;
}