Skip to content

Commit

Permalink
fix: 将 delay_ms(0) 里的固定延时改为 0ms, 同时去除多余的视口区域设置
Browse files Browse the repository at this point in the history
  • Loading branch information
yixy-only committed Dec 17, 2023
1 parent 95f034a commit 7197a6b
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions src/egegapi.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -363,15 +363,10 @@ delay_ms(long ms) {
pg->skip_timer_mark = true;
if (ms == 0) {
if (pg->update_mark_count < UPDATE_MAX_CALL) {
ege_sleep(1);
root->draw(NULL);
dealmessage(pg, FORCE_UPDATE);
root->update();
{
int l,t,r,b,c;
getviewport(&l, &t, &r, &b, &c);
setviewport(l, t, r, b, c);
}
ege_sleep(0);
}
pg->delay_ms_dwLast = get_highfeq_time_ls(pg) * 1000.0;
pg->skip_timer_mark = false;
Expand All @@ -393,7 +388,6 @@ delay_ms(long ms) {
dw = pg->delay_ms_dwLast;
}

//ege_sleep(1);
root->draw(NULL);
while (dw + delay_time >= get_highfeq_time_ls(pg) * 1000.0) {
if ( f <= 0 || pg->update_mark_count < UPDATE_MAX_CALL) {
Expand Down

0 comments on commit 7197a6b

Please sign in to comment.