mirror of
https://github.com/raysan5/raylib.git
synced 2026-04-27 00:57:25 -04:00
Redesigned to support disabling features on compilation with `-DSUPPORT_FEATURE=0` REMOVED: `SUPPORT_DEFAULT_FONT`, always supported REMOVED: `SUPPORT_IMAGE_MANIPULATION `, always supported REMOVED: `SUPPORT_TEXT_MANIPULATION`, always supported REDESIGNED: `SUPPORT_FONT_ATLAS_WHITE_REC` to `FONT_ATLAS_CORNER_REC_SIZE` REVIEWED: Config values (other than 0-1) are already defined on respective modules Other config tweaks here and there
This commit is contained in:
@ -65,7 +65,7 @@
|
||||
#define GLFW_NATIVE_INCLUDE_NONE // To avoid some symbols re-definition in windows.h
|
||||
#include "GLFW/glfw3native.h"
|
||||
|
||||
#if defined(SUPPORT_WINMM_HIGHRES_TIMER) && !defined(SUPPORT_BUSY_WAIT_LOOP)
|
||||
#if SUPPORT_WINMM_HIGHRES_TIMER && !SUPPORT_BUSY_WAIT_LOOP
|
||||
// NOTE: Those functions require linking with winmm library
|
||||
//#pragma warning(disable: 4273)
|
||||
__declspec(dllimport) unsigned int __stdcall timeEndPeriod(unsigned int uPeriod);
|
||||
@ -1048,7 +1048,7 @@ Image GetClipboardImage(void)
|
||||
{
|
||||
Image image = { 0 };
|
||||
|
||||
#if defined(SUPPORT_CLIPBOARD_IMAGE)
|
||||
#if SUPPORT_CLIPBOARD_IMAGE
|
||||
#if defined(_WIN32)
|
||||
unsigned long long int dataSize = 0;
|
||||
void *bmpData = NULL;
|
||||
@ -1062,7 +1062,7 @@ Image GetClipboardImage(void)
|
||||
#else
|
||||
TRACELOG(LOG_WARNING, "GetClipboardImage() not implemented on target platform");
|
||||
#endif
|
||||
#endif // SUPPORT_CLIPBOARD_IMAGE
|
||||
#endif
|
||||
|
||||
return image;
|
||||
}
|
||||
@ -1202,7 +1202,7 @@ const char *GetKeyName(int key)
|
||||
// Register all input events
|
||||
void PollInputEvents(void)
|
||||
{
|
||||
#if defined(SUPPORT_GESTURES_SYSTEM)
|
||||
#if SUPPORT_GESTURES_SYSTEM
|
||||
// NOTE: Gestures update must be called every frame to reset gestures correctly
|
||||
// because ProcessGestureEvent() is just called on an event, not every frame
|
||||
UpdateGestures();
|
||||
@ -1514,7 +1514,7 @@ int InitPlatform(void)
|
||||
glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, 3); // Choose OpenGL minor version (just hint)
|
||||
glfwWindowHint(GLFW_OPENGL_PROFILE, GLFW_OPENGL_CORE_PROFILE);
|
||||
glfwWindowHint(GLFW_OPENGL_FORWARD_COMPAT, GLFW_FALSE);
|
||||
#if defined(RLGL_ENABLE_OPENGL_DEBUG_CONTEXT)
|
||||
#if RLGL_ENABLE_OPENGL_DEBUG_CONTEXT
|
||||
glfwWindowHint(GLFW_OPENGL_DEBUG_CONTEXT, GLFW_TRUE); // Enable OpenGL Debug Context
|
||||
#endif
|
||||
}
|
||||
@ -1819,7 +1819,7 @@ void ClosePlatform(void)
|
||||
glfwDestroyWindow(platform.handle);
|
||||
glfwTerminate();
|
||||
|
||||
#if defined(_WIN32) && defined(SUPPORT_WINMM_HIGHRES_TIMER) && !defined(SUPPORT_BUSY_WAIT_LOOP)
|
||||
#if defined(_WIN32) && SUPPORT_WINMM_HIGHRES_TIMER && !SUPPORT_BUSY_WAIT_LOOP
|
||||
timeEndPeriod(1); // Restore time period
|
||||
#endif
|
||||
}
|
||||
@ -2049,7 +2049,7 @@ static void MouseButtonCallback(GLFWwindow *window, int button, int action, int
|
||||
CORE.Input.Mouse.currentButtonState[button] = action;
|
||||
CORE.Input.Touch.currentTouchState[button] = action;
|
||||
|
||||
#if defined(SUPPORT_GESTURES_SYSTEM) && defined(SUPPORT_MOUSE_GESTURES)
|
||||
#if SUPPORT_GESTURES_SYSTEM && defined(SUPPORT_MOUSE_GESTURES)
|
||||
// Process mouse events as touches to be able to use mouse-gestures
|
||||
GestureEvent gestureEvent = { 0 };
|
||||
|
||||
@ -2084,7 +2084,7 @@ static void MouseCursorPosCallback(GLFWwindow *window, double x, double y)
|
||||
CORE.Input.Mouse.currentPosition.y = (float)y;
|
||||
CORE.Input.Touch.position[0] = CORE.Input.Mouse.currentPosition;
|
||||
|
||||
#if defined(SUPPORT_GESTURES_SYSTEM) && defined(SUPPORT_MOUSE_GESTURES)
|
||||
#if SUPPORT_GESTURES_SYSTEM && defined(SUPPORT_MOUSE_GESTURES)
|
||||
// Process mouse events as touches to be able to use mouse-gestures
|
||||
GestureEvent gestureEvent = { 0 };
|
||||
|
||||
|
||||
Reference in New Issue
Block a user