aboutsummaryrefslogtreecommitdiffstats
path: root/demos/modules/gwin/widgets
diff options
context:
space:
mode:
authorinmarket <andrewh@inmarket.com.au>2014-05-12 13:27:07 +1000
committerinmarket <andrewh@inmarket.com.au>2014-05-12 13:27:07 +1000
commit70c15a1d62510ac9dec334d015c4cd4af48d302a (patch)
tree25810e2d4a2f3715ef131d7f18e61d2253c9e31c /demos/modules/gwin/widgets
parentdfcd7e0e504b63e86f33e326ee481caea44c2a85 (diff)
downloaduGFX-70c15a1d62510ac9dec334d015c4cd4af48d302a.tar.gz
uGFX-70c15a1d62510ac9dec334d015c4cd4af48d302a.tar.bz2
uGFX-70c15a1d62510ac9dec334d015c4cd4af48d302a.zip
Bug fix to widgets demo. It should never have used <stdio.h> which is not available on many embedded platforms.
Diffstat (limited to 'demos/modules/gwin/widgets')
-rw-r--r--demos/modules/gwin/widgets/gfxconf.h3
-rw-r--r--demos/modules/gwin/widgets/main.c9
2 files changed, 7 insertions, 5 deletions
diff --git a/demos/modules/gwin/widgets/gfxconf.h b/demos/modules/gwin/widgets/gfxconf.h
index 9f8601b8..346a9898 100644
--- a/demos/modules/gwin/widgets/gfxconf.h
+++ b/demos/modules/gwin/widgets/gfxconf.h
@@ -106,6 +106,9 @@
///////////////////////////////////////////////////////////////////////////
#define GFX_USE_GFILE TRUE
+#define GFILE_NEED_PRINTG TRUE
+#define GFILE_NEED_STRINGS TRUE
+
#define GFILE_NEED_ROMFS TRUE
//#define GFILE_NEED_NATIVEFS TRUE
diff --git a/demos/modules/gwin/widgets/main.c b/demos/modules/gwin/widgets/main.c
index bde40310..f76adb56 100644
--- a/demos/modules/gwin/widgets/main.c
+++ b/demos/modules/gwin/widgets/main.c
@@ -25,7 +25,6 @@
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#include <stdio.h>
#include "gfx.h"
/**
@@ -496,13 +495,13 @@ int main(void) {
char tmp[20];
// The sliders
- snprintf(tmp, sizeof(tmp), "%d%%", gwinSliderGetPosition(ghSlider1));
+ snprintg(tmp, sizeof(tmp), "%d%%", gwinSliderGetPosition(ghSlider1));
gwinSetText(ghLabelSlider1, tmp, TRUE);
- snprintf(tmp, sizeof(tmp), "%d%%", gwinSliderGetPosition(ghSlider2));
+ snprintg(tmp, sizeof(tmp), "%d%%", gwinSliderGetPosition(ghSlider2));
gwinSetText(ghLabelSlider2, tmp, TRUE);
- snprintf(tmp, sizeof(tmp), "%d%%", gwinSliderGetPosition(ghSlider3));
+ snprintg(tmp, sizeof(tmp), "%d%%", gwinSliderGetPosition(ghSlider3));
gwinSetText(ghLabelSlider3, tmp, TRUE);
- snprintf(tmp, sizeof(tmp), "%d%%", gwinSliderGetPosition(ghSlider4));
+ snprintg(tmp, sizeof(tmp), "%d%%", gwinSliderGetPosition(ghSlider4));
gwinSetText(ghLabelSlider4, tmp, TRUE);
// The radio buttons