diff options
| author | Cracker64 <cracker642@gmail.com> | 2011-01-30 20:00:54 (GMT) |
|---|---|---|
| committer | Cracker64 <cracker642@gmail.com> | 2011-01-30 20:00:54 (GMT) |
| commit | fcf958da21621887a80249f2af863991544815fd (patch) | |
| tree | cdd8ac38c54d508a701e5ac17238bffb2354f56d /src/main.c | |
| parent | e18337a70ab7d4b1560d909b1375959c9bed7e7b (diff) | |
| download | powder-fcf958da21621887a80249f2af863991544815fd.zip powder-fcf958da21621887a80249f2af863991544815fd.tar.gz | |
added 'load' command, and a basic error message.
Diffstat (limited to 'src/main.c')
| -rw-r--r-- | src/main.c | 16 |
1 files changed, 15 insertions, 1 deletions
@@ -1117,6 +1117,7 @@ int main(int argc, char *argv[]) pixel *pers_bg=calloc((XRES+BARSIZE)*YRES, PIXELSIZE); void *http_ver_check; char *ver_data=NULL, *tmp; + char error[255]; int i, j, bq, fire_fc=0, do_check=0, old_version=0, http_ret=0, major, minor, old_ver_len; #ifdef INTERNAL int vs = 0; @@ -1699,8 +1700,10 @@ int main(int argc, char *argv[]) char *console3; char *console4; char *console5; + //char error[255] = "error!"; sys_pause = 1; - console = console_ui(vid_buf); + console = console_ui(vid_buf,error); + strcpy(error,""); if(console && strcmp(console, "")!=0 && strncmp(console, " ", 1)!=0) { console2 = strtok(console, " "); @@ -1711,6 +1714,15 @@ int main(int argc, char *argv[]) { break; } + else if(strcmp(console2, "load")==0 && console3) + { + j = atoi(console3); + if(j) + { + open_ui(vid_buf, console3, NULL); + console_mode = 0; + } + } else if(strcmp(console2, "reset")==0 && console3) { if(strcmp(console3, "pressure")==0) @@ -1936,6 +1948,8 @@ int main(int argc, char *argv[]) } } } + else + sprintf(error, "Invalid Command", console2); } if(!console_mode) hud_enable = 1; |
