aboutsummaryrefslogtreecommitdiff
path: root/backends/PalmOS/Src/forms
diff options
context:
space:
mode:
authorChris Apers2003-11-28 10:01:51 +0000
committerChris Apers2003-11-28 10:01:51 +0000
commitd44942b4f57a4062bc13da9595965ccfdf14e944 (patch)
treed52b385fbc818b1aa92be223b7b4af93b51f508d /backends/PalmOS/Src/forms
parent048e404cf12d067945f498b8480ec9a1a204774a (diff)
downloadscummvm-rg350-d44942b4f57a4062bc13da9595965ccfdf14e944.tar.gz
scummvm-rg350-d44942b4f57a4062bc13da9595965ccfdf14e944.tar.bz2
scummvm-rg350-d44942b4f57a4062bc13da9595965ccfdf14e944.zip
Added stack size
svn-id: r11402
Diffstat (limited to 'backends/PalmOS/Src/forms')
-rw-r--r--backends/PalmOS/Src/forms/formSystem.cpp20
1 files changed, 19 insertions, 1 deletions
diff --git a/backends/PalmOS/Src/forms/formSystem.cpp b/backends/PalmOS/Src/forms/formSystem.cpp
index 41a97a8935..5b40f08e39 100644
--- a/backends/PalmOS/Src/forms/formSystem.cpp
+++ b/backends/PalmOS/Src/forms/formSystem.cpp
@@ -14,6 +14,13 @@
*
*
***********************************************************************/
+static UInt32 GetStackSize() {
+ MemPtr startPP, endPP;
+ SysGetStackInfo(&startPP, &endPP);
+
+ return ((Char *)endPP - (Char *)startPP) / 1024L;
+}
+
static void GetMemory(UInt32* storageMemoryP, UInt32* dynamicMemoryP, UInt32 *storageFreeP, UInt32 *dynamicFreeP) {
UInt32 free, max;
@@ -66,10 +73,12 @@ static void GetMemory(UInt32* storageMemoryP, UInt32* dynamicMemoryP, UInt32 *st
static void SystemInfoFormInit() {
FormPtr frmP;
Coord x;
- UInt32 dm, sm, df, sf;
+ UInt32 dm, sm, df, sf, stack;
Char num[10];
GetMemory(&sm, &dm, &sf, &df);
+ stack = GetStackSize();
+
frmP = FrmGetActiveForm();
FrmDrawForm(frmP);
@@ -84,6 +93,10 @@ static void SystemInfoFormInit() {
x = 149 - FntCharsWidth(num, StrLen(num));
WinDrawChars(num, StrLen(num), x, 42);
+ StrIToA(num, stack);
+ x = 149 - FntCharsWidth(num, StrLen(num));
+ WinDrawChars(num, StrLen(num), x, 54);
+
StrIToA(num, df);
x = 109 - FntCharsWidth(num, StrLen(num));
WinDrawChars(num, StrLen(num), x, 30);
@@ -91,6 +104,11 @@ static void SystemInfoFormInit() {
StrIToA(num, sf);
x = 109 - FntCharsWidth(num, StrLen(num));
WinDrawChars(num, StrLen(num), x, 42);
+
+ StrCopy(num,"-");
+ x = 109 - FntCharsWidth(num, StrLen(num));
+ WinDrawChars(num, StrLen(num), x, 54);
+
}
Boolean SystemInfoFormHandleEvent(EventPtr eventP) {