mirror of
https://github.com/gwm17/glfw.git
synced 2024-11-23 10:48:51 -05:00
Renamed window hint reset function for clarity.
This commit is contained in:
parent
3d82683177
commit
0f481cb09d
|
@ -105,9 +105,9 @@ GLFWAPI int glfwInitWithModels(GLFWthreadmodel* threading, GLFWallocator* alloca
|
||||||
_glfwLibrary.allocator.free = free;
|
_glfwLibrary.allocator.free = free;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Not all window hints are cleared to zero, so this needs to be here
|
// Not all window hints have zero as their default value, so this
|
||||||
// despite the memset above
|
// needs to be here despite the memset above
|
||||||
_glfwClearWindowHints();
|
_glfwSetDefaultWindowHints();
|
||||||
|
|
||||||
if (!_glfwPlatformInit())
|
if (!_glfwPlatformInit())
|
||||||
{
|
{
|
||||||
|
|
|
@ -324,7 +324,7 @@ void _glfwSplitBPP(int bpp, int* red, int* green, int* blue);
|
||||||
void _glfwSetError(int error, const char* description);
|
void _glfwSetError(int error, const char* description);
|
||||||
|
|
||||||
// Window management (window.c)
|
// Window management (window.c)
|
||||||
void _glfwClearWindowHints(void);
|
void _glfwSetDefaultWindowHints(void);
|
||||||
|
|
||||||
// Input handling (window.c)
|
// Input handling (window.c)
|
||||||
void _glfwInputKey(_GLFWwindow* window, int key, int action);
|
void _glfwInputKey(_GLFWwindow* window, int key, int action);
|
||||||
|
|
|
@ -201,10 +201,10 @@ static GLboolean isValidContextConfig(_GLFWwndconfig* wndconfig)
|
||||||
//////////////////////////////////////////////////////////////////////////
|
//////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
//========================================================================
|
//========================================================================
|
||||||
// Clear all open window hints
|
// Reset all window hints to their default values
|
||||||
//========================================================================
|
//========================================================================
|
||||||
|
|
||||||
void _glfwClearWindowHints(void)
|
void _glfwSetDefaultWindowHints(void)
|
||||||
{
|
{
|
||||||
memset(&_glfwLibrary.hints, 0, sizeof(_glfwLibrary.hints));
|
memset(&_glfwLibrary.hints, 0, sizeof(_glfwLibrary.hints));
|
||||||
|
|
||||||
|
@ -399,8 +399,8 @@ GLFWAPI GLFWwindow glfwOpenWindow(int width, int height,
|
||||||
wndconfig.glProfile = _glfwLibrary.hints.glProfile;
|
wndconfig.glProfile = _glfwLibrary.hints.glProfile;
|
||||||
wndconfig.share = share;
|
wndconfig.share = share;
|
||||||
|
|
||||||
// Clear for next open call
|
// Reset to default values for the next call
|
||||||
_glfwClearWindowHints();
|
_glfwSetDefaultWindowHints();
|
||||||
|
|
||||||
// Check the OpenGL bits of the window config
|
// Check the OpenGL bits of the window config
|
||||||
if (!isValidContextConfig(&wndconfig))
|
if (!isValidContextConfig(&wndconfig))
|
||||||
|
|
Loading…
Reference in New Issue
Block a user