summaryrefslogtreecommitdiff
path: root/iup/srccontrols/iup_dial.c
diff options
context:
space:
mode:
Diffstat (limited to 'iup/srccontrols/iup_dial.c')
-rwxr-xr-xiup/srccontrols/iup_dial.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/iup/srccontrols/iup_dial.c b/iup/srccontrols/iup_dial.c
index 1dd2d0f..c8c5656 100755
--- a/iup/srccontrols/iup_dial.c
+++ b/iup/srccontrols/iup_dial.c
@@ -640,7 +640,7 @@ static int iDialWheel_CB(Ihandle* ih, float delta)
static char* iDialGetValueAttrib(Ihandle* ih)
{
char* str = iupStrGetMemory(20);
- sprintf(str, "%f", ih->data->angle);
+ sprintf(str, "%g", ih->data->angle);
return str;
}
@@ -665,7 +665,7 @@ static int iDialSetDensityAttrib(Ihandle* ih, const char* value)
static char* iDialGetDensityAttrib(Ihandle* ih)
{
char* str = iupStrGetMemory(20);
- sprintf(str, "%f", ih->data->density);
+ sprintf(str, "%g", ih->data->density);
return str;
}
@@ -780,10 +780,16 @@ static int iDialMapMethod(Ihandle* ih)
static void iDialUnMapMethod(Ihandle* ih)
{
if (ih->data->cddbuffer)
+ {
cdKillCanvas(ih->data->cddbuffer);
+ ih->data->cddbuffer = NULL;
+ }
if (ih->data->cdcanvas)
+ {
cdKillCanvas(ih->data->cdcanvas);
+ ih->data->cdcanvas = NULL;
+ }
}
static int iDialCreateMethod(Ihandle* ih, void **params)