Merge pull request #1345 from DeckerSU/patch-rogue-msvc
fix rogue "player lose focus with max inventory" issue
This commit is contained in:
@@ -527,6 +527,7 @@ add_line(struct rogue_state *rs,char *fmt, char *arg)
|
|||||||
touchwin(tw);
|
touchwin(tw);
|
||||||
wrefresh(tw);
|
wrefresh(tw);
|
||||||
wait_for(rs,' ');
|
wait_for(rs,' ');
|
||||||
|
|
||||||
if (md_hasclreol())
|
if (md_hasclreol())
|
||||||
{
|
{
|
||||||
werase(tw);
|
werase(tw);
|
||||||
@@ -543,16 +544,31 @@ add_line(struct rogue_state *rs,char *fmt, char *arg)
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
char *promptex = "--Wait 5 sec.--";
|
||||||
wmove(hw, LINES - 1, 0);
|
wmove(hw, LINES - 1, 0);
|
||||||
waddstr(hw, prompt);
|
waddstr(hw, newpage ? promptex : prompt);
|
||||||
wrefresh(hw);
|
wrefresh(hw);
|
||||||
wait_for(rs,' ');
|
|
||||||
|
if (newpage) {
|
||||||
|
|
||||||
|
#ifdef _WIN32
|
||||||
|
#ifdef _MSC_VER
|
||||||
|
#define sleep(x) Sleep(1000*(x))
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
sleep(5);
|
||||||
|
|
||||||
|
} else
|
||||||
|
wait_for(rs, ' ');
|
||||||
|
|
||||||
clearok(curscr, TRUE);
|
clearok(curscr, TRUE);
|
||||||
wclear(hw);
|
wclear(hw);
|
||||||
|
|
||||||
touchwin(stdscr);
|
touchwin(stdscr);
|
||||||
}
|
}
|
||||||
newpage = TRUE;
|
newpage = TRUE;
|
||||||
line_cnt = 0;
|
line_cnt = 0;
|
||||||
|
|
||||||
maxlen = (int) strlen(prompt);
|
maxlen = (int) strlen(prompt);
|
||||||
}
|
}
|
||||||
if (fmt != NULL && !(line_cnt == 0 && *fmt == '\0'))
|
if (fmt != NULL && !(line_cnt == 0 && *fmt == '\0'))
|
||||||
|
|||||||
Reference in New Issue
Block a user