From 45df0eb30c5119f66f332d35a411f508a4f1b69a Mon Sep 17 00:00:00 2001 From: Nils Faerber Date: Wed, 9 Nov 2011 23:20:30 +0100 Subject: [PATCH] Fix some warnings, add screen_update IDLE to quit --- mw_main.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/mw_main.c b/mw_main.c index a2c94af..d391048 100644 --- a/mw_main.c +++ b/mw_main.c @@ -257,8 +257,8 @@ int days(int m1, int y1) void draw_idle_calendar(mwdevice_t *mwdevice) { long unsigned int t; - unsigned int y,y1,m,m1,d,da,i,j,k; - const char a[12][20]={"January","February","March","April","May","June","July","August","September","October","November","December"}; + unsigned int y,y1,m,m1,d,i,j,k; + /* const char a[12][20]={"January","February","March","April","May","June","July","August","September","October","November","December"}; */ const char dnames[7][3] = { "Mo", "Di", "Mi", "Do", "Fr", "Sa", "So" }; mw_buffer *mwbuf; unsigned char *bbuf; @@ -429,7 +429,7 @@ void test_oled(mwdevice_t *mwdevice, unsigned char oled) { mw_buffer *mwbuf; unsigned char *bbuf; - int len, i; + int len; mwbuf = mw_alloc_pbuffer(80, 16, 1); mw_buf_clear(mwbuf, MW_BLACK); @@ -483,6 +483,8 @@ void process_cmd(char *cmdline, int clinep, mwdata_t *mwdata) if (strncmp(cmdline, "quit", 4) == 0) { //close(mw_fd); //exit(0); + /* just in case we quit and show another screen */ + mw_update_display(&mwdata->mwdevice, MW_SCREEN_MODE_IDLE, 0); g_main_loop_quit (mwdata->mloop); } if (strncmp(cmdline, "help", 4) == 0) { -- 2.39.2