From 6928eaa58149032415e86b88e7ac423fb4098777 Mon Sep 17 00:00:00 2001 From: "Kirill Lipatov (Leency)" Date: Thu, 13 Sep 2018 20:31:24 +0000 Subject: [PATCH] TmpDisk: save only disks that are exists, use system.ini git-svn-id: svn://kolibrios.org@7356 a494cfbc-eb01-0410-851d-a64ba20cac60 --- data/common/settings/system.ini | 7 +++++-- programs/cmm/lib/kolibri.h | 14 ++++++++++++++ programs/cmm/tmpdisk/t_gui.c | 2 +- programs/cmm/tmpdisk/tmpdisk.c | 4 ++-- 4 files changed, 22 insertions(+), 5 deletions(-) diff --git a/data/common/settings/system.ini b/data/common/settings/system.ini index 016e5082da..30f75265d8 100644 --- a/data/common/settings/system.ini +++ b/data/common/settings/system.ini @@ -3,11 +3,14 @@ language=en font file=/sys/Fonts/Tahoma.kf font smoothing=sbp font height=9 -speaker mute=on +speaker mute=on + [mouse] speed=4 acceleration=3 double_click_delay=64 + [low-level] LBA=off -PCI=on \ No newline at end of file +PCI=on + diff --git a/programs/cmm/lib/kolibri.h b/programs/cmm/lib/kolibri.h index f83266e7ae..1a0ffa2b1a 100644 --- a/programs/cmm/lib/kolibri.h +++ b/programs/cmm/lib/kolibri.h @@ -130,6 +130,20 @@ inline fastcall dword GetFreeRAM() //return eax = free RAM in Kb } +inline fastcall int GetCpuIdleCount() +{ + EAX = 18; + EBX = 4; + $int 0x40 +} + +inline fastcall int GetCpuFrequency() +{ + EAX = 18; + EBX = 5; + $int 0x40 +} + inline fastcall dword LoadDriver(ECX) //ECX - èìÿ äðàéâåðà { $mov eax, 68 diff --git a/programs/cmm/tmpdisk/t_gui.c b/programs/cmm/tmpdisk/t_gui.c index adbf3fa7ba..7efe707452 100644 --- a/programs/cmm/tmpdisk/t_gui.c +++ b/programs/cmm/tmpdisk/t_gui.c @@ -135,7 +135,7 @@ void Main_Window() break; case evReDraw: system.color.get(); - DefineAndDrawWindow(170,150,405,290,0x74,system.color.work,"Virtual Disk Manager 0.66",0); + DefineAndDrawWindow(170,150,405,290,0x74,system.color.work,"Virtual Disk Manager 0.67",0); GetProcessInfo(#Form, SelfInfo); if (Form.status_window>2) break; diff --git a/programs/cmm/tmpdisk/tmpdisk.c b/programs/cmm/tmpdisk/tmpdisk.c index 838d25f58f..b909c4f413 100644 --- a/programs/cmm/tmpdisk/tmpdisk.c +++ b/programs/cmm/tmpdisk/tmpdisk.c @@ -49,7 +49,7 @@ int driver_handle; dword disk_sizes[10]; -_ini ini = { "/sys/settings/tmpdisk.ini", "DiskSizes" }; +_ini ini = { "/sys/settings/system.ini", "DiskSizes" }; ///////////////////////////////////////////////////////////////////////////////////////// ///////////////////////// Code //////////////////// @@ -98,7 +98,7 @@ void SaveDiskSizesToIni() for (i=0; i<=9; i++) { key[0]=i+'0'; - ini.SetInt(#key, disk_sizes[i]); + if (disk_sizes[i]) ini.SetInt(#key, disk_sizes[i]); } }