glfw3.c 3.4.0 → 3.4.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/GLFW/glfw3.c CHANGED
@@ -1,8 +1,13 @@
1
1
  // Core/Common files (always included)
2
2
  #pragma once
3
3
 
4
+ // FIX: Define missing OCR_* constants (@wolfam77)
5
+ // For some reason, including windows.h with OEMRESOURCE defined
6
+ // does not always define these constants.
4
7
  #ifdef _GLFW_WIN32
8
+ #ifndef OEMRESOURCE
5
9
  #define OEMRESOURCE
10
+ #endif
6
11
  #include <windows.h>
7
12
  #ifndef OCR_NORMAL
8
13
  #define OCR_NORMAL 32512
@@ -22,6 +27,7 @@
22
27
  #endif
23
28
  #endif
24
29
 
30
+ // Auto-link windows libraries (@wolfam77)
25
31
  #ifdef _GLFW_WIN32
26
32
  #pragma comment(lib, "gdi32.lib")
27
33
  #pragma comment(lib, "user32.lib")
@@ -40,6 +46,7 @@
40
46
  #include "window.c"
41
47
 
42
48
  // Null platform (for unsupported platforms)
49
+ // FIX: Avoid including null platform when not needed (@wolfam77)
43
50
  #if !defined(_GLFW_WIN32) && !defined(_GLFW_COCOA) && !defined(_GLFW_X11) && !defined(_GLFW_WAYLAND)
44
51
  #include "null_init.c"
45
52
  #include "null_joystick.c"
package/GLFW/glfw3.h CHANGED
@@ -96,7 +96,7 @@ extern "C" {
96
96
  #define _WIN32
97
97
  #endif /* _WIN32 */
98
98
 
99
- // Define the appropriate platform if not already defined by the user
99
+ // Define the appropriate platform if not already defined by the user (@wolfram77)
100
100
  #if !defined(_GLFW_WIN32) && !defined(_GLFW_COCOA) && !defined(_GLFW_X11) && \
101
101
  !defined(_GLFW_WAYLAND)
102
102
  #if defined(_WIN32) || defined(_WIN64)
package/GLFW/internal.h CHANGED
@@ -46,7 +46,7 @@
46
46
  #endif
47
47
 
48
48
  #define GLFW_INCLUDE_NONE
49
- #include "glfw3.h"
49
+ #include "glfw3.h" // Adjust include path (@wolfam77)
50
50
 
51
51
  #define _GLFW_INSERT_FIRST 0
52
52
  #define _GLFW_INSERT_LAST 1
@@ -78,6 +78,7 @@ typedef struct _GLFWjoystick _GLFWjoystick;
78
78
  typedef struct _GLFWtls _GLFWtls;
79
79
  typedef struct _GLFWmutex _GLFWmutex;
80
80
 
81
+ // FIX: GV_NUM_EXTENSIONS is redefined, among other redefinitions (@wolfam77)
81
82
  #ifndef GL_VERSION
82
83
  #define GL_VERSION 0x1f02
83
84
  #endif
@@ -339,7 +340,7 @@ typedef VkResult (APIENTRY * PFN_vkEnumerateInstanceExtensionProperties)(const c
339
340
  #include "platform.h"
340
341
 
341
342
  #define GLFW_NATIVE_INCLUDE_NONE
342
- #include "glfw3native.h"
343
+ #include "glfw3native.h" // Adjust include path (@wolfam77)
343
344
 
344
345
  // Checks for whether the library has been initialized
345
346
  #define _GLFW_REQUIRE_INIT() \
package/GLFW/platform.c CHANGED
@@ -78,7 +78,7 @@ GLFWbool _glfwSelectPlatform(int desiredID, _GLFWplatform* platform)
78
78
  #if !defined(_GLFW_WIN32) && !defined(_GLFW_COCOA) && !defined(_GLFW_X11) && !defined(_GLFW_WAYLAND)
79
79
  if (desiredID == GLFW_PLATFORM_NULL)
80
80
  return _glfwConnectNull(desiredID, platform);
81
- else
81
+ else // FIX: _glfwConnectNull is not defined (@wolfam77)
82
82
  #endif
83
83
  if (count == 0)
84
84
  {
@@ -23,7 +23,7 @@
23
23
  // distribution.
24
24
  //
25
25
  //========================================================================
26
- #pragma once
26
+ #pragma once // FIX: Ensure single inclusion (@wolfram77)
27
27
 
28
28
  #define GLFW_WIN32_JOYSTICK_STATE _GLFWjoystickWin32 win32;
29
29
  #define GLFW_WIN32_LIBRARY_JOYSTICK_STATE
@@ -24,7 +24,7 @@
24
24
  // distribution.
25
25
  //
26
26
  //========================================================================
27
- #pragma once
27
+ #pragma once // FIX: Ensure single inclusion (@wolfram77)
28
28
 
29
29
  // We don't need all the fancy stuff
30
30
  #ifndef NOMINMAX
@@ -71,6 +71,7 @@
71
71
  #include <xinput.h>
72
72
  #include <dbt.h>
73
73
 
74
+ // FIX: Define APIENTRY if not defined (@wolfram77)
74
75
  #ifndef APIENTRY
75
76
  #define APIENTRY __stdcall
76
77
  #endif
@@ -24,7 +24,7 @@
24
24
  // distribution.
25
25
  //
26
26
  //========================================================================
27
- #pragma once
27
+ #pragma once // FIX: Ensure single inclusion (@wolfram77)
28
28
 
29
29
  // This is a workaround for the fact that glfw3.h needs to export APIENTRY (for
30
30
  // example to allow applications to correctly declare a GL_KHR_debug callback)
package/GLFW/win32_time.h CHANGED
@@ -24,7 +24,7 @@
24
24
  // distribution.
25
25
  //
26
26
  //========================================================================
27
- #pragma once
27
+ #pragma once // FIX: Ensure single inclusion (@wolfram77)
28
28
 
29
29
  // This is a workaround for the fact that glfw3.h needs to export APIENTRY (for
30
30
  // example to allow applications to correctly declare a GL_KHR_debug callback)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "glfw3.c",
3
- "version": "3.4.0",
3
+ "version": "3.4.1",
4
4
  "description": "A multi-platform library for OpenGL, OpenGL ES and Vulkan development on the desktop; Marcus Geelnard (2002).",
5
5
  "keywords": [
6
6
  "c",