Fixed capacity parameter for GetWindowText(). Fixed debug string format that is printed when GetWindowText() fails.
This commit is contained in:
parent
3811cf5f46
commit
f178bebfe6
1 changed files with 2 additions and 2 deletions
|
@ -817,8 +817,8 @@ namespace OpenTK.Platform.Windows
|
|||
get
|
||||
{
|
||||
sb_title.Remove(0, sb_title.Length);
|
||||
if (Functions.GetWindowText(window.WindowHandle, sb_title, sb_title.MaxCapacity) == 0)
|
||||
Debug.Print("Failed to retrieve window title (window:{0}, reason:{2}).", window.WindowHandle, Marshal.GetLastWin32Error());
|
||||
if (Functions.GetWindowText(window.WindowHandle, sb_title, sb_title.Capacity) == 0)
|
||||
Debug.Print("Failed to retrieve window title (window:{0}, reason:{1}).", window.WindowHandle, Marshal.GetLastWin32Error());
|
||||
return sb_title.ToString();
|
||||
}
|
||||
set
|
||||
|
|
Loading…
Reference in a new issue