mirror of
https://github.com/glfw/glfw.git
synced 2024-11-10 00:51:47 +00:00
Cleanup
This commit is contained in:
parent
20bce151c1
commit
03db3ed6e9
@ -415,8 +415,8 @@ int _glfwPlatformInit(void)
|
|||||||
if (!_glfwRegisterWindowClassWin32())
|
if (!_glfwRegisterWindowClassWin32())
|
||||||
return GLFW_FALSE;
|
return GLFW_FALSE;
|
||||||
|
|
||||||
_glfw.win32.helperWindow = createHelperWindow();
|
_glfw.win32.helperWindowHandle = createHelperWindow();
|
||||||
if (!_glfw.win32.helperWindow)
|
if (!_glfw.win32.helperWindowHandle)
|
||||||
return GLFW_FALSE;
|
return GLFW_FALSE;
|
||||||
|
|
||||||
_glfwPlatformPollEvents();
|
_glfwPlatformPollEvents();
|
||||||
@ -433,8 +433,8 @@ int _glfwPlatformInit(void)
|
|||||||
|
|
||||||
void _glfwPlatformTerminate(void)
|
void _glfwPlatformTerminate(void)
|
||||||
{
|
{
|
||||||
if (_glfw.win32.helperWindow)
|
if (_glfw.win32.helperWindowHandle)
|
||||||
DestroyWindow(_glfw.win32.helperWindow);
|
DestroyWindow(_glfw.win32.helperWindowHandle);
|
||||||
|
|
||||||
_glfwUnregisterWindowClassWin32();
|
_glfwUnregisterWindowClassWin32();
|
||||||
|
|
||||||
|
@ -246,7 +246,7 @@ typedef struct _GLFWwindowWin32
|
|||||||
//
|
//
|
||||||
typedef struct _GLFWlibraryWin32
|
typedef struct _GLFWlibraryWin32
|
||||||
{
|
{
|
||||||
HWND helperWindow;
|
HWND helperWindowHandle;
|
||||||
DWORD foregroundLockTimeout;
|
DWORD foregroundLockTimeout;
|
||||||
char* clipboardString;
|
char* clipboardString;
|
||||||
char keyName[64];
|
char keyName[64];
|
||||||
|
@ -1605,7 +1605,7 @@ void _glfwPlatformSetClipboardString(_GLFWwindow* window, const char* string)
|
|||||||
memcpy(GlobalLock(stringHandle), wideString, wideSize);
|
memcpy(GlobalLock(stringHandle), wideString, wideSize);
|
||||||
GlobalUnlock(stringHandle);
|
GlobalUnlock(stringHandle);
|
||||||
|
|
||||||
if (!OpenClipboard(_glfw.win32.helperWindow))
|
if (!OpenClipboard(_glfw.win32.helperWindowHandle))
|
||||||
{
|
{
|
||||||
GlobalFree(stringHandle);
|
GlobalFree(stringHandle);
|
||||||
free(wideString);
|
free(wideString);
|
||||||
@ -1625,7 +1625,7 @@ const char* _glfwPlatformGetClipboardString(_GLFWwindow* window)
|
|||||||
{
|
{
|
||||||
HANDLE stringHandle;
|
HANDLE stringHandle;
|
||||||
|
|
||||||
if (!OpenClipboard(_glfw.win32.helperWindow))
|
if (!OpenClipboard(_glfw.win32.helperWindowHandle))
|
||||||
{
|
{
|
||||||
_glfwInputError(GLFW_PLATFORM_ERROR, "Win32: Failed to open clipboard");
|
_glfwInputError(GLFW_PLATFORM_ERROR, "Win32: Failed to open clipboard");
|
||||||
return NULL;
|
return NULL;
|
||||||
|
Loading…
Reference in New Issue
Block a user