tgfclient: fix some handle leaks

git-svn-id: https://svn.code.sf.net/p/speed-dreams/code/trunk@9395 30fe4595-0a0c-4342-8851-515496e4dcbd

Former-commit-id: 15ed2786575c1dc9575a0d451e91a683b0c7ad6d
Former-commit-id: b0252b0537b9d97b166a7ccae84d6ebd83102e9e
This commit is contained in:
iobyte 2024-03-31 20:16:57 +00:00
parent 3427deedbd
commit a83b9c98fa
4 changed files with 10 additions and 1 deletions

View file

@ -52,6 +52,8 @@ gfuiInitButton(void)
snprintf(path, sizeof(path), "%s/%s", GFSCR_SECT_MENUSETTINGS, GFSCR_SECT_IMAGEBUTTON);
NHImgPadding = (int)GfParmGetNum(hparmScr, path, GFSCR_ATT_HPADDING, 0, 0.0);
NVImgPadding = (int)GfParmGetNum(hparmScr, path, GFSCR_ATT_VPADDING, 0, 0.0);
GfParmReleaseHandle(hparmScr);
}
/** Initialize an image button.

View file

@ -49,6 +49,8 @@ gfuiInitEditbox(void)
snprintf(path, sizeof(path), "%s/%s", GFSCR_SECT_MENUSETTINGS, GFSCR_SECT_EDITBOX);
NHPadding = (int)GfParmGetNum(hparmScr, path, GFSCR_ATT_HPADDING, 0, 10.0);
NVPadding = (int)GfParmGetNum(hparmScr, path, GFSCR_ATT_VPADDING, 0, 5.0);
GfParmReleaseHandle(hparmScr);
}
/* recalc cursorx with cursorIdx */

View file

@ -55,6 +55,8 @@ gfuiInitObject(void)
GfParmGetStr(param, GFSCR_SECT_MOUSECURSOR, GFSCR_ATT_IMAGEFILE, "data/img/mouse.png");
snprintf(buf, sizeof(buf), "%s%s", GfDataDir(), pszImageFile);
NMouseCursorTexture = GfTexReadTexture(buf);
GfParmReleaseHandle(param);
}
void

View file

@ -189,6 +189,9 @@ ScreenSizeVector GfScrGetCustomWindowSizes()
}
while (GfParmListSeekNext(hparmScreen, GFSCR_SECT_WIN_MODES) == 0);
}
GfParmReleaseHandle(hparmScreen);
return vecSizes;
}
@ -1495,4 +1498,4 @@ void gfScrDisableResizable()
GfParmWriteFile(NULL, hparmScreen, "Screen");
GfParmReleaseHandle(hparmScreen);
}
}
}