From b779d29caa456b750ba6425acab0564ea6ab5a4f Mon Sep 17 00:00:00 2001 From: "Kirill Lipatov (Leency)" Date: Tue, 4 Oct 2016 22:44:07 +0000 Subject: [PATCH] CMM: Fix broken notify() function and wrong parameter in Clipboard::ResetBlockingBuffer() git-svn-id: svn://kolibrios.org@6562 a494cfbc-eb01-0410-851d-a64ba20cac60 --- programs/cmm/lib/clipboard.h | 17 ++++++++++++++--- programs/cmm/lib/kolibri.h | 12 ++++++------ 2 files changed, 20 insertions(+), 9 deletions(-) diff --git a/programs/cmm/lib/clipboard.h b/programs/cmm/lib/clipboard.h index 5bba531367..cfdc9b8410 100644 --- a/programs/cmm/lib/clipboard.h +++ b/programs/cmm/lib/clipboard.h @@ -11,12 +11,12 @@ struct buffer_data dword size; dword type; dword encoding; - byte buffer_data[4096]; + dword content; }; struct Clipboard { - buffer_data data; + buffer_data slot_data; dword GetSlotCount(); dword GetSlotData( ECX); dword SetSlotData( EDX, ESI); @@ -31,11 +31,22 @@ dword Clipboard::GetSlotCount() $int 0x40 } +#define SLOT_DATA_TYPE_TEXT 0 +#define SLOT_DATA_TYPE_IMAGE 1 +#define SLOT_DATA_TYPE_RAW 2 +#define SLOT_DATA_TYPE_RESERVED 3 dword Clipboard::GetSlotData( ECX) //ECX = slot number { + dword result; $mov eax, 54 $mov ebx, 1 $int 0x40 + result = EAX; + slot_data.size = DSDWORD[result]; + slot_data.type = DSDWORD[result+4]; + slot_data.encoding = DSDWORD[result+8]; + if (slot_data.type == SLOT_DATA_TYPE_TEXT) slot_data.content = result+12; + else slot_data.content = result+10; } dword Clipboard::SetSlotData( ECX, EDX) //ECX = data size, EDX - pointer to data @@ -55,7 +66,7 @@ dword Clipboard::DelLastSlot() dword Clipboard::ResetBlockingBuffer() { $mov eax, 54 - $mov ebx, 3 + $mov ebx, 4 $int 0x40 } diff --git a/programs/cmm/lib/kolibri.h b/programs/cmm/lib/kolibri.h index 4f98337ca5..5443b59822 100644 --- a/programs/cmm/lib/kolibri.h +++ b/programs/cmm/lib/kolibri.h @@ -247,12 +247,12 @@ inline fastcall ExitProcess() //------------------------------------------------------------------------------ -inline fastcall void SetCurDir( ECX) -{ - EAX=30; - EBX=1; - $int 0x40 -} +// inline fastcall void SetCurDir( ECX) +// { +// EAX=30; +// EBX=1; +// $int 0x40 +// } //eax = язык системы (1=eng, 2=fi, 3=ger, 4=rus)