Changeset 15462
- Timestamp:
- 05/03/12 19:16:59 (12 years ago)
- Location:
- titan
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
titan/plugins/browser/browser.h
r15438 r15462 222 222 if(status.lastservice != NULL) 223 223 servicestart(status.lastservice->channel, NULL, NULL, 0); 224 sleep(2);224 flushrc(500); 225 225 } 226 226 -
titan/plugins/news/news.h
r15434 r15462 216 216 if(status.lastservice != NULL) 217 217 servicestart(status.lastservice->channel, NULL, NULL, 0); 218 sleep(2);218 flushrc(500); 219 219 220 220 goto start; -
titan/plugins/stock/stock.h
r15434 r15462 276 276 if(status.lastservice != NULL) 277 277 servicestart(status.lastservice->channel, NULL, NULL, 0); 278 sleep(2);278 flushrc(500); 279 279 280 280 drawscreen(stock, 0); -
titan/titan/header.h
r15367 r15462 416 416 void delownerrc(struct skin* owner); 417 417 void delrc(int key, struct skin* owner, struct skin* screennode); 418 int flushrc(unsigned int timeout); 418 419 419 420 //rcfunc.h -
titan/titan/rc.h
r15424 r15462 14 14 } 15 15 16 16 closeonexec(status.fdrcsim); 17 17 return 0; 18 18 } … … 133 133 } 134 134 135 int flushrc(unsigned int timeout) 136 { 137 fd_set rfds; 138 struct timeval tv; 139 struct input_event rcdata; 140 int rest = 0, count = 0; 141 int ret = 0, len = 0; 142 143 rest = timeout % 1000; 144 timeout = (timeout - rest) / 1000; 145 146 while(count < 10) 147 { 148 count++; 149 tv.tv_sec = timeout; 150 tv.tv_usec = rest * 1000; 151 FD_ZERO(&rfds); 152 FD_SET(status.fdrc, &rfds); 153 154 ret = TEMP_FAILURE_RETRY(select(status.fdrc + 1, &rfds, NULL, NULL, &tv)); 155 156 if(ret < 1) break; 157 if(FD_ISSET(status.fdrc, &rfds)) 158 { 159 count = 0; 160 len = TEMP_FAILURE_RETRY(read(status.fdrc, &rcdata, sizeof(struct input_event))); 161 } 162 } 163 164 return 0; 165 } 166 135 167 int waitrc(struct skin* owner, unsigned int timeout, int flag) 136 168 { … … 140 172 struct input_event rcdata; 141 173 int treffer = 0, rest = 0; 142 int ret = 0, len , fromthread = 0, longpress = 0, longpresscount = 0;174 int ret = 0, len = 0, fromthread = 0, longpress = 0, longpresscount = 0; 143 175 struct rc *node; 144 176
Note: See TracChangeset
for help on using the changeset viewer.