Skip to content

Commit

Permalink
Merge pull request #268 from go-gl/update-to-3.3.2
Browse files Browse the repository at this point in the history
v3.3/glfw: update to GLFW 3.3.2
  • Loading branch information
pwaller authored Feb 21, 2020
2 parents 12ad95a + 76ac453 commit eb74977
Show file tree
Hide file tree
Showing 25 changed files with 532 additions and 683 deletions.
2 changes: 1 addition & 1 deletion v3.3/glfw/GLFW_C_REVISION.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2bac7ee8da526257d808bd026b027246c98e4f2f
0a49ef0a00baa3ab520ddc452f0e3b1e099c5589
7 changes: 4 additions & 3 deletions v3.3/glfw/glfw/include/GLFW/glfw3.h
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,7 @@ extern "C" {
* API changes.
* @ingroup init
*/
#define GLFW_VERSION_REVISION 1
#define GLFW_VERSION_REVISION 2
/*! @} */

/*! @brief One.
Expand Down Expand Up @@ -5677,8 +5677,9 @@ GLFWAPI int glfwVulkanSupported(void);
* returned array, as it is an error to specify an extension more than once in
* the `VkInstanceCreateInfo` struct.
*
* @remark @macos This function currently only supports the
* `VK_MVK_macos_surface` extension from MoltenVK.
* @remark @macos This function currently supports either the
* `VK_MVK_macos_surface` extension from MoltenVK or `VK_EXT_metal_surface`
* extension.
*
* @pointer_lifetime The returned array is allocated and freed by GLFW. You
* should not free it yourself. It is guaranteed to be valid only until the
Expand Down
184 changes: 0 additions & 184 deletions v3.3/glfw/glfw/src/CMakeLists.txt

This file was deleted.

35 changes: 30 additions & 5 deletions v3.3/glfw/glfw/src/cocoa_init.m
Original file line number Diff line number Diff line change
Expand Up @@ -431,9 +431,8 @@ - (void)applicationWillFinishLaunching:(NSNotification *)notification
// In case we are unbundled, make us a proper UI application
[NSApp setActivationPolicy:NSApplicationActivationPolicyRegular];

// Menu bar setup must go between sharedApplication above and
// finishLaunching below, in order to properly emulate the behavior
// of NSApplicationMain
// Menu bar setup must go between sharedApplication and finishLaunching
// in order to properly emulate the behavior of NSApplicationMain

if ([[NSBundle mainBundle] pathForResource:@"MainMenu" ofType:@"nib"])
{
Expand All @@ -448,9 +447,9 @@ - (void)applicationWillFinishLaunching:(NSNotification *)notification

- (void)applicationDidFinishLaunching:(NSNotification *)notification
{
[NSApp stop:nil];

_glfw.ns.finishedLaunching = GLFW_TRUE;
_glfwPlatformPostEmptyEvent();
[NSApp stop:nil];
}

- (void)applicationDidHide:(NSNotification *)notification
Expand All @@ -464,6 +463,32 @@ - (void)applicationDidHide:(NSNotification *)notification
@end // GLFWApplicationDelegate


//////////////////////////////////////////////////////////////////////////
////// GLFW internal API //////
//////////////////////////////////////////////////////////////////////////

void* _glfwLoadLocalVulkanLoaderNS(void)
{
CFBundleRef bundle = CFBundleGetMainBundle();
if (!bundle)
return NULL;

CFURLRef url =
CFBundleCopyAuxiliaryExecutableURL(bundle, CFSTR("libvulkan.1.dylib"));
if (!url)
return NULL;

char path[PATH_MAX];
void* handle = NULL;

if (CFURLGetFileSystemRepresentation(url, true, (UInt8*) path, sizeof(path) - 1))
handle = _glfw_dlopen(path);

CFRelease(url);
return handle;
}


//////////////////////////////////////////////////////////////////////////
////// GLFW platform API //////
//////////////////////////////////////////////////////////////////////////
Expand Down
2 changes: 1 addition & 1 deletion v3.3/glfw/glfw/src/cocoa_joystick.m
Original file line number Diff line number Diff line change
Expand Up @@ -331,7 +331,7 @@ void _glfwInitJoysticksNS(void)
return;
}

for (int i = 0; i < sizeof(usages) / sizeof(long); i++)
for (size_t i = 0; i < sizeof(usages) / sizeof(long); i++)
{
const long page = kHIDPage_GenericDesktop;

Expand Down
Loading

0 comments on commit eb74977

Please sign in to comment.