mirror of
https://github.com/glfw/glfw.git
synced 2026-09-22 16:52:57 +00:00
Renamed global struct and substructs.
Renamed _glfwLibrary to _glfw and made all substructs lower-case, making global variable names easier to read and type. Partially inspired by the internal naming conventions of glwt.
This commit is contained in:
@@ -73,7 +73,7 @@ void _glfwPlatformSetClipboardString(_GLFWwindow* window, const char* string)
|
||||
memcpy(GlobalLock(stringHandle), wideString, wideSize);
|
||||
GlobalUnlock(stringHandle);
|
||||
|
||||
if (!OpenClipboard(window->Win32.handle))
|
||||
if (!OpenClipboard(window->win32.handle))
|
||||
{
|
||||
GlobalFree(stringHandle);
|
||||
free(wideString);
|
||||
@@ -104,7 +104,7 @@ const char* _glfwPlatformGetClipboardString(_GLFWwindow* window)
|
||||
return NULL;
|
||||
}
|
||||
|
||||
if (!OpenClipboard(window->Win32.handle))
|
||||
if (!OpenClipboard(window->win32.handle))
|
||||
{
|
||||
_glfwInputError(GLFW_PLATFORM_ERROR, "Win32: Failed to open clipboard");
|
||||
return NULL;
|
||||
@@ -120,20 +120,20 @@ const char* _glfwPlatformGetClipboardString(_GLFWwindow* window)
|
||||
return NULL;
|
||||
}
|
||||
|
||||
free(_glfwLibrary.Win32.clipboardString);
|
||||
_glfwLibrary.Win32.clipboardString =
|
||||
free(_glfw.win32.clipboardString);
|
||||
_glfw.win32.clipboardString =
|
||||
_glfwCreateUTF8FromWideString(GlobalLock(stringHandle));
|
||||
|
||||
GlobalUnlock(stringHandle);
|
||||
CloseClipboard();
|
||||
|
||||
if (!_glfwLibrary.Win32.clipboardString)
|
||||
if (!_glfw.win32.clipboardString)
|
||||
{
|
||||
_glfwInputError(GLFW_PLATFORM_ERROR,
|
||||
"Win32: Failed to convert wide string to UTF-8");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
return _glfwLibrary.Win32.clipboardString;
|
||||
return _glfw.win32.clipboardString;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user