mirror of
https://github.com/Ed94/Odin.git
synced 2026-08-06 15:48:51 +00:00
fix indentation in test file
This commit is contained in:
@@ -9,19 +9,19 @@ import "core:mem"
|
|||||||
|
|
||||||
read_from_clipboard :: proc(wnd_handle: win32.HWND, allocator: runtime.Allocator) -> (result: string, ok: win32.BOOL)
|
read_from_clipboard :: proc(wnd_handle: win32.HWND, allocator: runtime.Allocator) -> (result: string, ok: win32.BOOL)
|
||||||
{
|
{
|
||||||
win32.IsClipboardFormatAvailable(win32.CF_TEXT) or_return;
|
win32.IsClipboardFormatAvailable(win32.CF_TEXT) or_return;
|
||||||
|
|
||||||
win32.OpenClipboard(wnd_handle) or_return;
|
win32.OpenClipboard(wnd_handle) or_return;
|
||||||
defer win32.CloseClipboard();
|
defer win32.CloseClipboard();
|
||||||
|
|
||||||
clipboard_data := win32.GetClipboardData(win32.CF_TEXT);
|
clipboard_data := win32.GetClipboardData(win32.CF_TEXT);
|
||||||
if clipboard_data != nil {
|
if clipboard_data != nil {
|
||||||
if cstr := cstring(win32.GlobalLock(win32.HGLOBAL(clipboard_data))); cstr != nil {
|
if cstr := cstring(win32.GlobalLock(win32.HGLOBAL(clipboard_data))); cstr != nil {
|
||||||
result = strings.clone_from_cstring(cstr, allocator);
|
result = strings.clone_from_cstring(cstr, allocator);
|
||||||
ok = true;
|
ok = true;
|
||||||
}
|
|
||||||
win32.GlobalUnlock(win32.HGLOBAL(clipboard_data));
|
|
||||||
}
|
}
|
||||||
|
win32.GlobalUnlock(win32.HGLOBAL(clipboard_data));
|
||||||
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user