From 7cdee9c3dbcb2c12c3f044f9b95b85a12be18cc8 Mon Sep 17 00:00:00 2001 From: "Kirill Lipatov (Leency)" Date: Mon, 11 May 2020 14:11:23 +0000 Subject: [PATCH] Eolite: fix WaitEventTimeout() git-svn-id: svn://kolibrios.org@7913 a494cfbc-eb01-0410-851d-a64ba20cac60 --- programs/cmm/eolite/Eolite.c | 2 +- programs/cmm/lib/debug.h | 6 ++++++ programs/cmm/lib/kolibri.h | 7 +++++++ programs/cmm/misc/build.bat | 11 ++++++++--- 4 files changed, 22 insertions(+), 4 deletions(-) diff --git a/programs/cmm/eolite/Eolite.c b/programs/cmm/eolite/Eolite.c index 34acf5be77..c5422c0d8c 100644 --- a/programs/cmm/eolite/Eolite.c +++ b/programs/cmm/eolite/Eolite.c @@ -214,7 +214,7 @@ void main() strcpy(#inactive_path, #path); llist_copy(#files_inactive, #files); SetEventMask(EVM_REDRAW+EVM_KEY+EVM_BUTTON+EVM_MOUSE+EVM_MOUSE_FILTER); - loop() switch(WaitEventTimeout(50)) + loop() switch(@WaitEventTimeout(80)) { case evMouse: if (del_active) || (Form.status_window>2) break; diff --git a/programs/cmm/lib/debug.h b/programs/cmm/lib/debug.h index 329737aa3e..53d8951463 100644 --- a/programs/cmm/lib/debug.h +++ b/programs/cmm/lib/debug.h @@ -42,6 +42,12 @@ inline fastcall void debugln( EDX) debugch(10); } +inline fastcall void debugcls() +{ + char i; + for (i=0;i<70;i++) debugch(10); +} + :void debugval(dword text,number) { char tmpch[12]; diff --git a/programs/cmm/lib/kolibri.h b/programs/cmm/lib/kolibri.h index 7d710f224d..840975553d 100644 --- a/programs/cmm/lib/kolibri.h +++ b/programs/cmm/lib/kolibri.h @@ -73,6 +73,13 @@ char program_path[4096]; inline fastcall dword calc(EAX) { return EAX; } +inline fastcall swap(EAX, EBX) +{ + $push ESDWORD[EAX] + ESDWORD[EAX] = ESDWORD[EBX]; + $pop ESDWORD[EBX]; +} + :struct raw_image { dword w, h, data; }; diff --git a/programs/cmm/misc/build.bat b/programs/cmm/misc/build.bat index b752f4e93a..a33d9ad595 100644 --- a/programs/cmm/misc/build.bat +++ b/programs/cmm/misc/build.bat @@ -1,13 +1,18 @@ @echo off -del *.kex +echo #define LANG_ENG 1 >lang.h-- For /R %%i In (*.c) Do c-- "%%i" -rename *.com *.kex mkdir bin -move *.kex bin\ +del bin\*.* /Q +move *.com bin + +cd bin +forfiles /S /M *.com /C "cmd /c rename @file @fname" +cd .. del warning.txt +del lang.h-- pause \ No newline at end of file