diff options
author | Pixel <pixel@nobis-crew.org> | 2010-06-15 00:59:57 -0700 |
---|---|---|
committer | Pixel <pixel@nobis-crew.org> | 2010-06-15 00:59:57 -0700 |
commit | eed0eb6a476d54ce19aeff137984aa981d9e3976 (patch) | |
tree | 807891636efd2f87dcbd261e971216269973ae07 /iup/srccontrols/iup_dial.c | |
parent | ccc8261e4d48de89da4ddfe7b55e378ae0cd6f47 (diff) |
Upgrading to iup 3.1
Diffstat (limited to 'iup/srccontrols/iup_dial.c')
-rwxr-xr-x | iup/srccontrols/iup_dial.c | 10 |
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) |